aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/txx9/spi.h
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-08-19 22:55:14 +0900
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 16:18:44 +0100
commitd75a40e90e9eb08c2159e719a90a7922dab231d3 (patch)
tree5218a3fd78998fb47247ccbc35115a1cc42a265d /include/asm-mips/txx9/spi.h
parentMIPS: RBTX4938: Add TOSHIBA_RBTX4938_MPLEX_KEEP (diff)
downloadlinux-dev-d75a40e90e9eb08c2159e719a90a7922dab231d3.tar.xz
linux-dev-d75a40e90e9eb08c2159e719a90a7922dab231d3.zip
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 '')
-rw-r--r--include/asm-mips/txx9/spi.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/asm-mips/txx9/spi.h b/include/asm-mips/txx9/spi.h
index ddfb2a0dc432..0d727f354557 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 */