[linux-yocto] [PATCH 4/4] Revert "spi/pxa2xx: auto switch between PIO and DMA with configurable threshold size"
chong.yi.chai at intel.com
chong.yi.chai at intel.com
Thu Apr 28 01:50:59 PDT 2016
From: "Chai, Chong Yi" <chong.yi.chai at intel.com>
This reverts commit afe9c4b82e119cd9e8e69ef2dbae1191375bfb51.
Signed-off-by: Chai, Chong Yi <chong.yi.chai at intel.com>
---
drivers/spi/spi-pxa2xx.c | 17 ++---------------
drivers/spi/spidev.c | 2 --
include/linux/spi/spi.h | 2 --
include/uapi/linux/spi/spidev.h | 2 --
4 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 69883b8..5d71e61 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -619,7 +619,6 @@ static void pump_transfers(unsigned long data)
u32 cr1;
u32 dma_thresh = drv_data->cur_chip->dma_threshold;
u32 dma_burst = drv_data->cur_chip->dma_burst_size;
- u8 auto_pio_dma_use_pio;
/* Get current state information */
message = drv_data->cur_msg;
@@ -653,20 +652,8 @@ static void pump_transfers(unsigned long data)
cs_deassert(drv_data);
}
- /*
- * Check if in auto switch PIO/DMA mode.
- * If true, use PIO if the length is less than threshold value.
- */
- auto_pio_dma_use_pio = chip->enable_dma ? 0 : 1;
- if (transfer->auto_pio_dma_mode) {
- if (transfer->len <= transfer->auto_pio_dma_threshold) {
- auto_pio_dma_use_pio = 1;
- }
- }
-
/* Check if we can DMA this transfer */
- if ((!pxa2xx_spi_dma_is_possible(transfer->len) && chip->enable_dma)
- || auto_pio_dma_use_pio) {
+ if (!pxa2xx_spi_dma_is_possible(transfer->len) && chip->enable_dma) {
/* reject already-mapped transfers; PIO won't always work */
if (message->is_dma_mapped
@@ -760,7 +747,7 @@ static void pump_transfers(unsigned long data)
message->state = RUNNING_STATE;
drv_data->dma_mapped = 0;
- if (pxa2xx_spi_dma_is_possible(drv_data->len) && !auto_pio_dma_use_pio)
+ if (pxa2xx_spi_dma_is_possible(drv_data->len))
drv_data->dma_mapped = pxa2xx_spi_map_dma_buffers(drv_data);
if (drv_data->dma_mapped) {
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index e14c7c0..2fe5b61 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -271,8 +271,6 @@ static int spidev_message(struct spidev_data *spidev,
k_tmp->bits_per_word = u_tmp->bits_per_word;
k_tmp->delay_usecs = u_tmp->delay_usecs;
k_tmp->speed_hz = u_tmp->speed_hz;
- k_tmp->auto_pio_dma_mode = u_tmp->auto_pio_dma_mode;
- k_tmp->auto_pio_dma_threshold = u_tmp->auto_pio_dma_threshold;
#ifdef VERBOSE
dev_dbg(&spidev->spi->dev,
" xfer len %zd %s%s%s%dbits %u usec %uHz\n",
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index d1af9a1..36c86ef 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -620,8 +620,6 @@ struct spi_transfer {
u8 bits_per_word;
u16 delay_usecs;
u32 speed_hz;
- u8 auto_pio_dma_mode;
- u32 auto_pio_dma_threshold;
struct list_head transfer_list;
};
diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
index c5ed56d..52d9ed0 100644
--- a/include/uapi/linux/spi/spidev.h
+++ b/include/uapi/linux/spi/spidev.h
@@ -92,8 +92,6 @@ struct spi_ioc_transfer {
__u16 delay_usecs;
__u8 bits_per_word;
__u8 cs_change;
- __u8 auto_pio_dma_mode;
- __u32 auto_pio_dma_threshold;
__u32 pad;
/* If the contents of 'struct spi_ioc_transfer' ever change
--
1.9.1
More information about the linux-yocto
mailing list