kernel_optimize_test/drivers
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
..
accessibility speakup-dectlk: Restore pitch setting 2022-02-16 12:54:30 +01:00
acpi ACPI: processor idle: Check for architectural support for LPI 2022-04-20 09:23:09 +02:00
amba amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
android binder: fix handling of error during copy 2022-01-27 10:54:06 +01:00
ata ata: pata_marvell: Check the 'bmdma_addr' beforing reading 2022-04-27 13:53:54 +02:00
atm atm: eni: Add check for dma_map_single 2022-03-23 09:13:27 +01:00
auxdisplay
base arch_topology: Do not set llc_sibling if llc_id is invalid 2022-05-09 09:04:59 +02:00
bcma
block floppy: disable FDRAWCMD by default 2022-05-09 09:04:56 +02:00
bluetooth Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt 2022-04-08 14:40:22 +02:00
bus bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific 2022-05-09 09:05:01 +02:00
cdrom
char virtio_console: eliminate anonymous module_init & module_exit 2022-04-13 21:01:02 +02:00
clk clk: Enforce that disjoints limits are invalid 2022-04-13 21:01:02 +02:00
clocksource clocksource: acpi_pm: fix return value of __setup handler 2022-04-08 14:40:03 +02:00
connector
counter counter: stm32-lptimer-cnt: remove iio counter abi 2022-01-27 10:54:08 +01:00
cpufreq cpufreq: qcom-cpufreq-nvmem: fix reading of PVS Valid fuse 2022-04-08 14:40:24 +02:00
cpuidle
crypto crypto: ccree - Fix use after free in cc_cipher_exit() 2022-04-08 14:40:02 +02:00
dax dax: make sure inodes are flushed before destroy cache 2022-04-08 14:40:16 +02:00
dca
devfreq
dio
dma dma: at_xdmac: fix a missing check on list iterator 2022-04-27 13:53:55 +02:00
dma-buf udmabuf: validate ubuf->pagecount 2022-04-08 14:40:12 +02:00
edac EDAC/synopsys: Read the error count from the correct register 2022-04-27 13:53:54 +02:00
eisa
extcon
firewire
firmware firmware: arm_scmi: Fix sorting of retrieved clock rates 2022-04-20 09:23:10 +02:00
fpga
fsi fsi: Aspeed: Fix a potential double free 2022-04-08 14:40:23 +02:00
gnss
gpio gpio: Request interrupts after IRQ is initialized 2022-04-27 13:53:55 +02:00
gpu drm/vc4: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage 2022-04-27 13:53:56 +02:00
greybus greybus: svc: fix an error handling bug in gb_svc_hello() 2022-04-08 14:39:50 +02:00
hid HID: i2c-hid: fix GET/SET_REPORT for unnumbered reports 2022-04-08 14:40:15 +02:00
hsi HSI: core: Fix return freed object in hsi_new_client 2022-01-27 10:54:12 +01:00
hv Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer 2022-04-20 09:23:20 +02:00
hwmon hwmon: (pmbus) Add Vin unit off handling 2022-04-08 14:40:02 +02:00
hwspinlock
hwtracing amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
i2c i2c: pasemi: Wait for write xfers to finish 2022-04-20 09:23:30 +02:00
i3c
ide
idle
iio iio:imu:bmi160: disable regulator in error path 2022-05-09 09:05:00 +02:00
infiniband scsi: iscsi: Rel ref after iscsi_lookup_endpoint() 2022-04-20 09:23:16 +02:00
input amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
interconnect
iommu iommu/omap: Fix regression in probe for NULL pointer dereference 2022-04-13 21:01:07 +02:00
ipack
irqchip irqchip/gic, gic-v3: Prevent GSI to SGI translations 2022-04-13 21:01:11 +02:00
isdn isdn: hfcpci: check the return value of dma_set_mask() in setup_hw() 2022-03-16 14:15:57 +01:00
leds
lightnvm lightnvm: disable the subsystem 2022-05-09 09:04:56 +02:00
macintosh
mailbox mailbox: imx: fix wakeup failure from freeze mode 2022-04-08 14:40:41 +02:00
mcb
md dm: fix mempool NULL pointer race when completing IO 2022-04-27 13:53:47 +02:00
media media: rockchip/rga: do proper error checking in probe 2022-04-20 09:23:10 +02:00
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-05-09 09:05:02 +02:00
memstick
message
mfd mfd: asic3: Add missing iounmap() on error asic3_mfd_probe 2022-04-08 14:40:23 +02:00
misc kgdbts: fix return value of __setup handler 2022-04-08 14:40:28 +02:00
mmc mmc: renesas_sdhi: don't overwrite TAP settings when HS400 tuning is complete 2022-04-13 21:01:07 +02:00
most
mtd mtd: rawnand: Fix return value check of wait_for_completion_timeout 2022-05-09 09:05:02 +02:00
mux
net Revert "net: micrel: fix KS8851_MLL Kconfig" 2022-04-27 13:53:58 +02:00
nfc nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION 2022-03-28 09:57:07 +02:00
ntb ntb: intel: fix port config status offset for SPR 2022-03-08 19:09:32 +01:00
nubus
nvdimm nvdimm/region: Fix default alignment for small regions 2022-04-08 14:40:26 +02:00
nvme nvme-pci: disable namespace identifiers for Qemu controllers 2022-04-27 13:53:54 +02:00
nvmem nvmem: core: set size for sysfs bin file 2022-01-27 10:54:22 +01:00
of of: base: Improve argument length mismatch error 2022-01-27 10:54:28 +01:00
opp
oprofile
parisc parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-04-13 21:01:03 +02:00
parport
pci PCI: endpoint: Fix misused goto label 2022-04-13 21:00:59 +02:00
pcmcia pcmcia: fix setting of kthread task states 2022-01-27 10:54:03 +01:00
perf arm_pmu: Validate single/group leader events 2022-04-27 13:53:55 +02:00
phy phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe 2022-05-09 09:05:01 +02:00
pinctrl pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI 2022-05-09 09:05:02 +02:00
platform platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative 2022-04-27 13:53:53 +02:00
pnp
power power: supply: axp288-charger: Set Vhold to 4.4V 2022-04-13 21:00:57 +02:00
powercap
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-13 21:00:55 +02:00
pwm pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add() 2022-04-08 14:40:23 +02:00
rapidio
ras
regulator regulator: wm8994: Add an off-on delay for WM8994 variant 2022-04-20 09:23:22 +02:00
remoteproc remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region 2022-04-08 14:40:26 +02:00
reset reset: tegra-bpmp: Restore Handle errors in BPMP response 2022-04-27 13:53:52 +02:00
rpmsg rpmsg: char: Fix race between the release of rpmsg_eptdev and cdev 2022-02-01 17:25:43 +01:00
rtc rtc: wm8350: Handle error for wm8350_register_irq 2022-04-13 21:00:54 +02:00
s390 scsi: zfcp: Fix failed recovery on gone remote port with non-NPIV FCP devices 2022-02-01 17:25:39 +01:00
sbus
scsi scsi: qedi: Fix failed disconnect handling 2022-04-27 13:53:54 +02:00
sfi
sh
siox
slimbus
soc soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe 2022-04-08 14:40:07 +02:00
soundwire soundwire: intel: fix wrong register name in intel_shim_wake 2022-04-08 14:40:24 +02:00
spi spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller 2022-04-27 13:53:57 +02:00
spmi
ssb
staging staging: ion: Prevent incorrect reference counting behavour 2022-04-27 13:53:57 +02:00
target scsi: target: tcmu: Fix possible page UAF 2022-04-20 09:23:21 +02:00
tc
tee optee: use driver internal tee_context for some rpc 2022-03-02 11:42:47 +01:00
thermal thermal: int340x: Check for NULL after calling kmemdup() 2022-04-08 14:39:59 +02:00
thunderbolt thunderbolt: Runtime PM activate both ends of the device link 2022-01-27 10:54:14 +01:00
tty serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device 2022-05-09 09:04:59 +02:00
uio
usb USB: Fix xhci event ring dequeue pointer ERDP update issue 2022-05-09 09:05:00 +02:00
vdpa vdpa/mlx5: should verify CTRL_VQ feature exists for MQ 2022-04-08 14:39:47 +02:00
vfio amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
vhost tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 21:00:59 +02:00
video video: fbdev: udlfb: properly check endpoint type 2022-05-09 09:05:00 +02:00
virt
virtio virtio: acknowledge all features before access 2022-03-16 14:16:02 +01:00
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-13 21:01:01 +02:00
watchdog watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function 2022-04-08 14:40:41 +02:00
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 12:11:54 +01:00
zorro
Kconfig
Makefile