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
tegra
.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
bt1-l2-ctl.c
da8xx-ddrctl.c
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
fsl-corenet-cf.c
jedec_ddr_data.c
jedec_ddr.h
jz4780-nemc.c
Kconfig
Makefile
mtk-smi.c
mvebu-devbus.c
of_memory.c
of_memory.h
omap-gpmc.c
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
ti-aemif.c
ti-emif-pm.c
ti-emif-sram-pm.S