aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-08-19 09:55:14 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 11:18:44 -0400
commitd75a40e90e9eb08c2159e719a90a7922dab231d3 (patch)
tree5218a3fd78998fb47247ccbc35115a1cc42a265d /include/asm-mips
parente6332374770ae5aa370af5792115261edbad05c1 (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')
-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 @@
13#ifndef __ASM_TXX9_SPI_H 13#ifndef __ASM_TXX9_SPI_H
14#define __ASM_TXX9_SPI_H 14#define __ASM_TXX9_SPI_H
15 15
16extern int spi_eeprom_register(int chipid); 16#include <linux/errno.h>
17extern int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len); 17
18#ifdef CONFIG_SPI
19int spi_eeprom_register(int busid, int chipid, int size);
20int spi_eeprom_read(int busid, int chipid,
21 int address, unsigned char *buf, int len);
22#else
23static inline int spi_eeprom_register(int busid, int chipid, int size)
24{
25 return -ENODEV;
26}
27static inline int spi_eeprom_read(int busid, int chipid,
28 int address, unsigned char *buf, int len)
29{
30 return -ENODEV;
31}
32#endif
18 33
19#endif /* __ASM_TXX9_SPI_H */ 34#endif /* __ASM_TXX9_SPI_H */