2 * (C) Copyright 2009 Freescale Semiconductor, Inc.
4 * See file CREDITS for list of people who contributed to this
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.
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.
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,
23 #ifndef _IMX_SPI_CPLD_H_
24 #define _IMX_SPI_CPLD_H_
26 #include <linux/types.h>
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
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,
46 #endif /* _IMX_SPI_CPLD_H_ */