spi: pxa2xx: Drop struct pxa2xx_spi_chip
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 17 Apr 2024 10:54:33 +0000 (13:54 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 3 May 2024 02:11:35 +0000 (11:11 +0900)
No more users.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240417110334.2671228-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx-dma.c
drivers/spi/spi-pxa2xx.c
drivers/spi/spi-pxa2xx.h

index 751cb0f77b6208685d44634c2922a21cc553920b..d77279c3acd8cf6e7b57732a1b5f803cb0ff2d73 100644 (file)
@@ -231,16 +231,11 @@ int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip,
                                           u8 bits_per_word, u32 *burst_code,
                                           u32 *threshold)
 {
-       struct pxa2xx_spi_chip *chip_info = spi->controller_data;
        struct driver_data *drv_data = spi_controller_get_devdata(spi->controller);
        u32 dma_burst_size = drv_data->controller_info->dma_burst_size;
 
-       /*
-        * If the DMA burst size is given in chip_info we use that,
-        * otherwise we use the default. Also we use the default FIFO
-        * thresholds for now.
-        */
-       *burst_code = chip_info ? chip_info->dma_burst_size : dma_burst_size;
+       /* We use the default the DMA burst size and FIFO thresholds for now */
+       *burst_code = dma_burst_size;
        *threshold = SSCR1_RxTresh(RX_THRESH_DFLT)
                   | SSCR1_TxTresh(TX_THRESH_DFLT);
 
index cc0e54f8d2c37cc066fba6f0b41ccfef6d7e2e07..00aa33c937bfbaebeb2671cda5bf0ab27e2b3892 100644 (file)
@@ -1154,7 +1154,6 @@ static int pxa2xx_spi_unprepare_transfer(struct spi_controller *controller)
 
 static int setup(struct spi_device *spi)
 {
-       struct pxa2xx_spi_chip *chip_info;
        struct chip_data *chip;
        const struct lpss_config *config;
        struct driver_data *drv_data =
@@ -1218,25 +1217,6 @@ static int setup(struct spi_device *spi)
                chip->timeout = TIMOUT_DFLT;
        }
 
-       /*
-        * Protocol drivers may change the chip settings, so...
-        * if chip_info exists, use it.
-        */
-       chip_info = spi->controller_data;
-
-       /* chip_info isn't always needed */
-       if (chip_info) {
-               if (chip_info->timeout)
-                       chip->timeout = chip_info->timeout;
-               if (chip_info->tx_threshold)
-                       tx_thres = chip_info->tx_threshold;
-               if (chip_info->tx_hi_threshold)
-                       tx_hi_thres = chip_info->tx_hi_threshold;
-               if (chip_info->rx_threshold)
-                       rx_thres = chip_info->rx_threshold;
-               chip->dma_threshold = 0;
-       }
-
        chip->cr1 = 0;
        if (spi_controller_is_target(drv_data->controller)) {
                chip->cr1 |= SSCR1_SCFR;
@@ -1256,11 +1236,6 @@ static int setup(struct spi_device *spi)
                chip->lpss_tx_threshold = tx_thres;
        }
 
-       /*
-        * Set DMA burst and threshold outside of chip_info path so that if
-        * chip_info goes away after setting chip->enable_dma, the burst and
-        * threshold can still respond to changes in bits_per_word.
-        */
        if (chip->enable_dma) {
                /* Set up legal burst and threshold for DMA */
                if (pxa2xx_spi_set_dma_burst_and_threshold(chip, spi,
index f1097c96c50fc4a8736c4019cc3d12a75feaa700..ae9c99bc9f6c97ad3a1e41878ccafbf8f9c5fb70 100644 (file)
@@ -35,20 +35,6 @@ struct pxa2xx_spi_controller {
        struct ssp_device ssp;
 };
 
-/*
- * The controller specific data for SPI target devices
- * (resides in spi_board_info.controller_data),
- * copied to spi_device.platform_data ... mostly for
- * DMA tuning.
- */
-struct pxa2xx_spi_chip {
-       u8 tx_threshold;
-       u8 tx_hi_threshold;
-       u8 rx_threshold;
-       u8 dma_burst_size;
-       u32 timeout;
-};
-
 struct spi_controller;
 struct spi_device;
 struct spi_transfer;