xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/txx9/spi.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Definitions for TX4937/TX4938 SPI
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2000-2001 Toshiba Corporation
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
7*4882a593Smuzhiyun  * terms of the GNU General Public License version 2. This program is
8*4882a593Smuzhiyun  * licensed "as is" without any warranty of any kind, whether express
9*4882a593Smuzhiyun  * or implied.
10*4882a593Smuzhiyun  *
11*4882a593Smuzhiyun  * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
12*4882a593Smuzhiyun  */
13*4882a593Smuzhiyun #ifndef __ASM_TXX9_SPI_H
14*4882a593Smuzhiyun #define __ASM_TXX9_SPI_H
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun #include <linux/errno.h>
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #ifdef CONFIG_SPI
19*4882a593Smuzhiyun int spi_eeprom_register(int busid, int chipid, int size);
20*4882a593Smuzhiyun int spi_eeprom_read(int busid, int chipid,
21*4882a593Smuzhiyun 		    int address, unsigned char *buf, int len);
22*4882a593Smuzhiyun #else
spi_eeprom_register(int busid,int chipid,int size)23*4882a593Smuzhiyun static inline int spi_eeprom_register(int busid, int chipid, int size)
24*4882a593Smuzhiyun {
25*4882a593Smuzhiyun 	return -ENODEV;
26*4882a593Smuzhiyun }
spi_eeprom_read(int busid,int chipid,int address,unsigned char * buf,int len)27*4882a593Smuzhiyun static inline int spi_eeprom_read(int busid, int chipid,
28*4882a593Smuzhiyun 				  int address, unsigned char *buf, int len)
29*4882a593Smuzhiyun {
30*4882a593Smuzhiyun 	return -ENODEV;
31*4882a593Smuzhiyun }
32*4882a593Smuzhiyun #endif
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun #endif /* __ASM_TXX9_SPI_H */
35