[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUGK9-gs98e=j87Fm0C518x2JBpSP7d0EYXheN+NGZCDw@mail.gmail.com>
Date: Fri, 2 May 2025 13:46:59 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Prabhakar <prabhakar.csengg@...il.com>
Cc: Magnus Damm <magnus.damm@...il.com>, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH v3] soc: renesas: sysc: Add SoC identification for RZ/V2N SoC
Hi Prabhakar,
On Tue, 15 Apr 2025 at 10:54, Prabhakar <prabhakar.csengg@...il.com> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>
> Add SoC identification for the RZ/V2N SoC using the System Controller
> (SYS) block.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> ---
> Hi All,
> This patch is from series [0]. Since most of the patches have already
> been queued, I'm sending this one separately.
>
> [0] https://lore.kernel.org/all/20250407191628.323613-5-prabhakar.mahadev-lad.rj@bp.renesas.com/
> Cheers, Prabhakar
>
> v2->v3:
> - Updated dev_info message to include the SoC revision and feature flags.
> - Dropped `<linux/string.h>` include.
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
i.e. will queue in renesas-devel for v6.16...
> --- /dev/null
> +++ b/drivers/soc/renesas/r9a09g056-sys.c
> +static void rzv2n_sys_print_id(struct device *dev,
> + void __iomem *sysc_base,
> + struct soc_device_attribute *soc_dev_attr)
> +{
> + unsigned int part_number;
> + u32 prr_val, mode_val;
> + u8 feature_flags;
> +
> + prr_val = readl(sysc_base + SYS_LSI_PRR);
> + mode_val = readl(sysc_base + SYS_LSI_MODE);
> +
> + /* Check GPU, ISP and Cryptographic configuration */
> + feature_flags = !(prr_val & SYS_LSI_PRR_GPU_DIS) ? SYS_RZV2N_FEATURE_G31 : 0;
> + feature_flags |= !(prr_val & SYS_LSI_PRR_ISP_DIS) ? SYS_RZV2N_FEATURE_C55 : 0;
> + feature_flags |= (mode_val & SYS_LSI_MODE_SEC_EN) ? SYS_RZV2N_FEATURE_SEC : 0;
> +
> + part_number = 41 + feature_flags;
> +
> + dev_info(dev, "Detected Renesas %s %sn%d Rev %s%s%s%s%s\n", soc_dev_attr->family,
> + soc_dev_attr->soc_id, part_number, soc_dev_attr->revision, feature_flags ?
> + " with" : "", feature_flags & SYS_RZV2N_FEATURE_G31 ? " GE3D (Mali-G31)" : "",
> + feature_flags & SYS_RZV2N_FEATURE_SEC ? " Cryptographic engine" : "",
> + feature_flags & SYS_RZV2N_FEATURE_C55 ? " ISP (Mali-C55)" : "");
... with the above reflowed to avoid splitting ternary expressions,
and with part_number expanded to fill the free space.
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