From 4f1474b3b786305d77c93c232f65d40018043e9f Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Tue, 15 Sep 2015 16:26:26 +0300 Subject: spi: pxa2xx: Remove two variables from struct chip_data There is no need to carry spi->max_speed_hz and spi->bits_per_word from setup() in "struct chip_data" since pump_transfers() will anyway take the transfer parameters from "struct spi_transfer". This is since SPI core validates both bits_per_word and speed_hz transfer parameters and defaults to spi->bits_per_word and spi->max_speed_hz in case these per transfer parameters are not set. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- drivers/spi/spi-pxa2xx.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/spi/spi-pxa2xx.h') diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 0a9b6390a817..0875e985b90d 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -98,8 +98,6 @@ struct chip_data { u16 lpss_rx_threshold; u16 lpss_tx_threshold; u8 enable_dma; - u8 bits_per_word; - u32 speed_hz; union { int gpio_cs; unsigned int frm; -- cgit v1.2.3 From b69d42b5c44bcfc1c73fe185d4644487f1bd3193 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Tue, 15 Sep 2015 16:26:28 +0300 Subject: spi: pxa2xx: Remove cr0 variable from struct chip_data There hasn't been need to carry chip->cr0 after SPI core started to validate speed_hz and bits_per_word transfer parameters. That effectively caused that pump_transfers() always recalculated it and practically chip->cr0 is used locally in setup() for debug prints only. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- drivers/spi/spi-pxa2xx.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/spi/spi-pxa2xx.h') diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 0875e985b90d..b91bda26bfa8 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -86,7 +86,6 @@ struct driver_data { }; struct chip_data { - u32 cr0; u32 cr1; u32 dds_rate; u32 psp; -- cgit v1.2.3 From 0eca7cf2696506006463b9d67bb6110c82d3e064 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Fri, 25 Sep 2015 10:27:17 +0300 Subject: spi: pxa2xx: Set the max_speed_hz of the master Carry input clock of the controller in max_speed_hz of struct spi_master instead of in own driver data. They mean the same thing and more over now the max_speed_hz is not even set here. As an added bonus this allows SPI core to validate that transfer speed is not beyond the maximum input clock. This is not a problem in spi-pxa2xx as the driver doesn't use transfer speed parameter directly but via input clock divider calculation which will top at divide by one. However it's better to validate speed before passing it here. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- drivers/spi/spi-pxa2xx.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/spi/spi-pxa2xx.h') diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index b91bda26bfa8..fd7a7bc91b9f 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -46,9 +46,6 @@ struct driver_data { u32 clear_sr; u32 mask_sr; - /* Maximun clock rate */ - unsigned long max_clk_rate; - /* Message Transfer pump */ struct tasklet_struct pump_transfers; -- cgit v1.2.3 From 289de5541ca6aec56308c04b76c1bb59f00b1f09 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 1 Oct 2015 18:23:18 +0300 Subject: spi: pxa2xx: Remove empty function pxa2xx_spi_dma_resume() This was leftover from the legacy pxa2xx DMA implementation and not needed anymore so remove it. Signed-off-by: Mika Westerberg Signed-off-by: Mark Brown --- drivers/spi/spi-pxa2xx.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/spi/spi-pxa2xx.h') diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index fd7a7bc91b9f..514cf971707c 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -169,7 +169,6 @@ extern int pxa2xx_spi_dma_prepare(struct driver_data *drv_data, u32 dma_burst); extern void pxa2xx_spi_dma_start(struct driver_data *drv_data); extern int pxa2xx_spi_dma_setup(struct driver_data *drv_data); extern void pxa2xx_spi_dma_release(struct driver_data *drv_data); -extern void pxa2xx_spi_dma_resume(struct driver_data *drv_data); extern int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip, struct spi_device *spi, u8 bits_per_word, @@ -190,7 +189,6 @@ static inline int pxa2xx_spi_dma_setup(struct driver_data *drv_data) return 0; } static inline void pxa2xx_spi_dma_release(struct driver_data *drv_data) {} -static inline void pxa2xx_spi_dma_resume(struct driver_data *drv_data) {} static inline int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip, struct spi_device *spi, u8 bits_per_word, -- cgit v1.2.3 From 54bf4505bd64bdb61e343fc007f2f21899172931 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Fri, 2 Oct 2015 16:52:27 +0300 Subject: spi: pxa2xx: Remove unused psp member variable from struct chip_data It is not used since commit 8d94cc50aa4f ("[PATCH] spi: stabilize PIO mode transfers on PXA2xx systems"). Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- drivers/spi/spi-pxa2xx.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/spi/spi-pxa2xx.h') diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 0a9b6390a817..99c4d8a0a1d0 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -89,7 +89,6 @@ struct chip_data { u32 cr0; u32 cr1; u32 dds_rate; - u32 psp; u32 timeout; u8 n_bytes; u32 dma_burst_size; -- cgit v1.2.3