WSL2-Linux-Kernel/drivers/memory
Geert Uytterhoeven 7e842d70fe
memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
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: fff53a551d ("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>
2022-04-21 17:00:24 +02:00
..
samsung memory: samsung: describe drivers in KConfig 2021-09-28 12:38:36 +02:00
tegra memory: tegra: Constify struct thermal_cooling_device_ops 2022-01-27 10:41:54 +01:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Merge branch 'for-v5.16/renesas-rpc' into mem-ctrl-next 2021-10-10 19:45:00 +02:00
Makefile
atmel-ebi.c memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe 2022-04-04 18:29:33 +02:00
atmel-sdramc.c
brcmstb_dpfe.c memory: brcmstb_dpfe: fix typo in a comment 2022-01-27 10:42:09 +01:00
bt1-l2-ctl.c
da8xx-ddrctl.c
dfl-emif.c
emif-asm-offsets.c
emif.c memory: emif: check the pointer temp in get_device_details() 2022-03-04 09:08:27 +01:00
emif.h
fsl-corenet-cf.c
fsl_ifc.c memory: fsl_ifc: populate child nodes of buses and mfd devices 2022-04-06 09:39:16 +02:00
jedec_ddr.h memory: Add LPDDR2-info helpers 2021-10-15 09:52:47 +02:00
jedec_ddr_data.c memory: Add LPDDR2-info helpers 2021-10-15 09:52:47 +02:00
jz4780-nemc.c
mtk-smi.c ARM driver updates for 5.18 2022-03-23 18:23:13 -07:00
mvebu-devbus.c
of_memory.c memory: Update of_memory lpddr2 revision-id binding 2022-02-25 13:36:49 +01:00
of_memory.h memory: Add LPDDR2-info helpers 2021-10-15 09:52:47 +02:00
omap-gpmc.c memory: omap-gpmc: Use a compatible match table when checking for NAND controller 2021-12-22 16:51:14 +01:00
pl172.c
pl353-smc.c Memory controller drivers for v5.14 - PL353 2021-06-12 08:53:06 -07:00
renesas-rpc-if.c memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-04-21 17:00:24 +02:00
stm32-fmc2-ebi.c memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration 2021-05-11 08:49:18 -04:00
ti-aemif.c
ti-emif-pm.c
ti-emif-sram-pm.S