[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVrx3ug+RKuNXauCLKFYr5qZedrj7KmME0vzRysoqFzPQ@mail.gmail.com>
Date: Mon, 14 Nov 2022 14:32:03 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Magnus Damm <magnus.damm@...il.com>,
Gareth Williams <gareth.williams.jx@...esas.com>,
linux-renesas-soc@...r.kernel.org, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH v2 3/7] soc: renesas: r9a06g032-sysctrl: Handle h2mode
device-tree property
Hi Hervé,
On Mon, Nov 14, 2022 at 12:15 PM Herve Codina <herve.codina@...tlin.com> wrote:
>
> Handle the h2mode property and forces the CFG_USB[H2MODE] bit
> accordingly.
>
> Signed-off-by: Herve Codina <herve.codina@...tlin.com>
Thanks for the update!
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Minor nit below.
> @@ -966,6 +967,26 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev)
> clocks->reg = of_iomap(np, 0);
> if (WARN_ON(!clocks->reg))
> return -ENOMEM;
> +
> + error = of_property_read_u32(np, "renesas,h2mode", &h2mode);
> + if (!error) {
> + usb = readl(clocks->reg + R9A06G032_SYSCTRL_USB);
> + switch (h2mode) {
> + case 0:
> + /* 1 host, 1 device */
> + usb &= ~R9A06G032_SYSCTRL_USB_H2MODE;
> + break;
> + case 1:
> + /* 2 hosts */
> + usb |= R9A06G032_SYSCTRL_USB_H2MODE;
> + break;
> + default:
> + dev_err(dev, "invalid h2mode %d\n", h2mode);
%u
> + return -EINVAL;
> + }
> + writel(usb, clocks->reg + R9A06G032_SYSCTRL_USB);
> + }
> +
> for (i = 0; i < ARRAY_SIZE(r9a06g032_clocks); ++i) {
> const struct r9a06g032_clkdesc *d = &r9a06g032_clocks[i];
> const char *parent_name = d->source ?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists