[PATCH v5 03/10] clk: renesas: add R906G032 driver

Marek Vasut marek.vasut at mailbox.org
Sun May 7 17:53:08 CEST 2023


On 4/24/23 03:15, Ralph Siemsen wrote:

[...]

> +static int r9a06g032_clk_probe(struct udevice *dev)
> +{
> +	struct r9a06g032_priv *priv = dev_get_priv(dev);
> +
> +	priv->regmap = syscon_regmap_lookup_by_phandle(dev, "regmap");
> +	if (IS_ERR(priv->regmap)) {
> +		dev_dbg(dev, "unable to find regmap\n");
> +		return PTR_ERR(priv->regmap);
> +	}
> +
> +	/* Enable S/W reset */
> +	regmap_write(priv->regmap, 0x120, 0x41);

Please introduce a macro for the register name and BIT()s for the 
register bits.

With that,

Reviewed-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

> +	/* Get master clock */
> +	return clk_get_by_name(dev, "mclk", &priv->mclk);
> +}

[..]


More information about the U-Boot mailing list