Renesas driver updates for v6.2 (take two)

- Add support for identifying the SoC revision on RZ/V2M.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCY3dffwAKCRCKwlD9ZEnx
 cDMNAP9Dh3nJoznrsXxLIeiPk0IhlsmwgseQrcivJqit1DhIxwEA+mg2VgCs5OEE
 r+bufQJElYSGx15r7UF/YZn90TSsPQY=
 =HjYI
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmN7dM4ACgkQmmx57+YA
 GNlTQg//bJ1aRxZJwxX8qcCwz82EJvaXIWu7S5xSeVLfGOFEURCB53IYHS9YiOi8
 10nH5Ee5/qLDDSJllGZJY3Y4JG2PurfUmFNpDmei1pM91wBm53+XhbSWrgff3fl+
 pbBlI/i8oszu6/HE9yRLVF3wDgCAIqwfkKQjGjlMsUNZfKv/Mqde6Y0EsoEwOe+5
 FQAHlSnFye3u3WiBc2Gg+ZNo3WsU/h3ORPEPk3zuOIq3f+di4DR1mKAr0rIwkW9/
 p16jq283KS8JEBafNuUM1P6GYXNdTNyMStib3vCOrwrCSVguYNXnSzN2mUmMBD1K
 15D+SgXJw76syBnZXJu18EjyWD1qgtFYLNLvMaqEo4o54LpxAC7uJfhVn6JFaLZj
 rk0tOWZ9YHBX1Vw4SOtPy7DYMDjIvmA6pgYwICWrc6J/aFa2J1nJItYWUkkKnc7w
 xJEvTVlP/1FPiKVeGYLrAy5+Ijpn45L5Wc0DROyVv0n5pJAJUanskZUAFMGWgS1y
 8sl4mkYwnDiujsx5l7BdgVvChcNAgt0r0R1FjhAUL+13I6VrHKKoRoNs0dV323wX
 k9SEyYig8Iupy2PJdViqki1bmVx/Kf+nc7znyBNNtuZxgZWSBvW3E0/pdsUOp3Sg
 MQm9Q6pGF2f9FTd29cJBKPZWGppGiYVLym8wPeAQDF0yF6neP6A=
 =z8Gm
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.2 (take two)

  - Add support for identifying the SoC revision on RZ/V2M.

* tag 'renesas-drivers-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Identify RZ/V2M SoC

Link: https://lore.kernel.org/r/cover.1668788925.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2022-11-21 13:53:33 +01:00
commit cb667ad752

View file

@ -76,6 +76,10 @@ static const struct renesas_family fam_rzv2l __initconst __maybe_unused = {
.name = "RZ/V2L",
};
static const struct renesas_family fam_rzv2m __initconst __maybe_unused = {
.name = "RZ/V2M",
};
static const struct renesas_family fam_shmobile __initconst __maybe_unused = {
.name = "SH-Mobile",
.reg = 0xe600101c, /* CCCR (Common Chip Code Register) */
@ -171,6 +175,10 @@ static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = {
.id = 0x8447447,
};
static const struct renesas_soc soc_rz_v2m __initconst __maybe_unused = {
.family = &fam_rzv2m,
};
static const struct renesas_soc soc_rcar_m1a __initconst __maybe_unused = {
.family = &fam_rcar_gen1,
};
@ -380,6 +388,9 @@ static const struct of_device_id renesas_socs[] __initconst = {
#if defined(CONFIG_ARCH_R9A07G054)
{ .compatible = "renesas,r9a07g054", .data = &soc_rz_v2l },
#endif
#if defined(CONFIG_ARCH_R9A09G011)
{ .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m },
#endif
#ifdef CONFIG_ARCH_SH73A0
{ .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 },
#endif
@ -405,6 +416,11 @@ static const struct renesas_id id_rzg2l __initconst = {
.mask = 0xfffffff,
};
static const struct renesas_id id_rzv2m __initconst = {
.offset = 0x104,
.mask = 0xff,
};
static const struct renesas_id id_prr __initconst = {
.offset = 0,
.mask = 0xff00,
@ -415,6 +431,7 @@ static const struct of_device_id renesas_ids[] __initconst = {
{ .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l },
{ .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l },
{ .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
{ .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
{ .compatible = "renesas,prr", .data = &id_prr },
{ /* sentinel */ }
};
@ -485,6 +502,11 @@ static int __init renesas_soc_init(void)
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u",
eshi);
rev_prefix = "Rev ";
} else if (id == &id_rzv2m) {
eshi = ((product >> 4) & 0x0f);
eslo = product & 0xf;
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u",
eshi, eslo);
}
if (soc->id &&