TencentOS-kernel/drivers/spi
Tudor Ambarus c15b452c0e spi: atmel-quadspi: Fix AHB memory accesses
commit cac8c821059639b015586abf61623c62cc549a13 upstream.

Following error was seen when mounting a 16MByte ubifs:
UBIFS error (ubi0:0 pid 1893): check_lpt_type.constprop.6: invalid type (15) in LPT node type

QSPI_IFR.TFRTYP was not set correctly. When data transfer is enabled
and one wants to access the serial memory through AHB in order to:
 - read in the serial memory, but not a memory data, for example
   a JEDEC-ID, QSPI_IFR.TFRTYP must be written to '0' (both sama5d2
   and sam9x60).
 - read in the serial memory, and particularly a memory data,
   TFRTYP must be written to '1' (both sama5d2 and sam9x60).
 - write in the serial memory, but not a memory data, for example
   writing the configuration or the QSPI_SR, TFRTYP must be written
   to '2' for sama5d2 and to '0' for sam9x60.
 - write in the serial memory in particular to program a memory data,
   TFRTYP must be written to '3' for sama5d2 and to '1' for sam9x60.

Fix the setting of the QSPI_IFR.TFRTYP field.

Fixes: 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver")
Cc: <stable@vger.kernel.org> # v5.0+
Reported-by: Tom Burkart <tom@aussec.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201207135959.154124-2-tudor.ambarus@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-16 16:43:40 +08:00
..
Kconfig spi: Prevent adding devices below an unregistering controller 2021-03-16 16:34:28 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
atmel-quadspi.c spi: atmel-quadspi: Fix AHB memory accesses 2021-03-16 16:43:40 +08:00
internals.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-altera.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-armada-3700.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-at91-usart.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ath79.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-atmel.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-au1550.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-axi-spi-engine.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bcm-qspi.c spi: bcm-qspi: Fix use-after-free on unbind 2021-03-16 16:41:33 +08:00
spi-bcm-qspi.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bcm63xx-hsspi.c spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume 2021-03-16 16:42:43 +08:00
spi-bcm63xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bcm2835.c spi: bcm2835: Release the DMA channel if probe fails after dma_init 2021-03-16 16:42:06 +08:00
spi-bcm2835aux.c spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe 2021-03-16 16:41:48 +08:00
spi-bitbang-txrx.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bitbang.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-brcmstb-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-butterfly.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cadence.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium-octeon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium-thunderx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-clps711x.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-coldfire-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-davinci.c spi: davinci: Fix use-after-free on unbind 2021-03-16 16:43:38 +08:00
spi-dln2.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-dw-mid.c spi: dw: Return any value retrieved from the dma_transfer callback 2021-03-16 16:29:36 +08:00
spi-dw-mmio.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-dw-pci.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-dw.c spi: dw: Return any value retrieved from the dma_transfer callback 2021-03-16 16:29:36 +08:00
spi-dw.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-efm32.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ep93xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-falcon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-cpm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-cpm.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-dspi.c spi: spi-fsl-dspi: Fix lockup if device is shutdown during SPI transfer 2021-03-16 16:31:51 +08:00
spi-fsl-espi.c spi: fsl-espi: Only process interrupts for expected events 2021-03-16 16:37:47 +08:00
spi-fsl-lib.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-lib.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-lpspi.c spi: lpspi: Fix use-after-free on unbind 2021-03-16 16:41:28 +08:00
spi-fsl-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-spi.c spi: fsl: fix use of spisel_boot signal on MPC8309 2021-03-16 16:43:38 +08:00
spi-fsl-spi.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-geni-qcom.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-gpio.c spi: gpio: Don't leak SPI master in probe error path 2021-03-16 16:43:38 +08:00
spi-img-spfi.c spi: img-spfi: fix reference leak in img_spfi_resume 2021-03-16 16:42:40 +08:00
spi-imx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-iproc-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-jcore.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-lantiq-ssc.c spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM 2021-03-16 16:33:37 +08:00
spi-lm70llp.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-loopback-test.c spi: spi-loopback-test: Fix out-of-bounds read 2021-03-16 16:36:12 +08:00
spi-lp8841-rtc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mem.c spi: spi-mem: fix reference leak in spi_mem_access_start 2021-03-16 16:42:41 +08:00
spi-meson-spicc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-meson-spifc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mpc52xx-psc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mpc52xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mpc512x-psc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mt65xx.c spi: mediatek: use correct SPI_CFG2_REG MACRO 2021-03-16 16:32:30 +08:00
spi-mt7621.c spi: mt7621: Don't leak SPI master in probe error path 2021-03-16 16:43:39 +08:00
spi-mxic.c spi: mxic: Don't leak SPI master in probe error path 2021-03-16 16:43:38 +08:00
spi-mxs.c spi: mxs: fix reference leak in mxs_spi_probe 2021-03-16 16:42:48 +08:00
spi-npcm-fiu.c spi: npcm-fiu: Don't leak SPI master in probe error path 2021-03-16 16:41:28 +08:00
spi-npcm-pspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-nxp-fspi.c spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts 2021-03-16 16:42:11 +08:00
spi-oc-tiny.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-omap-100k.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-omap-uwire.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-omap2-mcspi.c spi: omap2-mcspi: Improve performance waiting for CHSTAT 2021-03-16 16:38:40 +08:00
spi-orion.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pic32-sqi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pic32.c spi: pic32: Don't leak DMA channels in probe error path 2021-03-16 16:43:38 +08:00
spi-pl022.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ppc4xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pxa2xx-dma.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pxa2xx-pci.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pxa2xx.c spi: pxa2xx: Fix use-after-free on unbind 2021-03-16 16:43:37 +08:00
spi-pxa2xx.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-qcom-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-qup.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-rb4xx.c spi: rb4xx: Don't leak SPI master in probe error path 2021-03-16 16:43:39 +08:00
spi-rockchip.c spi: rockchip: Fix error in SPI slave pio read 2021-03-16 16:33:17 +08:00
spi-rspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c24xx-fiq.S Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c24xx-fiq.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c24xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c64xx.c spi: spi-s3c64xx: Check return values 2021-03-16 16:38:30 +08:00
spi-sc18is602.c spi: sc18is602: Don't leak SPI master in probe error path 2021-03-16 16:43:39 +08:00
spi-sh-hspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sh-msiof.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sh-sci.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sh.c spi: spi-sh: Fix use-after-free on unbind 2021-03-16 16:43:37 +08:00
spi-sifive.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sirf.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-slave-mt27xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-slave-system-control.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-slave-time.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sprd-adi.c spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH 2021-03-16 16:32:17 +08:00
spi-sprd.c spi: sprd: fix reference leak in sprd_spi_remove 2021-03-16 16:42:44 +08:00
spi-st-ssc4.c spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path 2021-03-16 16:43:39 +08:00
spi-stm32-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-stm32.c spi: stm32: fix reference leak in stm32_spi_resume 2021-03-16 16:42:41 +08:00
spi-sun4i.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sun6i.c spi: spi-sun6i: sun6i_spi_transfer_one(): fix setting of clock rate 2021-03-16 16:31:59 +08:00
spi-synquacer.c spi: synquacer: Disable clock in probe error path 2021-03-16 16:43:39 +08:00
spi-tegra20-sflash.c spi: tegra20-sflash: fix reference leak in tegra_sflash_resume 2021-03-16 16:42:43 +08:00
spi-tegra20-slink.c spi: tegra20-slink: fix reference leak in slink ops of tegra20 2021-03-16 16:42:43 +08:00
spi-tegra114.c spi: tegra114: fix reference leak in tegra spi ops 2021-03-16 16:42:43 +08:00
spi-test.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ti-qspi.c spi: spi-ti-qspi: fix reference leak in ti_qspi_setup 2021-03-16 16:42:42 +08:00
spi-tle62x0.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-topcliff-pch.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-txx9.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-uniphier.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xcomm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xilinx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xlp.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xtensa-xtfpga.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-zynq-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-zynqmp-gqspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi.c spi: fix resource leak for drivers without .remove callback 2021-03-16 16:42:50 +08:00
spidev.c spi: spidev: Align buffers for DMA 2021-03-16 16:33:52 +08:00