diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-08-19 22:55:14 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-11 16:18:44 +0100 |
commit | d75a40e90e9eb08c2159e719a90a7922dab231d3 (patch) | |
tree | 5218a3fd78998fb47247ccbc35115a1cc42a265d /include/asm-mips/txx9 | |
parent | e6332374770ae5aa370af5792115261edbad05c1 (diff) |
MIPS: TXx9: Make spi_eeprom.c more generic
Helper routines in txx9/rbtx4938/spi_eeprom.c is not TX4938 specific.
Move it to txx9/generic/ directory and make it works with SPI bus
number other than 0.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
create mode 100644 arch/mips/txx9/generic/spi_eeprom.c
delete mode 100644 arch/mips/txx9/rbtx4938/spi_eeprom.c
Diffstat (limited to 'include/asm-mips/txx9')
-rw-r--r-- | include/asm-mips/txx9/spi.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/asm-mips/txx9/spi.h b/include/asm-mips/txx9/spi.h index ddfb2a0dc43..0d727f35455 100644 --- a/include/asm-mips/txx9/spi.h +++ b/include/asm-mips/txx9/spi.h @@ -13,7 +13,22 @@ #ifndef __ASM_TXX9_SPI_H #define __ASM_TXX9_SPI_H -extern int spi_eeprom_register(int chipid); -extern int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len); +#include <linux/errno.h> + +#ifdef CONFIG_SPI +int spi_eeprom_register(int busid, int chipid, int size); +int spi_eeprom_read(int busid, int chipid, + int address, unsigned char *buf, int len); +#else +static inline int spi_eeprom_register(int busid, int chipid, int size) +{ + return -ENODEV; +} +static inline int spi_eeprom_read(int busid, int chipid, + int address, unsigned char *buf, int len) +{ + return -ENODEV; +} +#endif #endif /* __ASM_TXX9_SPI_H */ |