From: "Chai, Chong Yi" <[email protected]> This reverts commit db6b51575bde505ac64ae23a1be6b008ba897fc0.
Signed-off-by: Chai, Chong Yi <[email protected]> --- drivers/spi/spi-pxa2xx.c | 13 ------------- drivers/spi/spidev.c | 17 ----------------- include/linux/spi/spi.h | 1 - include/uapi/linux/spi/spidev.h | 3 --- 4 files changed, 34 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 11d78b0..69883b8 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -904,16 +904,6 @@ static int setup(struct spi_device *spi) rx_thres = RX_THRESH_DFLT; } - /* Override default FIFO trigger level, with new value. */ - if (spi->fifo_trigger_level) { - if (rx_thres != (spi->fifo_trigger_level >> 16) & 0xff) - rx_thres = (spi->fifo_trigger_level >> 16) & 0xff; - if (tx_thres != (spi->fifo_trigger_level >> 8) & 0xff) - tx_thres = (spi->fifo_trigger_level >> 8) & 0xff; - if (tx_hi_thres != spi->fifo_trigger_level & 0xff) - tx_hi_thres = spi->fifo_trigger_level & 0xff; - } - /* Only alloc on first setup */ chip = spi_get_ctldata(spi); if (!chip) { @@ -971,9 +961,6 @@ static int setup(struct spi_device *spi) chip->lpss_tx_threshold = SSITF_TxLoThresh(tx_thres) | SSITF_TxHiThresh(tx_hi_thres); - spi->fifo_trigger_level = (chip->lpss_rx_threshold + 1) << 16 - | (chip->lpss_tx_threshold + 0x101); - /* 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 */ diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 6b6aa78..e14c7c0 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -374,10 +374,6 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) case SPI_IOC_RD_MAX_SPEED_HZ: retval = __put_user(spi->max_speed_hz, (__u32 __user *)arg); break; - case SPI_IOC_RD_FIFO_TRIGGER_LEVEL: - retval = __put_user(spi->fifo_trigger_level, - (__u32 __user *)arg); - break; /* write requests */ case SPI_IOC_WR_MODE: @@ -442,19 +438,6 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) dev_dbg(&spi->dev, "%d Hz (max)\n", tmp); } break; - case SPI_IOC_WR_FIFO_TRIGGER_LEVEL: - retval = __get_user(tmp, (__u32 __user *)arg); - if (retval == 0) { - u32 save = spi->fifo_trigger_level; - - spi->fifo_trigger_level = tmp; - retval = spi_setup(spi); - if (retval < 0) - spi->fifo_trigger_level = save; - else - dev_dbg(&spi->dev, "FIFO trigger 0x%d\n", tmp); - } - break; default: /* segmented and/or full-duplex I/O request */ diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 8186a51..d1af9a1 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -101,7 +101,6 @@ struct spi_device { void *controller_data; char modalias[SPI_NAME_SIZE]; int cs_gpio; /* chip select gpio */ - u32 fifo_trigger_level; /* * likely need more hooks for more protocol options affecting how diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h index 7babba0..c5ed56d 100644 --- a/include/uapi/linux/spi/spidev.h +++ b/include/uapi/linux/spi/spidev.h @@ -128,9 +128,6 @@ struct spi_ioc_transfer { #define SPI_IOC_RD_MAX_SPEED_HZ _IOR(SPI_IOC_MAGIC, 4, __u32) #define SPI_IOC_WR_MAX_SPEED_HZ _IOW(SPI_IOC_MAGIC, 4, __u32) -/* Read / Write SPI FIFO threshold */ -#define SPI_IOC_RD_FIFO_TRIGGER_LEVEL _IOR(SPI_IOC_MAGIC, 5, __u32) -#define SPI_IOC_WR_FIFO_TRIGGER_LEVEL _IOW(SPI_IOC_MAGIC, 5, __u32) #endif /* SPIDEV_H */ -- 1.9.1 -- _______________________________________________ linux-yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/linux-yocto
