Skip to content

Commit 513525e

Browse files
andy-shevbroonie
authored andcommitted
spi: pxa2xx: Drop struct pxa2xx_spi_chip
No more users. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4091770 commit 513525e

File tree

3 files changed

+2
-46
lines changed

3 files changed

+2
-46
lines changed

drivers/spi/spi-pxa2xx-dma.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,11 @@ int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip,
231231
u8 bits_per_word, u32 *burst_code,
232232
u32 *threshold)
233233
{
234-
struct pxa2xx_spi_chip *chip_info = spi->controller_data;
235234
struct driver_data *drv_data = spi_controller_get_devdata(spi->controller);
236235
u32 dma_burst_size = drv_data->controller_info->dma_burst_size;
237236

238-
/*
239-
* If the DMA burst size is given in chip_info we use that,
240-
* otherwise we use the default. Also we use the default FIFO
241-
* thresholds for now.
242-
*/
243-
*burst_code = chip_info ? chip_info->dma_burst_size : dma_burst_size;
237+
/* We use the default the DMA burst size and FIFO thresholds for now */
238+
*burst_code = dma_burst_size;
244239
*threshold = SSCR1_RxTresh(RX_THRESH_DFLT)
245240
| SSCR1_TxTresh(TX_THRESH_DFLT);
246241

drivers/spi/spi-pxa2xx.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,6 @@ static int pxa2xx_spi_unprepare_transfer(struct spi_controller *controller)
11541154

11551155
static int setup(struct spi_device *spi)
11561156
{
1157-
struct pxa2xx_spi_chip *chip_info;
11581157
struct chip_data *chip;
11591158
const struct lpss_config *config;
11601159
struct driver_data *drv_data =
@@ -1218,25 +1217,6 @@ static int setup(struct spi_device *spi)
12181217
chip->timeout = TIMOUT_DFLT;
12191218
}
12201219

1221-
/*
1222-
* Protocol drivers may change the chip settings, so...
1223-
* if chip_info exists, use it.
1224-
*/
1225-
chip_info = spi->controller_data;
1226-
1227-
/* chip_info isn't always needed */
1228-
if (chip_info) {
1229-
if (chip_info->timeout)
1230-
chip->timeout = chip_info->timeout;
1231-
if (chip_info->tx_threshold)
1232-
tx_thres = chip_info->tx_threshold;
1233-
if (chip_info->tx_hi_threshold)
1234-
tx_hi_thres = chip_info->tx_hi_threshold;
1235-
if (chip_info->rx_threshold)
1236-
rx_thres = chip_info->rx_threshold;
1237-
chip->dma_threshold = 0;
1238-
}
1239-
12401220
chip->cr1 = 0;
12411221
if (spi_controller_is_target(drv_data->controller)) {
12421222
chip->cr1 |= SSCR1_SCFR;
@@ -1256,11 +1236,6 @@ static int setup(struct spi_device *spi)
12561236
chip->lpss_tx_threshold = tx_thres;
12571237
}
12581238

1259-
/*
1260-
* Set DMA burst and threshold outside of chip_info path so that if
1261-
* chip_info goes away after setting chip->enable_dma, the burst and
1262-
* threshold can still respond to changes in bits_per_word.
1263-
*/
12641239
if (chip->enable_dma) {
12651240
/* Set up legal burst and threshold for DMA */
12661241
if (pxa2xx_spi_set_dma_burst_and_threshold(chip, spi,

drivers/spi/spi-pxa2xx.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,6 @@ struct pxa2xx_spi_controller {
3535
struct ssp_device ssp;
3636
};
3737

38-
/*
39-
* The controller specific data for SPI target devices
40-
* (resides in spi_board_info.controller_data),
41-
* copied to spi_device.platform_data ... mostly for
42-
* DMA tuning.
43-
*/
44-
struct pxa2xx_spi_chip {
45-
u8 tx_threshold;
46-
u8 tx_hi_threshold;
47-
u8 rx_threshold;
48-
u8 dma_burst_size;
49-
u32 timeout;
50-
};
51-
5238
struct spi_controller;
5339
struct spi_device;
5440
struct spi_transfer;

0 commit comments

Comments
 (0)