Re: [PATCH 6.12.y-cip 09/39] soc: renesas: rz-sysc: Add SoC identification for RZ/G3L SoC

Pavel Machek <[email protected]> Thu, 16 Jul 2026 09:47:12 +0200
Newsgroups org.cip-project.lists.cip-dev
Message-ID <[email protected]>
Hi!

> From: Biju Das <[email protected]>
> 
> [ Upstream commit b1de9823fdc67a8e9cd0dcf1f6f0e9780d425d4e ]
> 
> Add SoC identification for the RZ/G3L SoC using the System Controller
> (SYSC) block.

> +++ b/drivers/soc/renesas/r9a08g046-sysc.c
> @@ -0,0 +1,91 @@
> +
> +static bool rzg3l_regmap_readable_reg(struct device *dev, unsigned int reg)
> +{
> +	switch (reg) {
> +	case SYS_XSPI_MAP_STAADD_CS0:
> +	case SYS_XSPI_MAP_ENDADD_CS0:
> +	case SYS_XSPI_MAP_STAADD_CS1:
> +	case SYS_XSPI_MAP_ENDADD_CS1:
> +	case SYS_GETH0_CFG:
> +	case SYS_GETH1_CFG:
> +	case SYS_PCIE_CFG:
> +	case SYS_PCIE_MON:
> +	case SYS_PCIE_PHY:
> +	case SYS_I2C0_CFG:
> +	case SYS_I2C1_CFG:
> +	case SYS_I2C2_CFG:
> +	case SYS_I2C3_CFG:
> +	case SYS_I3C_CFG:
> +	case SYS_PWRRDY_N:
> +	case SYS_IPCONT_SEL_CLONECH:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +
> +static bool rzg3l_regmap_writeable_reg(struct device *dev, unsigned int reg)
> +{
> +	switch (reg) {
> +	case SYS_XSPI_MAP_STAADD_CS0:
> +	case SYS_XSPI_MAP_ENDADD_CS0:
> +	case SYS_XSPI_MAP_STAADD_CS1:
> +	case SYS_XSPI_MAP_ENDADD_CS1:
> +	case SYS_PCIE_CFG:
> +	case SYS_PCIE_PHY:
> +	case SYS_I2C0_CFG:
> +	case SYS_I2C1_CFG:
> +	case SYS_I2C2_CFG:
> +	case SYS_I2C3_CFG:
> +	case SYS_I3C_CFG:
> +	case SYS_PWRRDY_N:
> +	case SYS_IPCONT_SEL_CLONECH:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}

For the record, I believe one of these functions should be calling the
other one to lessen code duplication.

Best regards,
								Pavel
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCaliMgAAKCRAw5/Bqldv6
8tY7AJ9cqDTqS8SICY/3qNCMjTmnlfNYmACgpsFFATbmHU0T+IOR5rOud174Qh8=
=cDD/
-----END PGP SIGNATURE-----