kernel_optimize_test/drivers/memory
Geert Uytterhoeven 14cc2044c1 memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
[ Upstream commit 7e842d70fe599bc13594b650b2144c4b6e6d6bf1 ]

HyperFlash devices fail to probe:

    rpc-if-hyperflash rpc-if-hyperflash: probing of hyperbus device failed

In HyperFlash or Octal-SPI Flash mode, the Transfer Data Enable bits
(SPIDE) in the Manual Mode Enable Setting Register (SMENR) are derived
from half of the transfer size, cfr. the rpcif_bits_set() helper
function.  However, rpcif_reg_{read,write}() does not take the bus size
into account, and does not double all Manual Mode Data Register access
sizes when communicating with a HyperFlash or Octal-SPI Flash device.

Fix this, and avoid the back-and-forth conversion between transfer size
and Transfer Data Enable bits, by explicitly storing the transfer size
in struct rpcif, and using that value to determine access size in
rpcif_reg_{read,write}().

Enforce that the "high" Manual Mode Read/Write Data Registers
(SM[RW]DR1) are only used for 8-byte data accesses.
While at it, forbid writing to the Manual Mode Read Data Registers,
as they are read-only.

Fixes: fff53a551db50f5e ("memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/cde9bfacf704c81865f57b15d1b48a4793da4286.1649681476.git.geert+renesas@glider.be
Link: https://lore.kernel.org/r/20220420070526.9367-1-krzysztof.kozlowski@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-09 09:05:02 +02:00
..
samsung memory: samsung: exynos5422-dmc: handle clk_set_parent() failure 2021-05-14 09:50:19 +02:00
tegra memory: tegra: Fix compilation warnings on 64bit platforms 2021-07-25 14:36:14 +02:00
.gitignore
atmel-ebi.c memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe 2022-04-20 09:23:10 +02:00
atmel-sdramc.c
brcmstb_dpfe.c memory: brcmstb_dpfe: Simplify with dev_err_probe() 2020-09-02 17:22:31 +02:00
bt1-l2-ctl.c memory: bt1-l2-ctl: Add blank lines after declarations 2020-07-27 11:13:33 +02:00
da8xx-ddrctl.c memory: da8xx-ddrctl: Remove unused 'node' variable 2020-07-24 16:18:32 +02:00
emif-asm-offsets.c
emif.c memory: emif: check the pointer temp in get_device_details() 2022-04-08 14:40:09 +02:00
emif.h
fsl_ifc.c memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe 2021-11-18 14:04:16 +01:00
fsl-corenet-cf.c memory: fsl-corenet-cf: Fix handling of platform_get_irq() error 2020-09-02 17:32:02 +02:00
jedec_ddr_data.c
jedec_ddr.h
jz4780-nemc.c memory: jz4780_nemc: Fix an error pointer vs NULL check in probe() 2020-12-30 11:54:27 +01:00
Kconfig memory: ti-emif-sram: only build for ARMv7 2020-12-30 11:53:37 +01:00
Makefile memory: brcmstb_dpfe: add separate entry for compile test 2020-08-17 20:44:00 +02:00
mtk-smi.c memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops 2021-03-04 11:37:22 +01:00
mvebu-devbus.c memory: mvebu-devbus: Align with open parenthesis 2020-07-27 11:13:33 +02:00
of_memory.c memory: of: Correct kerneldoc 2020-07-27 11:13:33 +02:00
of_memory.h
omap-gpmc.c memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] 2021-05-14 09:50:06 +02:00
pl172.c amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
pl353-smc.c amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
renesas-rpc-if.c memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-05-09 09:05:02 +02:00
stm32-fmc2-ebi.c memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration 2021-07-20 16:05:54 +02:00
ti-aemif.c memory: ti-aemif: Drop child node when jumping out loop 2021-03-04 11:37:25 +01:00
ti-emif-pm.c memory: ti-emif-pm: Fix cast to iomem pointer 2020-07-24 16:18:32 +02:00
ti-emif-sram-pm.S