1 #ifndef BCM63XX_DEV_SPI_H
2 #define BCM63XX_DEV_SPI_H
4 #include <linux/types.h>
5 #include <bcm63xx_io.h>
6 #include <bcm63xx_regs.h>
8 int __init
bcm63xx_spi_register(void);
10 struct bcm63xx_spi_pdata
{
11 unsigned int fifo_size
;
12 unsigned int msg_type_shift
;
13 unsigned int msg_ctl_width
;
18 enum bcm63xx_regs_spi
{
33 #define __GEN_SPI_REGS_TABLE(__cpu) \
34 [SPI_CMD] = SPI_## __cpu ##_CMD, \
35 [SPI_INT_STATUS] = SPI_## __cpu ##_INT_STATUS, \
36 [SPI_INT_MASK_ST] = SPI_## __cpu ##_INT_MASK_ST, \
37 [SPI_INT_MASK] = SPI_## __cpu ##_INT_MASK, \
38 [SPI_ST] = SPI_## __cpu ##_ST, \
39 [SPI_CLK_CFG] = SPI_## __cpu ##_CLK_CFG, \
40 [SPI_FILL_BYTE] = SPI_## __cpu ##_FILL_BYTE, \
41 [SPI_MSG_TAIL] = SPI_## __cpu ##_MSG_TAIL, \
42 [SPI_RX_TAIL] = SPI_## __cpu ##_RX_TAIL, \
43 [SPI_MSG_CTL] = SPI_## __cpu ##_MSG_CTL, \
44 [SPI_MSG_DATA] = SPI_## __cpu ##_MSG_DATA, \
45 [SPI_RX_DATA] = SPI_## __cpu ##_RX_DATA,
47 static inline unsigned long bcm63xx_spireg(enum bcm63xx_regs_spi reg
)
49 extern const unsigned long *bcm63xx_regs_spi
;
51 return bcm63xx_regs_spi
[reg
];
54 #endif /* BCM63XX_DEV_SPI_H */