2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00
linux-next/drivers/spi
Axel Lin d297933cc7 spi: dw: Fix detecting FIFO depth
Current code tries to find the highest valid fifo depth by checking the value
it wrote to DW_SPI_TXFLTR. There are a few problems in current code:
1) There is an off-by-one in dws->fifo_len setting because it assumes the latest
   register write fails so the latest valid value should be fifo - 1.
2) We know the depth could be from 2 to 256 from HW spec, so it is not necessary
   to test fifo == 257. In the case fifo is 257, it means the latest valid
   setting is fifo = 256. So after the for loop iteration, we should check
   fifo == 2 case instead of fifo == 257 if detecting the FIFO depth fails.
This patch fixes above issues.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-and-tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-05 19:04:39 +00:00
..
Kconfig Merge remote-tracking branches 'spi/topic/mxs', 'spi/topic/pxa', 'spi/topic/rockchip', 'spi/topic/samsung' and 'spi/topic/sirf' into spi-next 2014-12-08 12:17:17 +00:00
Makefile Merge remote-tracking branches 'spi/topic/fsl-dspi', 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/img-spfi' and 'spi/topic/meson' into spi-next 2014-12-08 12:17:15 +00:00
spi-adi-v3.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-altera.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-ath79.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-atmel.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-au1550.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bcm53xx.c spi: bcm53xx: Add missing module information 2014-09-26 09:08:10 +01:00
spi-bcm53xx.h spi: bcm53xx: driver for SPI controller on Broadcom bcma SoC 2014-08-19 11:30:55 -05:00
spi-bcm63xx-hsspi.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bcm63xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bcm2835.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bfin5xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bfin-sport.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bitbang-txrx.h spi: bitbang: Grammar s/make to make/to make/ 2014-01-13 11:24:21 +00:00
spi-bitbang.c Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next 2014-03-30 00:51:17 +00:00
spi-butterfly.c spi: bitbang: Make spi_bitbang_stop() return void 2014-03-29 11:09:26 +00:00
spi-cadence.c Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/cadence', 'spi/topic/dw' and 'spi/topic/fsl-cpm' into spi-next 2014-12-08 12:17:12 +00:00
spi-clps711x.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-coldfire-qspi.c spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-13 00:41:15 +01:00
spi-davinci.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-dw-mid.c spi: dw-mid: split rx and tx callbacks when DMA 2014-10-28 22:40:38 +00:00
spi-dw-mmio.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-dw-pci.c Merge remote-tracking branches 'spi/topic/davinci', 'spi/topic/doc', 'spi/topic/dw' and 'spi/topic/fsl' into spi-next 2014-10-03 16:33:39 +01:00
spi-dw.c spi: dw: Fix detecting FIFO depth 2015-01-05 19:04:39 +00:00
spi-dw.h spi: dw-mid: split rx and tx callbacks when DMA 2014-10-28 22:40:38 +00:00
spi-efm32.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-ep93xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-falcon.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-fsl-cpm.c spi: fsl-spi: Don't use cpm_command on CPM1 2014-11-21 18:12:42 +00:00
spi-fsl-cpm.h spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-dspi.c Merge remote-tracking branches 'spi/topic/fsl-dspi', 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/img-spfi' and 'spi/topic/meson' into spi-next 2014-12-08 12:17:15 +00:00
spi-fsl-espi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-fsl-lib.c spi: fsl-(e)spi: migrate to generic master queueing 2014-12-03 13:05:47 +00:00
spi-fsl-lib.h spi: fsl-(e)spi: migrate to generic master queueing 2014-12-03 13:05:47 +00:00
spi-fsl-spi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-fsl-spi.h spi/spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC 2013-04-07 10:07:56 +01:00
spi-gpio.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-img-spfi.c spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-19 15:25:31 +01:00
spi-imx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-lm70llp.c spi: bitbang: Let spi_bitbang_start() take a reference to master 2013-10-07 14:50:43 +01:00
spi-meson-spifc.c spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-19 15:25:31 +01:00
spi-mpc52xx-psc.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-mpc52xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-mpc512x-psc.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-mxs.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-nuc900.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-oc-tiny.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-octeon.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-omap2-mcspi.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-omap-100k.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-omap-uwire.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-orion.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
spi-pl022.c PM: Merge the SET*_RUNTIME_PM_OPS() macros 2014-12-04 00:51:30 +01:00
spi-ppc4xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-pxa2xx-dma.c spi/pxa2xx: Don't use slave_id of dma_slave_config 2014-09-18 11:54:07 +05:30
spi-pxa2xx-pci.c spi: spi-pxa2xx: SPI support for Intel Quark X1000 2014-11-26 18:07:45 +00:00
spi-pxa2xx-pxadma.c spi: delete non-required instances of include <linux/init.h> 2014-02-03 12:20:35 +00:00
spi-pxa2xx.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
spi-pxa2xx.h spi: spi-pxa2xx: SPI support for Intel Quark X1000 2014-11-26 18:07:45 +00:00
spi-qup.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
spi-rockchip.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
spi-rspi.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-s3c24xx-fiq.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx-fiq.S spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-s3c64xx.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
spi-sc18is602.c spi: sc18is602: Convert to let spi core validate transfer speed 2014-03-13 09:47:05 +00:00
spi-sh-hspi.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sh-msiof.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sh-sci.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sh.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sirf.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-sun4i.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sun6i.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tegra20-sflash.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tegra20-slink.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tegra114.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-ti-qspi.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tle62x0.c spi: tle62x0: remove unnecessary OOM messages 2014-04-29 12:01:42 -07:00
spi-topcliff-pch.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-txx9.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-xcomm.c Merge remote-tracking branches 'spi/topic/sunxi', 'spi/topic/tegra114', 'spi/topic/ti-qspi', 'spi/topic/ti-ssp', 'spi/topic/topcliff-pch', 'spi/topic/txx9', 'spi/topic/xcomm' and 'spi/topic/xfer' into spi-next 2014-03-30 00:51:41 +00:00
spi-xilinx.c spi: xilinx: Remove .owner field for driver 2014-08-16 17:15:47 -05:00
spi-xtensa-xtfpga.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi.c Devicetree changes for v3.19 2014-12-11 13:06:58 -08:00
spidev.c spi: spidev: Don't mangle max_speed_hz in underlying spi device 2014-11-11 18:01:28 +00:00