aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-02-27 17:21:25 -0500
committerMark Brown <broonie@kernel.org>2017-03-01 06:43:03 -0500
commitad2fca0721d1376c1689d909fdfcf5d7e240dac7 (patch)
treec1773e09b5fbf8eee655b9e8572e15e61b1c1e8d
parent57f22cd29cf1b4ff2aea8505eae2d3ed71ca5de4 (diff)
spi: lantiq-ssc: add LTQ_ prefix to defines
The blackfin architecture has a SPI_STAT define which conflicts with the define from the spi-lantiq-ssc driver in compile test mode. Fix this by adding a prefix in front of every define. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-lantiq-ssc.c437
1 files changed, 222 insertions, 215 deletions
diff --git a/drivers/spi/spi-lantiq-ssc.c b/drivers/spi/spi-lantiq-ssc.c
index 8a626f7fccea..633c30b4d5a6 100644
--- a/drivers/spi/spi-lantiq-ssc.c
+++ b/drivers/spi/spi-lantiq-ssc.c
@@ -26,136 +26,140 @@
26#include <lantiq_soc.h> 26#include <lantiq_soc.h>
27#endif 27#endif
28 28
29#define SPI_RX_IRQ_NAME "spi_rx" 29#define LTQ_SPI_RX_IRQ_NAME "spi_rx"
30#define SPI_TX_IRQ_NAME "spi_tx" 30#define LTQ_SPI_TX_IRQ_NAME "spi_tx"
31#define SPI_ERR_IRQ_NAME "spi_err" 31#define LTQ_SPI_ERR_IRQ_NAME "spi_err"
32#define SPI_FRM_IRQ_NAME "spi_frm" 32#define LTQ_SPI_FRM_IRQ_NAME "spi_frm"
33 33
34#define SPI_CLC 0x00 34#define LTQ_SPI_CLC 0x00
35#define SPI_PISEL 0x04 35#define LTQ_SPI_PISEL 0x04
36#define SPI_ID 0x08 36#define LTQ_SPI_ID 0x08
37#define SPI_CON 0x10 37#define LTQ_SPI_CON 0x10
38#define SPI_STAT 0x14 38#define LTQ_SPI_STAT 0x14
39#define SPI_WHBSTATE 0x18 39#define LTQ_SPI_WHBSTATE 0x18
40#define SPI_TB 0x20 40#define LTQ_SPI_TB 0x20
41#define SPI_RB 0x24 41#define LTQ_SPI_RB 0x24
42#define SPI_RXFCON 0x30 42#define LTQ_SPI_RXFCON 0x30
43#define SPI_TXFCON 0x34 43#define LTQ_SPI_TXFCON 0x34
44#define SPI_FSTAT 0x38 44#define LTQ_SPI_FSTAT 0x38
45#define SPI_BRT 0x40 45#define LTQ_SPI_BRT 0x40
46#define SPI_BRSTAT 0x44 46#define LTQ_SPI_BRSTAT 0x44
47#define SPI_SFCON 0x60 47#define LTQ_SPI_SFCON 0x60
48#define SPI_SFSTAT 0x64 48#define LTQ_SPI_SFSTAT 0x64
49#define SPI_GPOCON 0x70 49#define LTQ_SPI_GPOCON 0x70
50#define SPI_GPOSTAT 0x74 50#define LTQ_SPI_GPOSTAT 0x74
51#define SPI_FPGO 0x78 51#define LTQ_SPI_FPGO 0x78
52#define SPI_RXREQ 0x80 52#define LTQ_SPI_RXREQ 0x80
53#define SPI_RXCNT 0x84 53#define LTQ_SPI_RXCNT 0x84
54#define SPI_DMACON 0xec 54#define LTQ_SPI_DMACON 0xec
55#define SPI_IRNEN 0xf4 55#define LTQ_SPI_IRNEN 0xf4
56#define SPI_IRNICR 0xf8 56#define LTQ_SPI_IRNICR 0xf8
57#define SPI_IRNCR 0xfc 57#define LTQ_SPI_IRNCR 0xfc
58 58
59#define SPI_CLC_SMC_S 16 /* Clock divider for sleep mode */ 59#define LTQ_SPI_CLC_SMC_S 16 /* Clock divider for sleep mode */
60#define SPI_CLC_SMC_M (0xFF << SPI_CLC_SMC_S) 60#define LTQ_SPI_CLC_SMC_M (0xFF << LTQ_SPI_CLC_SMC_S)
61#define SPI_CLC_RMC_S 8 /* Clock divider for normal run mode */ 61#define LTQ_SPI_CLC_RMC_S 8 /* Clock divider for normal run mode */
62#define SPI_CLC_RMC_M (0xFF << SPI_CLC_RMC_S) 62#define LTQ_SPI_CLC_RMC_M (0xFF << LTQ_SPI_CLC_RMC_S)
63#define SPI_CLC_DISS BIT(1) /* Disable status bit */ 63#define LTQ_SPI_CLC_DISS BIT(1) /* Disable status bit */
64#define SPI_CLC_DISR BIT(0) /* Disable request bit */ 64#define LTQ_SPI_CLC_DISR BIT(0) /* Disable request bit */
65 65
66#define SPI_ID_TXFS_S 24 /* Implemented TX FIFO size */ 66#define LTQ_SPI_ID_TXFS_S 24 /* Implemented TX FIFO size */
67#define SPI_ID_TXFS_M (0x3F << SPI_ID_TXFS_S) 67#define LTQ_SPI_ID_TXFS_M (0x3F << LTQ_SPI_ID_TXFS_S)
68#define SPI_ID_RXFS_S 16 /* Implemented RX FIFO size */ 68#define LTQ_SPI_ID_RXFS_S 16 /* Implemented RX FIFO size */
69#define SPI_ID_RXFS_M (0x3F << SPI_ID_RXFS_S) 69#define LTQ_SPI_ID_RXFS_M (0x3F << LTQ_SPI_ID_RXFS_S)
70#define SPI_ID_MOD_S 8 /* Module ID */ 70#define LTQ_SPI_ID_MOD_S 8 /* Module ID */
71#define SPI_ID_MOD_M (0xff << SPI_ID_MOD_S) 71#define LTQ_SPI_ID_MOD_M (0xff << LTQ_SPI_ID_MOD_S)
72#define SPI_ID_CFG_S 5 /* DMA interface support */ 72#define LTQ_SPI_ID_CFG_S 5 /* DMA interface support */
73#define SPI_ID_CFG_M (1 << SPI_ID_CFG_S) 73#define LTQ_SPI_ID_CFG_M (1 << LTQ_SPI_ID_CFG_S)
74#define SPI_ID_REV_M 0x1F /* Hardware revision number */ 74#define LTQ_SPI_ID_REV_M 0x1F /* Hardware revision number */
75 75
76#define SPI_CON_BM_S 16 /* Data width selection */ 76#define LTQ_SPI_CON_BM_S 16 /* Data width selection */
77#define SPI_CON_BM_M (0x1F << SPI_CON_BM_S) 77#define LTQ_SPI_CON_BM_M (0x1F << LTQ_SPI_CON_BM_S)
78#define SPI_CON_EM BIT(24) /* Echo mode */ 78#define LTQ_SPI_CON_EM BIT(24) /* Echo mode */
79#define SPI_CON_IDLE BIT(23) /* Idle bit value */ 79#define LTQ_SPI_CON_IDLE BIT(23) /* Idle bit value */
80#define SPI_CON_ENBV BIT(22) /* Enable byte valid control */ 80#define LTQ_SPI_CON_ENBV BIT(22) /* Enable byte valid control */
81#define SPI_CON_RUEN BIT(12) /* Receive underflow error enable */ 81#define LTQ_SPI_CON_RUEN BIT(12) /* Receive underflow error enable */
82#define SPI_CON_TUEN BIT(11) /* Transmit underflow error enable */ 82#define LTQ_SPI_CON_TUEN BIT(11) /* Transmit underflow error enable */
83#define SPI_CON_AEN BIT(10) /* Abort error enable */ 83#define LTQ_SPI_CON_AEN BIT(10) /* Abort error enable */
84#define SPI_CON_REN BIT(9) /* Receive overflow error enable */ 84#define LTQ_SPI_CON_REN BIT(9) /* Receive overflow error enable */
85#define SPI_CON_TEN BIT(8) /* Transmit overflow error enable */ 85#define LTQ_SPI_CON_TEN BIT(8) /* Transmit overflow error enable */
86#define SPI_CON_LB BIT(7) /* Loopback control */ 86#define LTQ_SPI_CON_LB BIT(7) /* Loopback control */
87#define SPI_CON_PO BIT(6) /* Clock polarity control */ 87#define LTQ_SPI_CON_PO BIT(6) /* Clock polarity control */
88#define SPI_CON_PH BIT(5) /* Clock phase control */ 88#define LTQ_SPI_CON_PH BIT(5) /* Clock phase control */
89#define SPI_CON_HB BIT(4) /* Heading control */ 89#define LTQ_SPI_CON_HB BIT(4) /* Heading control */
90#define SPI_CON_RXOFF BIT(1) /* Switch receiver off */ 90#define LTQ_SPI_CON_RXOFF BIT(1) /* Switch receiver off */
91#define SPI_CON_TXOFF BIT(0) /* Switch transmitter off */ 91#define LTQ_SPI_CON_TXOFF BIT(0) /* Switch transmitter off */
92 92
93#define SPI_STAT_RXBV_S 28 93#define LTQ_SPI_STAT_RXBV_S 28
94#define SPI_STAT_RXBV_M (0x7 << SPI_STAT_RXBV_S) 94#define LTQ_SPI_STAT_RXBV_M (0x7 << LTQ_SPI_STAT_RXBV_S)
95#define SPI_STAT_BSY BIT(13) /* Busy flag */ 95#define LTQ_SPI_STAT_BSY BIT(13) /* Busy flag */
96#define SPI_STAT_RUE BIT(12) /* Receive underflow error flag */ 96#define LTQ_SPI_STAT_RUE BIT(12) /* Receive underflow error flag */
97#define SPI_STAT_TUE BIT(11) /* Transmit underflow error flag */ 97#define LTQ_SPI_STAT_TUE BIT(11) /* Transmit underflow error flag */
98#define SPI_STAT_AE BIT(10) /* Abort error flag */ 98#define LTQ_SPI_STAT_AE BIT(10) /* Abort error flag */
99#define SPI_STAT_RE BIT(9) /* Receive error flag */ 99#define LTQ_SPI_STAT_RE BIT(9) /* Receive error flag */
100#define SPI_STAT_TE BIT(8) /* Transmit error flag */ 100#define LTQ_SPI_STAT_TE BIT(8) /* Transmit error flag */
101#define SPI_STAT_ME BIT(7) /* Mode error flag */ 101#define LTQ_SPI_STAT_ME BIT(7) /* Mode error flag */
102#define SPI_STAT_MS BIT(1) /* Master/slave select bit */ 102#define LTQ_SPI_STAT_MS BIT(1) /* Master/slave select bit */
103#define SPI_STAT_EN BIT(0) /* Enable bit */ 103#define LTQ_SPI_STAT_EN BIT(0) /* Enable bit */
104#define SPI_STAT_ERRORS (SPI_STAT_ME | SPI_STAT_TE | SPI_STAT_RE | \ 104#define LTQ_SPI_STAT_ERRORS (LTQ_SPI_STAT_ME | LTQ_SPI_STAT_TE | \
105 SPI_STAT_AE | SPI_STAT_TUE | SPI_STAT_RUE) 105 LTQ_SPI_STAT_RE | LTQ_SPI_STAT_AE | \
106 106 LTQ_SPI_STAT_TUE | LTQ_SPI_STAT_RUE)
107#define SPI_WHBSTATE_SETTUE BIT(15) /* Set transmit underflow error flag */ 107
108#define SPI_WHBSTATE_SETAE BIT(14) /* Set abort error flag */ 108#define LTQ_SPI_WHBSTATE_SETTUE BIT(15) /* Set transmit underflow error flag */
109#define SPI_WHBSTATE_SETRE BIT(13) /* Set receive error flag */ 109#define LTQ_SPI_WHBSTATE_SETAE BIT(14) /* Set abort error flag */
110#define SPI_WHBSTATE_SETTE BIT(12) /* Set transmit error flag */ 110#define LTQ_SPI_WHBSTATE_SETRE BIT(13) /* Set receive error flag */
111#define SPI_WHBSTATE_CLRTUE BIT(11) /* Clear transmit underflow error flag */ 111#define LTQ_SPI_WHBSTATE_SETTE BIT(12) /* Set transmit error flag */
112#define SPI_WHBSTATE_CLRAE BIT(10) /* Clear abort error flag */ 112#define LTQ_SPI_WHBSTATE_CLRTUE BIT(11) /* Clear transmit underflow error flag */
113#define SPI_WHBSTATE_CLRRE BIT(9) /* Clear receive error flag */ 113#define LTQ_SPI_WHBSTATE_CLRAE BIT(10) /* Clear abort error flag */
114#define SPI_WHBSTATE_CLRTE BIT(8) /* Clear transmit error flag */ 114#define LTQ_SPI_WHBSTATE_CLRRE BIT(9) /* Clear receive error flag */
115#define SPI_WHBSTATE_SETME BIT(7) /* Set mode error flag */ 115#define LTQ_SPI_WHBSTATE_CLRTE BIT(8) /* Clear transmit error flag */
116#define SPI_WHBSTATE_CLRME BIT(6) /* Clear mode error flag */ 116#define LTQ_SPI_WHBSTATE_SETME BIT(7) /* Set mode error flag */
117#define SPI_WHBSTATE_SETRUE BIT(5) /* Set receive underflow error flag */ 117#define LTQ_SPI_WHBSTATE_CLRME BIT(6) /* Clear mode error flag */
118#define SPI_WHBSTATE_CLRRUE BIT(4) /* Clear receive underflow error flag */ 118#define LTQ_SPI_WHBSTATE_SETRUE BIT(5) /* Set receive underflow error flag */
119#define SPI_WHBSTATE_SETMS BIT(3) /* Set master select bit */ 119#define LTQ_SPI_WHBSTATE_CLRRUE BIT(4) /* Clear receive underflow error flag */
120#define SPI_WHBSTATE_CLRMS BIT(2) /* Clear master select bit */ 120#define LTQ_SPI_WHBSTATE_SETMS BIT(3) /* Set master select bit */
121#define SPI_WHBSTATE_SETEN BIT(1) /* Set enable bit (operational mode) */ 121#define LTQ_SPI_WHBSTATE_CLRMS BIT(2) /* Clear master select bit */
122#define SPI_WHBSTATE_CLREN BIT(0) /* Clear enable bit (config mode */ 122#define LTQ_SPI_WHBSTATE_SETEN BIT(1) /* Set enable bit (operational mode) */
123#define SPI_WHBSTATE_CLR_ERRORS (SPI_WHBSTATE_CLRRUE | SPI_WHBSTATE_CLRME | \ 123#define LTQ_SPI_WHBSTATE_CLREN BIT(0) /* Clear enable bit (config mode */
124 SPI_WHBSTATE_CLRTE | SPI_WHBSTATE_CLRRE | \ 124#define LTQ_SPI_WHBSTATE_CLR_ERRORS (LTQ_SPI_WHBSTATE_CLRRUE | \
125 SPI_WHBSTATE_CLRAE | SPI_WHBSTATE_CLRTUE) 125 LTQ_SPI_WHBSTATE_CLRME | \
126 126 LTQ_SPI_WHBSTATE_CLRTE | \
127#define SPI_RXFCON_RXFITL_S 8 /* FIFO interrupt trigger level */ 127 LTQ_SPI_WHBSTATE_CLRRE | \
128#define SPI_RXFCON_RXFITL_M (0x3F << SPI_RXFCON_RXFITL_S) 128 LTQ_SPI_WHBSTATE_CLRAE | \
129#define SPI_RXFCON_RXFLU BIT(1) /* FIFO flush */ 129 LTQ_SPI_WHBSTATE_CLRTUE)
130#define SPI_RXFCON_RXFEN BIT(0) /* FIFO enable */ 130
131 131#define LTQ_SPI_RXFCON_RXFITL_S 8 /* FIFO interrupt trigger level */
132#define SPI_TXFCON_TXFITL_S 8 /* FIFO interrupt trigger level */ 132#define LTQ_SPI_RXFCON_RXFITL_M (0x3F << LTQ_SPI_RXFCON_RXFITL_S)
133#define SPI_TXFCON_TXFITL_M (0x3F << SPI_TXFCON_TXFITL_S) 133#define LTQ_SPI_RXFCON_RXFLU BIT(1) /* FIFO flush */
134#define SPI_TXFCON_TXFLU BIT(1) /* FIFO flush */ 134#define LTQ_SPI_RXFCON_RXFEN BIT(0) /* FIFO enable */
135#define SPI_TXFCON_TXFEN BIT(0) /* FIFO enable */ 135
136 136#define LTQ_SPI_TXFCON_TXFITL_S 8 /* FIFO interrupt trigger level */
137#define SPI_FSTAT_RXFFL_S 0 137#define LTQ_SPI_TXFCON_TXFITL_M (0x3F << LTQ_SPI_TXFCON_TXFITL_S)
138#define SPI_FSTAT_RXFFL_M (0x3f << SPI_FSTAT_RXFFL_S) 138#define LTQ_SPI_TXFCON_TXFLU BIT(1) /* FIFO flush */
139#define SPI_FSTAT_TXFFL_S 8 139#define LTQ_SPI_TXFCON_TXFEN BIT(0) /* FIFO enable */
140#define SPI_FSTAT_TXFFL_M (0x3f << SPI_FSTAT_TXFFL_S) 140
141 141#define LTQ_SPI_FSTAT_RXFFL_S 0
142#define SPI_GPOCON_ISCSBN_S 8 142#define LTQ_SPI_FSTAT_RXFFL_M (0x3f << LTQ_SPI_FSTAT_RXFFL_S)
143#define SPI_GPOCON_INVOUTN_S 0 143#define LTQ_SPI_FSTAT_TXFFL_S 8
144 144#define LTQ_SPI_FSTAT_TXFFL_M (0x3f << LTQ_SPI_FSTAT_TXFFL_S)
145#define SPI_FGPO_SETOUTN_S 8 145
146#define SPI_FGPO_CLROUTN_S 0 146#define LTQ_SPI_GPOCON_ISCSBN_S 8
147 147#define LTQ_SPI_GPOCON_INVOUTN_S 0
148#define SPI_RXREQ_RXCNT_M 0xFFFF /* Receive count value */ 148
149#define SPI_RXCNT_TODO_M 0xFFFF /* Recevie to-do value */ 149#define LTQ_SPI_FGPO_SETOUTN_S 8
150 150#define LTQ_SPI_FGPO_CLROUTN_S 0
151#define SPI_IRNEN_TFI BIT(4) /* TX finished interrupt */ 151
152#define SPI_IRNEN_F BIT(3) /* Frame end interrupt request */ 152#define LTQ_SPI_RXREQ_RXCNT_M 0xFFFF /* Receive count value */
153#define SPI_IRNEN_E BIT(2) /* Error end interrupt request */ 153#define LTQ_SPI_RXCNT_TODO_M 0xFFFF /* Recevie to-do value */
154#define SPI_IRNEN_T_XWAY BIT(1) /* Transmit end interrupt request */ 154
155#define SPI_IRNEN_R_XWAY BIT(0) /* Receive end interrupt request */ 155#define LTQ_SPI_IRNEN_TFI BIT(4) /* TX finished interrupt */
156#define SPI_IRNEN_R_XRX BIT(1) /* Transmit end interrupt request */ 156#define LTQ_SPI_IRNEN_F BIT(3) /* Frame end interrupt request */
157#define SPI_IRNEN_T_XRX BIT(0) /* Receive end interrupt request */ 157#define LTQ_SPI_IRNEN_E BIT(2) /* Error end interrupt request */
158#define SPI_IRNEN_ALL 0x1F 158#define LTQ_SPI_IRNEN_T_XWAY BIT(1) /* Transmit end interrupt request */
159#define LTQ_SPI_IRNEN_R_XWAY BIT(0) /* Receive end interrupt request */
160#define LTQ_SPI_IRNEN_R_XRX BIT(1) /* Transmit end interrupt request */
161#define LTQ_SPI_IRNEN_T_XRX BIT(0) /* Receive end interrupt request */
162#define LTQ_SPI_IRNEN_ALL 0x1F
159 163
160struct lantiq_ssc_hwcfg { 164struct lantiq_ssc_hwcfg {
161 unsigned int irnen_r; 165 unsigned int irnen_r;
@@ -208,16 +212,16 @@ static void lantiq_ssc_maskl(const struct lantiq_ssc_spi *spi, u32 clr,
208 212
209static unsigned int tx_fifo_level(const struct lantiq_ssc_spi *spi) 213static unsigned int tx_fifo_level(const struct lantiq_ssc_spi *spi)
210{ 214{
211 u32 fstat = lantiq_ssc_readl(spi, SPI_FSTAT); 215 u32 fstat = lantiq_ssc_readl(spi, LTQ_SPI_FSTAT);
212 216
213 return (fstat & SPI_FSTAT_TXFFL_M) >> SPI_FSTAT_TXFFL_S; 217 return (fstat & LTQ_SPI_FSTAT_TXFFL_M) >> LTQ_SPI_FSTAT_TXFFL_S;
214} 218}
215 219
216static unsigned int rx_fifo_level(const struct lantiq_ssc_spi *spi) 220static unsigned int rx_fifo_level(const struct lantiq_ssc_spi *spi)
217{ 221{
218 u32 fstat = lantiq_ssc_readl(spi, SPI_FSTAT); 222 u32 fstat = lantiq_ssc_readl(spi, LTQ_SPI_FSTAT);
219 223
220 return fstat & SPI_FSTAT_RXFFL_M; 224 return fstat & LTQ_SPI_FSTAT_RXFFL_M;
221} 225}
222 226
223static unsigned int tx_fifo_free(const struct lantiq_ssc_spi *spi) 227static unsigned int tx_fifo_free(const struct lantiq_ssc_spi *spi)
@@ -227,38 +231,38 @@ static unsigned int tx_fifo_free(const struct lantiq_ssc_spi *spi)
227 231
228static void rx_fifo_reset(const struct lantiq_ssc_spi *spi) 232static void rx_fifo_reset(const struct lantiq_ssc_spi *spi)
229{ 233{
230 u32 val = spi->rx_fifo_size << SPI_RXFCON_RXFITL_S; 234 u32 val = spi->rx_fifo_size << LTQ_SPI_RXFCON_RXFITL_S;
231 235
232 val |= SPI_RXFCON_RXFEN | SPI_RXFCON_RXFLU; 236 val |= LTQ_SPI_RXFCON_RXFEN | LTQ_SPI_RXFCON_RXFLU;
233 lantiq_ssc_writel(spi, val, SPI_RXFCON); 237 lantiq_ssc_writel(spi, val, LTQ_SPI_RXFCON);
234} 238}
235 239
236static void tx_fifo_reset(const struct lantiq_ssc_spi *spi) 240static void tx_fifo_reset(const struct lantiq_ssc_spi *spi)
237{ 241{
238 u32 val = 1 << SPI_TXFCON_TXFITL_S; 242 u32 val = 1 << LTQ_SPI_TXFCON_TXFITL_S;
239 243
240 val |= SPI_TXFCON_TXFEN | SPI_TXFCON_TXFLU; 244 val |= LTQ_SPI_TXFCON_TXFEN | LTQ_SPI_TXFCON_TXFLU;
241 lantiq_ssc_writel(spi, val, SPI_TXFCON); 245 lantiq_ssc_writel(spi, val, LTQ_SPI_TXFCON);
242} 246}
243 247
244static void rx_fifo_flush(const struct lantiq_ssc_spi *spi) 248static void rx_fifo_flush(const struct lantiq_ssc_spi *spi)
245{ 249{
246 lantiq_ssc_maskl(spi, 0, SPI_RXFCON_RXFLU, SPI_RXFCON); 250 lantiq_ssc_maskl(spi, 0, LTQ_SPI_RXFCON_RXFLU, LTQ_SPI_RXFCON);
247} 251}
248 252
249static void tx_fifo_flush(const struct lantiq_ssc_spi *spi) 253static void tx_fifo_flush(const struct lantiq_ssc_spi *spi)
250{ 254{
251 lantiq_ssc_maskl(spi, 0, SPI_TXFCON_TXFLU, SPI_TXFCON); 255 lantiq_ssc_maskl(spi, 0, LTQ_SPI_TXFCON_TXFLU, LTQ_SPI_TXFCON);
252} 256}
253 257
254static void hw_enter_config_mode(const struct lantiq_ssc_spi *spi) 258static void hw_enter_config_mode(const struct lantiq_ssc_spi *spi)
255{ 259{
256 lantiq_ssc_writel(spi, SPI_WHBSTATE_CLREN, SPI_WHBSTATE); 260 lantiq_ssc_writel(spi, LTQ_SPI_WHBSTATE_CLREN, LTQ_SPI_WHBSTATE);
257} 261}
258 262
259static void hw_enter_active_mode(const struct lantiq_ssc_spi *spi) 263static void hw_enter_active_mode(const struct lantiq_ssc_spi *spi)
260{ 264{
261 lantiq_ssc_writel(spi, SPI_WHBSTATE_SETEN, SPI_WHBSTATE); 265 lantiq_ssc_writel(spi, LTQ_SPI_WHBSTATE_SETEN, LTQ_SPI_WHBSTATE);
262} 266}
263 267
264static void hw_setup_speed_hz(const struct lantiq_ssc_spi *spi, 268static void hw_setup_speed_hz(const struct lantiq_ssc_spi *spi,
@@ -287,7 +291,7 @@ static void hw_setup_speed_hz(const struct lantiq_ssc_spi *spi,
287 dev_dbg(spi->dev, "spi_clk %u, max_speed_hz %u, brt %u\n", 291 dev_dbg(spi->dev, "spi_clk %u, max_speed_hz %u, brt %u\n",
288 spi_clk, max_speed_hz, brt); 292 spi_clk, max_speed_hz, brt);
289 293
290 lantiq_ssc_writel(spi, brt, SPI_BRT); 294 lantiq_ssc_writel(spi, brt, LTQ_SPI_BRT);
291} 295}
292 296
293static void hw_setup_bits_per_word(const struct lantiq_ssc_spi *spi, 297static void hw_setup_bits_per_word(const struct lantiq_ssc_spi *spi,
@@ -296,9 +300,9 @@ static void hw_setup_bits_per_word(const struct lantiq_ssc_spi *spi,
296 u32 bm; 300 u32 bm;
297 301
298 /* CON.BM value = bits_per_word - 1 */ 302 /* CON.BM value = bits_per_word - 1 */
299 bm = (bits_per_word - 1) << SPI_CON_BM_S; 303 bm = (bits_per_word - 1) << LTQ_SPI_CON_BM_S;
300 304
301 lantiq_ssc_maskl(spi, SPI_CON_BM_M, bm, SPI_CON); 305 lantiq_ssc_maskl(spi, LTQ_SPI_CON_BM_M, bm, LTQ_SPI_CON);
302} 306}
303 307
304static void hw_setup_clock_mode(const struct lantiq_ssc_spi *spi, 308static void hw_setup_clock_mode(const struct lantiq_ssc_spi *spi,
@@ -315,28 +319,28 @@ static void hw_setup_clock_mode(const struct lantiq_ssc_spi *spi,
315 * 3 1 1 1 0 319 * 3 1 1 1 0
316 */ 320 */
317 if (mode & SPI_CPHA) 321 if (mode & SPI_CPHA)
318 con_clr |= SPI_CON_PH; 322 con_clr |= LTQ_SPI_CON_PH;
319 else 323 else
320 con_set |= SPI_CON_PH; 324 con_set |= LTQ_SPI_CON_PH;
321 325
322 if (mode & SPI_CPOL) 326 if (mode & SPI_CPOL)
323 con_set |= SPI_CON_PO | SPI_CON_IDLE; 327 con_set |= LTQ_SPI_CON_PO | LTQ_SPI_CON_IDLE;
324 else 328 else
325 con_clr |= SPI_CON_PO | SPI_CON_IDLE; 329 con_clr |= LTQ_SPI_CON_PO | LTQ_SPI_CON_IDLE;
326 330
327 /* Set heading control */ 331 /* Set heading control */
328 if (mode & SPI_LSB_FIRST) 332 if (mode & SPI_LSB_FIRST)
329 con_clr |= SPI_CON_HB; 333 con_clr |= LTQ_SPI_CON_HB;
330 else 334 else
331 con_set |= SPI_CON_HB; 335 con_set |= LTQ_SPI_CON_HB;
332 336
333 /* Set loopback mode */ 337 /* Set loopback mode */
334 if (mode & SPI_LOOP) 338 if (mode & SPI_LOOP)
335 con_set |= SPI_CON_LB; 339 con_set |= LTQ_SPI_CON_LB;
336 else 340 else
337 con_clr |= SPI_CON_LB; 341 con_clr |= LTQ_SPI_CON_LB;
338 342
339 lantiq_ssc_maskl(spi, con_clr, con_set, SPI_CON); 343 lantiq_ssc_maskl(spi, con_clr, con_set, LTQ_SPI_CON);
340} 344}
341 345
342static void lantiq_ssc_hw_init(const struct lantiq_ssc_spi *spi) 346static void lantiq_ssc_hw_init(const struct lantiq_ssc_spi *spi)
@@ -347,37 +351,39 @@ static void lantiq_ssc_hw_init(const struct lantiq_ssc_spi *spi)
347 * Set clock divider for run mode to 1 to 351 * Set clock divider for run mode to 1 to
348 * run at same frequency as FPI bus 352 * run at same frequency as FPI bus
349 */ 353 */
350 lantiq_ssc_writel(spi, 1 << SPI_CLC_RMC_S, SPI_CLC); 354 lantiq_ssc_writel(spi, 1 << LTQ_SPI_CLC_RMC_S, LTQ_SPI_CLC);
351 355
352 /* Put controller into config mode */ 356 /* Put controller into config mode */
353 hw_enter_config_mode(spi); 357 hw_enter_config_mode(spi);
354 358
355 /* Clear error flags */ 359 /* Clear error flags */
356 lantiq_ssc_maskl(spi, 0, SPI_WHBSTATE_CLR_ERRORS, SPI_WHBSTATE); 360 lantiq_ssc_maskl(spi, 0, LTQ_SPI_WHBSTATE_CLR_ERRORS, LTQ_SPI_WHBSTATE);
357 361
358 /* Enable error checking, disable TX/RX */ 362 /* Enable error checking, disable TX/RX */
359 lantiq_ssc_writel(spi, SPI_CON_RUEN | SPI_CON_AEN | SPI_CON_TEN | 363 lantiq_ssc_writel(spi, LTQ_SPI_CON_RUEN | LTQ_SPI_CON_AEN |
360 SPI_CON_REN | SPI_CON_TXOFF | SPI_CON_RXOFF, SPI_CON); 364 LTQ_SPI_CON_TEN | LTQ_SPI_CON_REN | LTQ_SPI_CON_TXOFF |
365 LTQ_SPI_CON_RXOFF, LTQ_SPI_CON);
361 366
362 /* Setup default SPI mode */ 367 /* Setup default SPI mode */
363 hw_setup_bits_per_word(spi, spi->bits_per_word); 368 hw_setup_bits_per_word(spi, spi->bits_per_word);
364 hw_setup_clock_mode(spi, SPI_MODE_0); 369 hw_setup_clock_mode(spi, SPI_MODE_0);
365 370
366 /* Enable master mode and clear error flags */ 371 /* Enable master mode and clear error flags */
367 lantiq_ssc_writel(spi, SPI_WHBSTATE_SETMS | SPI_WHBSTATE_CLR_ERRORS, 372 lantiq_ssc_writel(spi, LTQ_SPI_WHBSTATE_SETMS |
368 SPI_WHBSTATE); 373 LTQ_SPI_WHBSTATE_CLR_ERRORS,
374 LTQ_SPI_WHBSTATE);
369 375
370 /* Reset GPIO/CS registers */ 376 /* Reset GPIO/CS registers */
371 lantiq_ssc_writel(spi, 0, SPI_GPOCON); 377 lantiq_ssc_writel(spi, 0, LTQ_SPI_GPOCON);
372 lantiq_ssc_writel(spi, 0xFF00, SPI_FPGO); 378 lantiq_ssc_writel(spi, 0xFF00, LTQ_SPI_FPGO);
373 379
374 /* Enable and flush FIFOs */ 380 /* Enable and flush FIFOs */
375 rx_fifo_reset(spi); 381 rx_fifo_reset(spi);
376 tx_fifo_reset(spi); 382 tx_fifo_reset(spi);
377 383
378 /* Enable interrupts */ 384 /* Enable interrupts */
379 lantiq_ssc_writel(spi, hwcfg->irnen_t | hwcfg->irnen_r | SPI_IRNEN_E, 385 lantiq_ssc_writel(spi, hwcfg->irnen_t | hwcfg->irnen_r |
380 SPI_IRNEN); 386 LTQ_SPI_IRNEN_E, LTQ_SPI_IRNEN);
381} 387}
382 388
383static int lantiq_ssc_setup(struct spi_device *spidev) 389static int lantiq_ssc_setup(struct spi_device *spidev)
@@ -400,13 +406,13 @@ static int lantiq_ssc_setup(struct spi_device *spidev)
400 } 406 }
401 407
402 /* set GPO pin to CS mode */ 408 /* set GPO pin to CS mode */
403 gpocon = 1 << ((cs - spi->base_cs) + SPI_GPOCON_ISCSBN_S); 409 gpocon = 1 << ((cs - spi->base_cs) + LTQ_SPI_GPOCON_ISCSBN_S);
404 410
405 /* invert GPO pin */ 411 /* invert GPO pin */
406 if (spidev->mode & SPI_CS_HIGH) 412 if (spidev->mode & SPI_CS_HIGH)
407 gpocon |= 1 << (cs - spi->base_cs); 413 gpocon |= 1 << (cs - spi->base_cs);
408 414
409 lantiq_ssc_maskl(spi, 0, gpocon, SPI_GPOCON); 415 lantiq_ssc_maskl(spi, 0, gpocon, LTQ_SPI_GPOCON);
410 416
411 return 0; 417 return 0;
412} 418}
@@ -442,18 +448,18 @@ static void hw_setup_transfer(struct lantiq_ssc_spi *spi,
442 } 448 }
443 449
444 /* Configure transmitter and receiver */ 450 /* Configure transmitter and receiver */
445 con = lantiq_ssc_readl(spi, SPI_CON); 451 con = lantiq_ssc_readl(spi, LTQ_SPI_CON);
446 if (t->tx_buf) 452 if (t->tx_buf)
447 con &= ~SPI_CON_TXOFF; 453 con &= ~LTQ_SPI_CON_TXOFF;
448 else 454 else
449 con |= SPI_CON_TXOFF; 455 con |= LTQ_SPI_CON_TXOFF;
450 456
451 if (t->rx_buf) 457 if (t->rx_buf)
452 con &= ~SPI_CON_RXOFF; 458 con &= ~LTQ_SPI_CON_RXOFF;
453 else 459 else
454 con |= SPI_CON_RXOFF; 460 con |= LTQ_SPI_CON_RXOFF;
455 461
456 lantiq_ssc_writel(spi, con, SPI_CON); 462 lantiq_ssc_writel(spi, con, LTQ_SPI_CON);
457} 463}
458 464
459static int lantiq_ssc_unprepare_message(struct spi_master *master, 465static int lantiq_ssc_unprepare_message(struct spi_master *master,
@@ -464,7 +470,8 @@ static int lantiq_ssc_unprepare_message(struct spi_master *master,
464 flush_workqueue(spi->wq); 470 flush_workqueue(spi->wq);
465 471
466 /* Disable transmitter and receiver while idle */ 472 /* Disable transmitter and receiver while idle */
467 lantiq_ssc_maskl(spi, 0, SPI_CON_TXOFF | SPI_CON_RXOFF, SPI_CON); 473 lantiq_ssc_maskl(spi, 0, LTQ_SPI_CON_TXOFF | LTQ_SPI_CON_RXOFF,
474 LTQ_SPI_CON);
468 475
469 return 0; 476 return 0;
470} 477}
@@ -503,7 +510,7 @@ static void tx_fifo_write(struct lantiq_ssc_spi *spi)
503 break; 510 break;
504 } 511 }
505 512
506 lantiq_ssc_writel(spi, data, SPI_TB); 513 lantiq_ssc_writel(spi, data, LTQ_SPI_TB);
507 tx_free--; 514 tx_free--;
508 } 515 }
509} 516}
@@ -517,7 +524,7 @@ static void rx_fifo_read_full_duplex(struct lantiq_ssc_spi *spi)
517 unsigned int rx_fill = rx_fifo_level(spi); 524 unsigned int rx_fill = rx_fifo_level(spi);
518 525
519 while (rx_fill) { 526 while (rx_fill) {
520 data = lantiq_ssc_readl(spi, SPI_RB); 527 data = lantiq_ssc_readl(spi, LTQ_SPI_RB);
521 528
522 switch (spi->bits_per_word) { 529 switch (spi->bits_per_word) {
523 case 2 ... 8: 530 case 2 ... 8:
@@ -563,9 +570,9 @@ static void rx_fifo_read_half_duplex(struct lantiq_ssc_spi *spi)
563 */ 570 */
564 while (rx_fill) { 571 while (rx_fill) {
565 if (spi->rx_todo < 4) { 572 if (spi->rx_todo < 4) {
566 rxbv = (lantiq_ssc_readl(spi, SPI_STAT) & 573 rxbv = (lantiq_ssc_readl(spi, LTQ_SPI_STAT) &
567 SPI_STAT_RXBV_M) >> SPI_STAT_RXBV_S; 574 LTQ_SPI_STAT_RXBV_M) >> LTQ_SPI_STAT_RXBV_S;
568 data = lantiq_ssc_readl(spi, SPI_RB); 575 data = lantiq_ssc_readl(spi, LTQ_SPI_RB);
569 576
570 shift = (rxbv - 1) * 8; 577 shift = (rxbv - 1) * 8;
571 rx8 = spi->rx; 578 rx8 = spi->rx;
@@ -578,7 +585,7 @@ static void rx_fifo_read_half_duplex(struct lantiq_ssc_spi *spi)
578 spi->rx++; 585 spi->rx++;
579 } 586 }
580 } else { 587 } else {
581 data = lantiq_ssc_readl(spi, SPI_RB); 588 data = lantiq_ssc_readl(spi, LTQ_SPI_RB);
582 rx32 = (u32 *) spi->rx; 589 rx32 = (u32 *) spi->rx;
583 590
584 *rx32++ = data; 591 *rx32++ = data;
@@ -603,7 +610,7 @@ static void rx_request(struct lantiq_ssc_spi *spi)
603 if (rxreq > rxreq_max) 610 if (rxreq > rxreq_max)
604 rxreq = rxreq_max; 611 rxreq = rxreq_max;
605 612
606 lantiq_ssc_writel(spi, rxreq, SPI_RXREQ); 613 lantiq_ssc_writel(spi, rxreq, LTQ_SPI_RXREQ);
607} 614}
608 615
609static irqreturn_t lantiq_ssc_xmit_interrupt(int irq, void *data) 616static irqreturn_t lantiq_ssc_xmit_interrupt(int irq, void *data)
@@ -642,26 +649,26 @@ completed:
642static irqreturn_t lantiq_ssc_err_interrupt(int irq, void *data) 649static irqreturn_t lantiq_ssc_err_interrupt(int irq, void *data)
643{ 650{
644 struct lantiq_ssc_spi *spi = data; 651 struct lantiq_ssc_spi *spi = data;
645 u32 stat = lantiq_ssc_readl(spi, SPI_STAT); 652 u32 stat = lantiq_ssc_readl(spi, LTQ_SPI_STAT);
646 653
647 if (!(stat & SPI_STAT_ERRORS)) 654 if (!(stat & LTQ_SPI_STAT_ERRORS))
648 return IRQ_NONE; 655 return IRQ_NONE;
649 656
650 if (stat & SPI_STAT_RUE) 657 if (stat & LTQ_SPI_STAT_RUE)
651 dev_err(spi->dev, "receive underflow error\n"); 658 dev_err(spi->dev, "receive underflow error\n");
652 if (stat & SPI_STAT_TUE) 659 if (stat & LTQ_SPI_STAT_TUE)
653 dev_err(spi->dev, "transmit underflow error\n"); 660 dev_err(spi->dev, "transmit underflow error\n");
654 if (stat & SPI_STAT_AE) 661 if (stat & LTQ_SPI_STAT_AE)
655 dev_err(spi->dev, "abort error\n"); 662 dev_err(spi->dev, "abort error\n");
656 if (stat & SPI_STAT_RE) 663 if (stat & LTQ_SPI_STAT_RE)
657 dev_err(spi->dev, "receive overflow error\n"); 664 dev_err(spi->dev, "receive overflow error\n");
658 if (stat & SPI_STAT_TE) 665 if (stat & LTQ_SPI_STAT_TE)
659 dev_err(spi->dev, "transmit overflow error\n"); 666 dev_err(spi->dev, "transmit overflow error\n");
660 if (stat & SPI_STAT_ME) 667 if (stat & LTQ_SPI_STAT_ME)
661 dev_err(spi->dev, "mode error\n"); 668 dev_err(spi->dev, "mode error\n");
662 669
663 /* Clear error flags */ 670 /* Clear error flags */
664 lantiq_ssc_maskl(spi, 0, SPI_WHBSTATE_CLR_ERRORS, SPI_WHBSTATE); 671 lantiq_ssc_maskl(spi, 0, LTQ_SPI_WHBSTATE_CLR_ERRORS, LTQ_SPI_WHBSTATE);
665 672
666 /* set bad status so it can be retried */ 673 /* set bad status so it can be retried */
667 if (spi->master->cur_msg) 674 if (spi->master->cur_msg)
@@ -721,9 +728,9 @@ static void lantiq_ssc_bussy_work(struct work_struct *work)
721 728
722 end = jiffies + msecs_to_jiffies(timeout); 729 end = jiffies + msecs_to_jiffies(timeout);
723 do { 730 do {
724 u32 stat = lantiq_ssc_readl(spi, SPI_STAT); 731 u32 stat = lantiq_ssc_readl(spi, LTQ_SPI_STAT);
725 732
726 if (!(stat & SPI_STAT_BSY)) { 733 if (!(stat & LTQ_SPI_STAT_BSY)) {
727 spi_finalize_current_transfer(spi->master); 734 spi_finalize_current_transfer(spi->master);
728 return; 735 return;
729 } 736 }
@@ -755,9 +762,9 @@ static void lantiq_ssc_set_cs(struct spi_device *spidev, bool enable)
755 if (!!(spidev->mode & SPI_CS_HIGH) == enable) 762 if (!!(spidev->mode & SPI_CS_HIGH) == enable)
756 fgpo = (1 << (cs - spi->base_cs)); 763 fgpo = (1 << (cs - spi->base_cs));
757 else 764 else
758 fgpo = (1 << (cs - spi->base_cs + SPI_FGPO_SETOUTN_S)); 765 fgpo = (1 << (cs - spi->base_cs + LTQ_SPI_FGPO_SETOUTN_S));
759 766
760 lantiq_ssc_writel(spi, fgpo, SPI_FPGO); 767 lantiq_ssc_writel(spi, fgpo, LTQ_SPI_FPGO);
761} 768}
762 769
763static int lantiq_ssc_transfer_one(struct spi_master *master, 770static int lantiq_ssc_transfer_one(struct spi_master *master,
@@ -772,13 +779,13 @@ static int lantiq_ssc_transfer_one(struct spi_master *master,
772} 779}
773 780
774static const struct lantiq_ssc_hwcfg lantiq_ssc_xway = { 781static const struct lantiq_ssc_hwcfg lantiq_ssc_xway = {
775 .irnen_r = SPI_IRNEN_R_XWAY, 782 .irnen_r = LTQ_SPI_IRNEN_R_XWAY,
776 .irnen_t = SPI_IRNEN_T_XWAY, 783 .irnen_t = LTQ_SPI_IRNEN_T_XWAY,
777}; 784};
778 785
779static const struct lantiq_ssc_hwcfg lantiq_ssc_xrx = { 786static const struct lantiq_ssc_hwcfg lantiq_ssc_xrx = {
780 .irnen_r = SPI_IRNEN_R_XRX, 787 .irnen_r = LTQ_SPI_IRNEN_R_XRX,
781 .irnen_t = SPI_IRNEN_T_XRX, 788 .irnen_t = LTQ_SPI_IRNEN_T_XRX,
782}; 789};
783 790
784static const struct of_device_id lantiq_ssc_match[] = { 791static const struct of_device_id lantiq_ssc_match[] = {
@@ -814,21 +821,21 @@ static int lantiq_ssc_probe(struct platform_device *pdev)
814 return -ENXIO; 821 return -ENXIO;
815 } 822 }
816 823
817 rx_irq = platform_get_irq_byname(pdev, SPI_RX_IRQ_NAME); 824 rx_irq = platform_get_irq_byname(pdev, LTQ_SPI_RX_IRQ_NAME);
818 if (rx_irq < 0) { 825 if (rx_irq < 0) {
819 dev_err(dev, "failed to get %s\n", SPI_RX_IRQ_NAME); 826 dev_err(dev, "failed to get %s\n", LTQ_SPI_RX_IRQ_NAME);
820 return -ENXIO; 827 return -ENXIO;
821 } 828 }
822 829
823 tx_irq = platform_get_irq_byname(pdev, SPI_TX_IRQ_NAME); 830 tx_irq = platform_get_irq_byname(pdev, LTQ_SPI_TX_IRQ_NAME);
824 if (tx_irq < 0) { 831 if (tx_irq < 0) {
825 dev_err(dev, "failed to get %s\n", SPI_TX_IRQ_NAME); 832 dev_err(dev, "failed to get %s\n", LTQ_SPI_TX_IRQ_NAME);
826 return -ENXIO; 833 return -ENXIO;
827 } 834 }
828 835
829 err_irq = platform_get_irq_byname(pdev, SPI_ERR_IRQ_NAME); 836 err_irq = platform_get_irq_byname(pdev, LTQ_SPI_ERR_IRQ_NAME);
830 if (err_irq < 0) { 837 if (err_irq < 0) {
831 dev_err(dev, "failed to get %s\n", SPI_ERR_IRQ_NAME); 838 dev_err(dev, "failed to get %s\n", LTQ_SPI_ERR_IRQ_NAME);
832 return -ENXIO; 839 return -ENXIO;
833 } 840 }
834 841
@@ -849,17 +856,17 @@ static int lantiq_ssc_probe(struct platform_device *pdev)
849 } 856 }
850 857
851 err = devm_request_irq(dev, rx_irq, lantiq_ssc_xmit_interrupt, 858 err = devm_request_irq(dev, rx_irq, lantiq_ssc_xmit_interrupt,
852 0, SPI_RX_IRQ_NAME, spi); 859 0, LTQ_SPI_RX_IRQ_NAME, spi);
853 if (err) 860 if (err)
854 goto err_master_put; 861 goto err_master_put;
855 862
856 err = devm_request_irq(dev, tx_irq, lantiq_ssc_xmit_interrupt, 863 err = devm_request_irq(dev, tx_irq, lantiq_ssc_xmit_interrupt,
857 0, SPI_TX_IRQ_NAME, spi); 864 0, LTQ_SPI_TX_IRQ_NAME, spi);
858 if (err) 865 if (err)
859 goto err_master_put; 866 goto err_master_put;
860 867
861 err = devm_request_irq(dev, err_irq, lantiq_ssc_err_interrupt, 868 err = devm_request_irq(dev, err_irq, lantiq_ssc_err_interrupt,
862 0, SPI_ERR_IRQ_NAME, spi); 869 0, LTQ_SPI_ERR_IRQ_NAME, spi);
863 if (err) 870 if (err)
864 goto err_master_put; 871 goto err_master_put;
865 872
@@ -916,11 +923,11 @@ static int lantiq_ssc_probe(struct platform_device *pdev)
916 } 923 }
917 INIT_WORK(&spi->work, lantiq_ssc_bussy_work); 924 INIT_WORK(&spi->work, lantiq_ssc_bussy_work);
918 925
919 id = lantiq_ssc_readl(spi, SPI_ID); 926 id = lantiq_ssc_readl(spi, LTQ_SPI_ID);
920 spi->tx_fifo_size = (id & SPI_ID_TXFS_M) >> SPI_ID_TXFS_S; 927 spi->tx_fifo_size = (id & LTQ_SPI_ID_TXFS_M) >> LTQ_SPI_ID_TXFS_S;
921 spi->rx_fifo_size = (id & SPI_ID_RXFS_M) >> SPI_ID_RXFS_S; 928 spi->rx_fifo_size = (id & LTQ_SPI_ID_RXFS_M) >> LTQ_SPI_ID_RXFS_S;
922 supports_dma = (id & SPI_ID_CFG_M) >> SPI_ID_CFG_S; 929 supports_dma = (id & LTQ_SPI_ID_CFG_M) >> LTQ_SPI_ID_CFG_S;
923 revision = id & SPI_ID_REV_M; 930 revision = id & LTQ_SPI_ID_REV_M;
924 931
925 lantiq_ssc_hw_init(spi); 932 lantiq_ssc_hw_init(spi);
926 933
@@ -952,8 +959,8 @@ static int lantiq_ssc_remove(struct platform_device *pdev)
952{ 959{
953 struct lantiq_ssc_spi *spi = platform_get_drvdata(pdev); 960 struct lantiq_ssc_spi *spi = platform_get_drvdata(pdev);
954 961
955 lantiq_ssc_writel(spi, 0, SPI_IRNEN); 962 lantiq_ssc_writel(spi, 0, LTQ_SPI_IRNEN);
956 lantiq_ssc_writel(spi, 0, SPI_CLC); 963 lantiq_ssc_writel(spi, 0, LTQ_SPI_CLC);
957 rx_fifo_flush(spi); 964 rx_fifo_flush(spi);
958 tx_fifo_flush(spi); 965 tx_fifo_flush(spi);
959 hw_enter_config_mode(spi); 966 hw_enter_config_mode(spi);