aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-fsl-lib.h')
-rw-r--r--drivers/spi/spi-fsl-lib.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/spi/spi-fsl-lib.h b/drivers/spi/spi-fsl-lib.h
index cbe881b9ea76..52db6936778e 100644
--- a/drivers/spi/spi-fsl-lib.h
+++ b/drivers/spi/spi-fsl-lib.h
@@ -34,8 +34,10 @@ struct mpc8xxx_spi {
34 34
35 int subblock; 35 int subblock;
36 struct spi_pram __iomem *pram; 36 struct spi_pram __iomem *pram;
37#ifdef CONFIG_FSL_SOC
37 struct cpm_buf_desc __iomem *tx_bd; 38 struct cpm_buf_desc __iomem *tx_bd;
38 struct cpm_buf_desc __iomem *rx_bd; 39 struct cpm_buf_desc __iomem *rx_bd;
40#endif
39 41
40 struct spi_transfer *xfer_in_progress; 42 struct spi_transfer *xfer_in_progress;
41 43
@@ -67,6 +69,15 @@ struct mpc8xxx_spi {
67 69
68 unsigned int flags; 70 unsigned int flags;
69 71
72#ifdef CONFIG_SPI_FSL_SPI
73 int type;
74 int native_chipselects;
75 u8 max_bits_per_word;
76
77 void (*set_shifts)(u32 *rx_shift, u32 *tx_shift,
78 int bits_per_word, int msb_first);
79#endif
80
70 struct workqueue_struct *workqueue; 81 struct workqueue_struct *workqueue;
71 struct work_struct work; 82 struct work_struct work;
72 83
@@ -87,12 +98,12 @@ struct spi_mpc8xxx_cs {
87 98
88static inline void mpc8xxx_spi_write_reg(__be32 __iomem *reg, u32 val) 99static inline void mpc8xxx_spi_write_reg(__be32 __iomem *reg, u32 val)
89{ 100{
90 out_be32(reg, val); 101 iowrite32be(val, reg);
91} 102}
92 103
93static inline u32 mpc8xxx_spi_read_reg(__be32 __iomem *reg) 104static inline u32 mpc8xxx_spi_read_reg(__be32 __iomem *reg)
94{ 105{
95 return in_be32(reg); 106 return ioread32be(reg);
96} 107}
97 108
98struct mpc8xxx_spi_probe_info { 109struct mpc8xxx_spi_probe_info {