diff options
author | Mark Brown <broonie@kernel.org> | 2014-09-13 12:03:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-13 12:03:05 -0400 |
commit | 551f6a58d496a99702088ac762f247e04d8bfff9 (patch) | |
tree | 95610bb3eae95bd98d1c80bcd161be67c33a81f7 /drivers/spi | |
parent | 197e96b4d80554a66aff34df5406b4c2d26f0111 (diff) | |
parent | a2cea9831e7df2bd21ade3c02be4a94146e1645b (diff) |
Merge branch 'topic/checkpatch' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-davinci.c | 8 | ||||
-rw-r--r-- | drivers/spi/spi-dw.c | 16 | ||||
-rw-r--r-- | drivers/spi/spi-ep93xx.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi-mxs.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-orion.c | 5 | ||||
-rw-r--r-- | drivers/spi/spi-tegra114.c | 9 | ||||
-rw-r--r-- | drivers/spi/spi-tegra20-sflash.c | 3 | ||||
-rw-r--r-- | drivers/spi/spi-txx9.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-xtensa-xtfpga.c | 1 |
9 files changed, 36 insertions, 13 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 276a3884fb3c..514852cb7b3c 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
@@ -167,8 +167,10 @@ static void davinci_spi_rx_buf_u16(u32 data, struct davinci_spi *dspi) | |||
167 | static u32 davinci_spi_tx_buf_u8(struct davinci_spi *dspi) | 167 | static u32 davinci_spi_tx_buf_u8(struct davinci_spi *dspi) |
168 | { | 168 | { |
169 | u32 data = 0; | 169 | u32 data = 0; |
170 | |||
170 | if (dspi->tx) { | 171 | if (dspi->tx) { |
171 | const u8 *tx = dspi->tx; | 172 | const u8 *tx = dspi->tx; |
173 | |||
172 | data = *tx++; | 174 | data = *tx++; |
173 | dspi->tx = tx; | 175 | dspi->tx = tx; |
174 | } | 176 | } |
@@ -178,8 +180,10 @@ static u32 davinci_spi_tx_buf_u8(struct davinci_spi *dspi) | |||
178 | static u32 davinci_spi_tx_buf_u16(struct davinci_spi *dspi) | 180 | static u32 davinci_spi_tx_buf_u16(struct davinci_spi *dspi) |
179 | { | 181 | { |
180 | u32 data = 0; | 182 | u32 data = 0; |
183 | |||
181 | if (dspi->tx) { | 184 | if (dspi->tx) { |
182 | const u16 *tx = dspi->tx; | 185 | const u16 *tx = dspi->tx; |
186 | |||
183 | data = *tx++; | 187 | data = *tx++; |
184 | dspi->tx = tx; | 188 | dspi->tx = tx; |
185 | } | 189 | } |
@@ -985,8 +989,8 @@ static int davinci_spi_probe(struct platform_device *pdev) | |||
985 | goto free_clk; | 989 | goto free_clk; |
986 | 990 | ||
987 | dev_info(&pdev->dev, "DMA: supported\n"); | 991 | dev_info(&pdev->dev, "DMA: supported\n"); |
988 | dev_info(&pdev->dev, "DMA: RX channel: %pa, TX channel: %pa, " | 992 | dev_info(&pdev->dev, "DMA: RX channel: %pa, TX channel: %pa, event queue: %d\n", |
989 | "event queue: %d\n", &dma_rx_chan, &dma_tx_chan, | 993 | &dma_rx_chan, &dma_tx_chan, |
990 | pdata->dma_event_q); | 994 | pdata->dma_event_q); |
991 | } | 995 | } |
992 | 996 | ||
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 6e55334c239a..fdb5a6d1c8c6 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c | |||
@@ -131,8 +131,7 @@ static int mrst_spi_debugfs_init(struct dw_spi *dws) | |||
131 | 131 | ||
132 | static void mrst_spi_debugfs_remove(struct dw_spi *dws) | 132 | static void mrst_spi_debugfs_remove(struct dw_spi *dws) |
133 | { | 133 | { |
134 | if (dws->debugfs) | 134 | debugfs_remove_recursive(dws->debugfs); |
135 | debugfs_remove_recursive(dws->debugfs); | ||
136 | } | 135 | } |
137 | 136 | ||
138 | #else | 137 | #else |
@@ -173,7 +172,7 @@ static inline u32 rx_max(struct dw_spi *dws) | |||
173 | { | 172 | { |
174 | u32 rx_left = (dws->rx_end - dws->rx) / dws->n_bytes; | 173 | u32 rx_left = (dws->rx_end - dws->rx) / dws->n_bytes; |
175 | 174 | ||
176 | return min(rx_left, (u32)dw_readw(dws, DW_SPI_RXFLR)); | 175 | return min_t(u32, rx_left, dw_readw(dws, DW_SPI_RXFLR)); |
177 | } | 176 | } |
178 | 177 | ||
179 | static void dw_writer(struct dw_spi *dws) | 178 | static void dw_writer(struct dw_spi *dws) |
@@ -224,8 +223,9 @@ static void *next_transfer(struct dw_spi *dws) | |||
224 | struct spi_transfer, | 223 | struct spi_transfer, |
225 | transfer_list); | 224 | transfer_list); |
226 | return RUNNING_STATE; | 225 | return RUNNING_STATE; |
227 | } else | 226 | } |
228 | return DONE_STATE; | 227 | |
228 | return DONE_STATE; | ||
229 | } | 229 | } |
230 | 230 | ||
231 | /* | 231 | /* |
@@ -467,10 +467,12 @@ static void pump_transfers(unsigned long data) | |||
467 | */ | 467 | */ |
468 | if (!dws->dma_mapped && !chip->poll_mode) { | 468 | if (!dws->dma_mapped && !chip->poll_mode) { |
469 | int templen = dws->len / dws->n_bytes; | 469 | int templen = dws->len / dws->n_bytes; |
470 | |||
470 | txint_level = dws->fifo_len / 2; | 471 | txint_level = dws->fifo_len / 2; |
471 | txint_level = (templen > txint_level) ? txint_level : templen; | 472 | txint_level = (templen > txint_level) ? txint_level : templen; |
472 | 473 | ||
473 | imask |= SPI_INT_TXEI | SPI_INT_TXOI | SPI_INT_RXUI | SPI_INT_RXOI; | 474 | imask |= SPI_INT_TXEI | SPI_INT_TXOI | |
475 | SPI_INT_RXUI | SPI_INT_RXOI; | ||
474 | dws->transfer_handler = interrupt_transfer; | 476 | dws->transfer_handler = interrupt_transfer; |
475 | } | 477 | } |
476 | 478 | ||
@@ -511,7 +513,6 @@ static void pump_transfers(unsigned long data) | |||
511 | 513 | ||
512 | early_exit: | 514 | early_exit: |
513 | giveback(dws); | 515 | giveback(dws); |
514 | return; | ||
515 | } | 516 | } |
516 | 517 | ||
517 | static int dw_spi_transfer_one_message(struct spi_master *master, | 518 | static int dw_spi_transfer_one_message(struct spi_master *master, |
@@ -615,6 +616,7 @@ static void spi_hw_init(struct dw_spi *dws) | |||
615 | */ | 616 | */ |
616 | if (!dws->fifo_len) { | 617 | if (!dws->fifo_len) { |
617 | u32 fifo; | 618 | u32 fifo; |
619 | |||
618 | for (fifo = 2; fifo <= 257; fifo++) { | 620 | for (fifo = 2; fifo <= 257; fifo++) { |
619 | dw_writew(dws, DW_SPI_TXFLTR, fifo); | 621 | dw_writew(dws, DW_SPI_TXFLTR, fifo); |
620 | if (fifo != dw_readw(dws, DW_SPI_TXFLTR)) | 622 | if (fifo != dw_readw(dws, DW_SPI_TXFLTR)) |
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index 2f675d32df0e..bf9728773247 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -266,6 +266,7 @@ static int ep93xx_spi_setup(struct spi_device *spi) | |||
266 | 266 | ||
267 | if (chip->ops && chip->ops->setup) { | 267 | if (chip->ops && chip->ops->setup) { |
268 | int ret = chip->ops->setup(spi); | 268 | int ret = chip->ops->setup(spi); |
269 | |||
269 | if (ret) { | 270 | if (ret) { |
270 | kfree(chip); | 271 | kfree(chip); |
271 | return ret; | 272 | return ret; |
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 2884f0c2f5f0..c3f8d3a22472 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c | |||
@@ -154,12 +154,14 @@ static int mxs_ssp_wait(struct mxs_spi *spi, int offset, int mask, bool set) | |||
154 | static void mxs_ssp_dma_irq_callback(void *param) | 154 | static void mxs_ssp_dma_irq_callback(void *param) |
155 | { | 155 | { |
156 | struct mxs_spi *spi = param; | 156 | struct mxs_spi *spi = param; |
157 | |||
157 | complete(&spi->c); | 158 | complete(&spi->c); |
158 | } | 159 | } |
159 | 160 | ||
160 | static irqreturn_t mxs_ssp_irq_handler(int irq, void *dev_id) | 161 | static irqreturn_t mxs_ssp_irq_handler(int irq, void *dev_id) |
161 | { | 162 | { |
162 | struct mxs_ssp *ssp = dev_id; | 163 | struct mxs_ssp *ssp = dev_id; |
164 | |||
163 | dev_err(ssp->dev, "%s[%i] CTRL1=%08x STATUS=%08x\n", | 165 | dev_err(ssp->dev, "%s[%i] CTRL1=%08x STATUS=%08x\n", |
164 | __func__, __LINE__, | 166 | __func__, __LINE__, |
165 | readl(ssp->base + HW_SSP_CTRL1(ssp)), | 167 | readl(ssp->base + HW_SSP_CTRL1(ssp)), |
@@ -189,7 +191,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, | |||
189 | if (!len) | 191 | if (!len) |
190 | return -EINVAL; | 192 | return -EINVAL; |
191 | 193 | ||
192 | dma_xfer = kzalloc(sizeof(*dma_xfer) * sgs, GFP_KERNEL); | 194 | dma_xfer = kcalloc(sgs, sizeof(*dma_xfer), GFP_KERNEL); |
193 | if (!dma_xfer) | 195 | if (!dma_xfer) |
194 | return -ENOMEM; | 196 | return -ENOMEM; |
195 | 197 | ||
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index c4675fa8b645..345e7d61c399 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c | |||
@@ -179,8 +179,8 @@ static inline int orion_spi_wait_till_ready(struct orion_spi *orion_spi) | |||
179 | for (i = 0; i < ORION_SPI_WAIT_RDY_MAX_LOOP; i++) { | 179 | for (i = 0; i < ORION_SPI_WAIT_RDY_MAX_LOOP; i++) { |
180 | if (readl(spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG))) | 180 | if (readl(spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG))) |
181 | return 1; | 181 | return 1; |
182 | else | 182 | |
183 | udelay(1); | 183 | udelay(1); |
184 | } | 184 | } |
185 | 185 | ||
186 | return -1; | 186 | return -1; |
@@ -360,6 +360,7 @@ static int orion_spi_probe(struct platform_device *pdev) | |||
360 | master->bus_num = pdev->id; | 360 | master->bus_num = pdev->id; |
361 | if (pdev->dev.of_node) { | 361 | if (pdev->dev.of_node) { |
362 | u32 cell_index; | 362 | u32 cell_index; |
363 | |||
363 | if (!of_property_read_u32(pdev->dev.of_node, "cell-index", | 364 | if (!of_property_read_u32(pdev->dev.of_node, "cell-index", |
364 | &cell_index)) | 365 | &cell_index)) |
365 | master->bus_num = cell_index; | 366 | master->bus_num = cell_index; |
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index e4a85ada861d..795bcbc0131b 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c | |||
@@ -302,6 +302,7 @@ static unsigned tegra_spi_fill_tx_fifo_from_client_txbuf( | |||
302 | max_n_32bit = DIV_ROUND_UP(nbytes, 4); | 302 | max_n_32bit = DIV_ROUND_UP(nbytes, 4); |
303 | for (count = 0; count < max_n_32bit; count++) { | 303 | for (count = 0; count < max_n_32bit; count++) { |
304 | u32 x = 0; | 304 | u32 x = 0; |
305 | |||
305 | for (i = 0; (i < 4) && nbytes; i++, nbytes--) | 306 | for (i = 0; (i < 4) && nbytes; i++, nbytes--) |
306 | x |= (u32)(*tx_buf++) << (i * 8); | 307 | x |= (u32)(*tx_buf++) << (i * 8); |
307 | tegra_spi_writel(tspi, x, SPI_TX_FIFO); | 308 | tegra_spi_writel(tspi, x, SPI_TX_FIFO); |
@@ -312,6 +313,7 @@ static unsigned tegra_spi_fill_tx_fifo_from_client_txbuf( | |||
312 | nbytes = written_words * tspi->bytes_per_word; | 313 | nbytes = written_words * tspi->bytes_per_word; |
313 | for (count = 0; count < max_n_32bit; count++) { | 314 | for (count = 0; count < max_n_32bit; count++) { |
314 | u32 x = 0; | 315 | u32 x = 0; |
316 | |||
315 | for (i = 0; nbytes && (i < tspi->bytes_per_word); | 317 | for (i = 0; nbytes && (i < tspi->bytes_per_word); |
316 | i++, nbytes--) | 318 | i++, nbytes--) |
317 | x |= (u32)(*tx_buf++) << (i * 8); | 319 | x |= (u32)(*tx_buf++) << (i * 8); |
@@ -338,6 +340,7 @@ static unsigned int tegra_spi_read_rx_fifo_to_client_rxbuf( | |||
338 | len = tspi->curr_dma_words * tspi->bytes_per_word; | 340 | len = tspi->curr_dma_words * tspi->bytes_per_word; |
339 | for (count = 0; count < rx_full_count; count++) { | 341 | for (count = 0; count < rx_full_count; count++) { |
340 | u32 x = tegra_spi_readl(tspi, SPI_RX_FIFO); | 342 | u32 x = tegra_spi_readl(tspi, SPI_RX_FIFO); |
343 | |||
341 | for (i = 0; len && (i < 4); i++, len--) | 344 | for (i = 0; len && (i < 4); i++, len--) |
342 | *rx_buf++ = (x >> i*8) & 0xFF; | 345 | *rx_buf++ = (x >> i*8) & 0xFF; |
343 | } | 346 | } |
@@ -345,8 +348,10 @@ static unsigned int tegra_spi_read_rx_fifo_to_client_rxbuf( | |||
345 | read_words += tspi->curr_dma_words; | 348 | read_words += tspi->curr_dma_words; |
346 | } else { | 349 | } else { |
347 | u32 rx_mask = ((u32)1 << t->bits_per_word) - 1; | 350 | u32 rx_mask = ((u32)1 << t->bits_per_word) - 1; |
351 | |||
348 | for (count = 0; count < rx_full_count; count++) { | 352 | for (count = 0; count < rx_full_count; count++) { |
349 | u32 x = tegra_spi_readl(tspi, SPI_RX_FIFO) & rx_mask; | 353 | u32 x = tegra_spi_readl(tspi, SPI_RX_FIFO) & rx_mask; |
354 | |||
350 | for (i = 0; (i < tspi->bytes_per_word); i++) | 355 | for (i = 0; (i < tspi->bytes_per_word); i++) |
351 | *rx_buf++ = (x >> (i*8)) & 0xFF; | 356 | *rx_buf++ = (x >> (i*8)) & 0xFF; |
352 | } | 357 | } |
@@ -365,6 +370,7 @@ static void tegra_spi_copy_client_txbuf_to_spi_txbuf( | |||
365 | 370 | ||
366 | if (tspi->is_packed) { | 371 | if (tspi->is_packed) { |
367 | unsigned len = tspi->curr_dma_words * tspi->bytes_per_word; | 372 | unsigned len = tspi->curr_dma_words * tspi->bytes_per_word; |
373 | |||
368 | memcpy(tspi->tx_dma_buf, t->tx_buf + tspi->cur_pos, len); | 374 | memcpy(tspi->tx_dma_buf, t->tx_buf + tspi->cur_pos, len); |
369 | } else { | 375 | } else { |
370 | unsigned int i; | 376 | unsigned int i; |
@@ -374,6 +380,7 @@ static void tegra_spi_copy_client_txbuf_to_spi_txbuf( | |||
374 | 380 | ||
375 | for (count = 0; count < tspi->curr_dma_words; count++) { | 381 | for (count = 0; count < tspi->curr_dma_words; count++) { |
376 | u32 x = 0; | 382 | u32 x = 0; |
383 | |||
377 | for (i = 0; consume && (i < tspi->bytes_per_word); | 384 | for (i = 0; consume && (i < tspi->bytes_per_word); |
378 | i++, consume--) | 385 | i++, consume--) |
379 | x |= (u32)(*tx_buf++) << (i * 8); | 386 | x |= (u32)(*tx_buf++) << (i * 8); |
@@ -396,6 +403,7 @@ static void tegra_spi_copy_spi_rxbuf_to_client_rxbuf( | |||
396 | 403 | ||
397 | if (tspi->is_packed) { | 404 | if (tspi->is_packed) { |
398 | unsigned len = tspi->curr_dma_words * tspi->bytes_per_word; | 405 | unsigned len = tspi->curr_dma_words * tspi->bytes_per_word; |
406 | |||
399 | memcpy(t->rx_buf + tspi->cur_rx_pos, tspi->rx_dma_buf, len); | 407 | memcpy(t->rx_buf + tspi->cur_rx_pos, tspi->rx_dma_buf, len); |
400 | } else { | 408 | } else { |
401 | unsigned int i; | 409 | unsigned int i; |
@@ -405,6 +413,7 @@ static void tegra_spi_copy_spi_rxbuf_to_client_rxbuf( | |||
405 | 413 | ||
406 | for (count = 0; count < tspi->curr_dma_words; count++) { | 414 | for (count = 0; count < tspi->curr_dma_words; count++) { |
407 | u32 x = tspi->rx_dma_buf[count] & rx_mask; | 415 | u32 x = tspi->rx_dma_buf[count] & rx_mask; |
416 | |||
408 | for (i = 0; (i < tspi->bytes_per_word); i++) | 417 | for (i = 0; (i < tspi->bytes_per_word); i++) |
409 | *rx_buf++ = (x >> (i*8)) & 0xFF; | 418 | *rx_buf++ = (x >> (i*8)) & 0xFF; |
410 | } | 419 | } |
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 3548ce25c08f..cd66fe7b78a9 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c | |||
@@ -99,7 +99,7 @@ | |||
99 | #define SPI_TX_TRIG_MASK (0x3 << 16) | 99 | #define SPI_TX_TRIG_MASK (0x3 << 16) |
100 | #define SPI_TX_TRIG_1W (0x0 << 16) | 100 | #define SPI_TX_TRIG_1W (0x0 << 16) |
101 | #define SPI_TX_TRIG_4W (0x1 << 16) | 101 | #define SPI_TX_TRIG_4W (0x1 << 16) |
102 | #define SPI_DMA_BLK_COUNT(count) (((count) - 1) & 0xFFFF); | 102 | #define SPI_DMA_BLK_COUNT(count) (((count) - 1) & 0xFFFF) |
103 | 103 | ||
104 | #define SPI_TX_FIFO 0x10 | 104 | #define SPI_TX_FIFO 0x10 |
105 | #define SPI_RX_FIFO 0x20 | 105 | #define SPI_RX_FIFO 0x20 |
@@ -221,6 +221,7 @@ static int tegra_sflash_read_rx_fifo_to_client_rxbuf( | |||
221 | while (!(status & SPI_RXF_EMPTY)) { | 221 | while (!(status & SPI_RXF_EMPTY)) { |
222 | int i; | 222 | int i; |
223 | u32 x = tegra_sflash_readl(tsd, SPI_RX_FIFO); | 223 | u32 x = tegra_sflash_readl(tsd, SPI_RX_FIFO); |
224 | |||
224 | for (i = 0; (i < tsd->bytes_per_word); i++) | 225 | for (i = 0; (i < tsd->bytes_per_word); i++) |
225 | *rx_buf++ = (x >> (i*8)) & 0xFF; | 226 | *rx_buf++ = (x >> (i*8)) & 0xFF; |
226 | read_words++; | 227 | read_words++; |
diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index 5f183baa91a9..2501a8373e89 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c | |||
@@ -97,6 +97,7 @@ static void txx9spi_cs_func(struct spi_device *spi, struct txx9spi *c, | |||
97 | int on, unsigned int cs_delay) | 97 | int on, unsigned int cs_delay) |
98 | { | 98 | { |
99 | int val = (spi->mode & SPI_CS_HIGH) ? on : !on; | 99 | int val = (spi->mode & SPI_CS_HIGH) ? on : !on; |
100 | |||
100 | if (on) { | 101 | if (on) { |
101 | /* deselect the chip with cs_change hint in last transfer */ | 102 | /* deselect the chip with cs_change hint in last transfer */ |
102 | if (c->last_chipselect >= 0) | 103 | if (c->last_chipselect >= 0) |
@@ -188,6 +189,7 @@ static void txx9spi_work_one(struct txx9spi *c, struct spi_message *m) | |||
188 | if (prev_speed_hz != speed_hz | 189 | if (prev_speed_hz != speed_hz |
189 | || prev_bits_per_word != bits_per_word) { | 190 | || prev_bits_per_word != bits_per_word) { |
190 | int n = DIV_ROUND_UP(c->baseclk, speed_hz) - 1; | 191 | int n = DIV_ROUND_UP(c->baseclk, speed_hz) - 1; |
192 | |||
191 | n = clamp(n, SPI_MIN_DIVIDER, SPI_MAX_DIVIDER); | 193 | n = clamp(n, SPI_MIN_DIVIDER, SPI_MAX_DIVIDER); |
192 | /* enter config mode */ | 194 | /* enter config mode */ |
193 | txx9spi_wr(c, mcr | TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR, | 195 | txx9spi_wr(c, mcr | TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR, |
diff --git a/drivers/spi/spi-xtensa-xtfpga.c b/drivers/spi/spi-xtensa-xtfpga.c index 41e158187f9d..0dc5df5233a9 100644 --- a/drivers/spi/spi-xtensa-xtfpga.c +++ b/drivers/spi/spi-xtensa-xtfpga.c | |||
@@ -46,6 +46,7 @@ static inline unsigned int xtfpga_spi_read32(const struct xtfpga_spi *spi, | |||
46 | static inline void xtfpga_spi_wait_busy(struct xtfpga_spi *xspi) | 46 | static inline void xtfpga_spi_wait_busy(struct xtfpga_spi *xspi) |
47 | { | 47 | { |
48 | unsigned i; | 48 | unsigned i; |
49 | |||
49 | for (i = 0; xtfpga_spi_read32(xspi, XTFPGA_SPI_BUSY) && | 50 | for (i = 0; xtfpga_spi_read32(xspi, XTFPGA_SPI_BUSY) && |
50 | i < BUSY_WAIT_US; ++i) | 51 | i < BUSY_WAIT_US; ++i) |
51 | udelay(1); | 52 | udelay(1); |