1
0
Fork 0
alistair23-linux/drivers/soc/renesas
Geert Uytterhoeven f255ba7d63 soc: renesas: Add missing check for non-zero product register address
commit 4194b583c1 upstream.

If the DTB for a device with an RZ/A2 SoC lacks a device node for the
BSID register, the ID validation code falls back to using a register at
address 0x0, which leads to undefined behavior (e.g. reading back a
random value).

This could be fixed by letting fam_rza2.reg point to the actual BSID
register.  However, the hardcoded fallbacks were meant for backwards
compatibility with old DTBs only, not for new SoCs.  Hence fix this by
validating renesas_family.reg before using it.

Fixes: 175f435f44 ("soc: renesas: identify RZ/A2")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20191016143306.28995-1-geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-26 10:01:02 +01:00
..
Kconfig soc: renesas: Enable ARM_ERRATA_754322 for affected Cortex-A9 2019-08-23 10:33:31 +02:00
Makefile ARM: shmobile: R-Mobile: Move pm-rmobile to drivers/soc/renesas/ 2018-11-30 11:29:11 +01:00
r8a774a1-sysc.c soc: renesas: rcar-sysc: Add r8a774a1 support 2018-09-12 10:19:06 +02:00
r8a774c0-sysc.c soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} 2019-01-07 14:51:51 +01:00
r8a7743-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7745-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7779-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7790-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7791-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7792-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7794-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7795-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a7796-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r8a77470-sysc.c soc: renesas: rcar-sysc: Add r8a77470 support 2018-04-16 16:01:24 +02:00
r8a77965-sysc.c soc: renesas: r8a77965-sysc: Remove non-existent A3IR power domain 2018-11-30 11:22:29 +01:00
r8a77970-sysc.c soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains 2018-11-30 11:22:30 +01:00
r8a77980-sysc.c soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy 2018-11-30 11:22:30 +01:00
r8a77990-sysc.c soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} 2018-12-06 12:10:08 -08:00
r8a77995-sysc.c soc: renesas: convert to SPDX identifiers 2018-09-12 10:19:51 +02:00
r9a06g032-smp.c ARM: shmobile: Add the R9A06G032 SMP enabler driver 2018-07-20 13:44:04 +02:00
rcar-rst.c soc: renesas: rcar-rst: Add support for RZ/G1N 2018-09-17 10:46:31 +02:00
rcar-sysc.c soc: renesas: rcar-sysc: Eliminate local variable gov 2019-08-19 14:56:14 +02:00
rcar-sysc.h soc: renesas: rcar-sysc: Add r8a774c0 support 2018-09-14 15:33:35 +02:00
renesas-soc.c soc: renesas: Add missing check for non-zero product register address 2020-01-26 10:01:02 +01:00
rmobile-sysc.c soc: renesas: rmobile-sysc: Set GENPD_FLAG_ALWAYS_ON for always-on domain 2019-08-23 09:58:01 +02:00