]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/asm-arm/arch-mx25/imx_spi_cpld.h
applied patches from Freescale and Ka-Ro
[karo-tx-uboot.git] / include / asm-arm / arch-mx25 / imx_spi_cpld.h
1 /*
2  * (C) Copyright 2009 Freescale Semiconductor, Inc.
3  *
4  * See file CREDITS for list of people who contributed to this
5  * project.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20  * MA 02111-1307 USA
21  */
22
23 #ifndef _IMX_SPI_CPLD_H_
24 #define _IMX_SPI_CPLD_H_
25
26 #include <linux/types.h>
27
28 #define PBC_LED_CTRL            0x20000
29 #define PBC_SB_STAT             0x20008
30 #define PBC_ID_AAAA             0x20040
31 #define PBC_ID_5555             0x20048
32 #define PBC_VERSION             0x20050
33 #define PBC_ID_CAFE             0x20058
34 #define PBC_INT_STAT            0x20010
35 #define PBC_INT_MASK            0x20038
36 #define PBC_INT_REST            0x20020
37 #define PBC_SW_RESET            0x20060
38
39 void cpld_reg_write(u32 offset, u32 val);
40 u32 cpld_reg_read(u32 offset);
41 struct spi_slave *spi_cpld_probe();
42 void spi_cpld_free(struct spi_slave *slave);
43 unsigned int cpld_reg_xfer(unsigned int reg, unsigned int val,
44                                 unsigned int read);
45
46 #endif                          /* _IMX_SPI_CPLD_H_ */