[PATCH v4 1/2] arm: rmobile: Add PRR CPU ID macros for RZ/G2[HMNE]

Biju Das biju.das.jz at bp.renesas.com
Sat Oct 3 21:31:59 CEST 2020


Hi Marek,

Thanks for the feedback.

> Subject: Re: [PATCH v4 1/2] arm: rmobile: Add PRR CPU ID macros for
> RZ/G2[HMNE]
>
> On 10/1/20 12:36 PM, Biju Das wrote:
> [...]
>
> > diff --git a/arch/arm/mach-rmobile/include/mach/rmobile.h
> > b/arch/arm/mach-rmobile/include/mach/rmobile.h
> > index a50249dc96..bd4bd01b75 100644
> > --- a/arch/arm/mach-rmobile/include/mach/rmobile.h
> > +++ b/arch/arm/mach-rmobile/include/mach/rmobile.h
> > @@ -27,6 +27,10 @@
> >  /* PRR CPU IDs */
> >  #define RMOBILE_CPU_TYPE_SH73A00x37
> >  #define RMOBILE_CPU_TYPE_R8A77400x40
> > +#define RMOBILE_CPU_TYPE_R8A774A10x52
>
> The problem here is that this is the same as
> #define RMOBILE_CPU_TYPE_R8A7796   0x52
>
> So if you use that ^ in the code, you cannot discern it from
> RMOBILE_CPU_TYPE_R8A774A1 .

But this value is same as per the hardware manual, see the definitions in linux[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/soc/renesas/renesas-soc.c?h=v5.9-rc7#n114
Please correct me, if this macros are not as per hardware manual.

> We really need to find a way to tell these two apart first, e.g. by checking the
> bootrom, and then use it in U-Boot all over the place.

Yes, I agree we need to differentiate them. Different ways I can think of is

1) Bootrom level
2) Checking some IP register which is present in RCar and not in RZ/G2
3) Compatible SoC string from TFA
4) TFA there will be separation for RZ/G2 SoC and RCar Gen3 SoC, So populate some dtfragment for RCar/RZG2 SoC similar to dram and u-boot handling it for SoC separation.
5) Use compile time macros in U-boot.

Please let me you know, which is the best way to go forward and also let me know, if you have any other ideas in your mind.

Regards,
Biju





Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647


More information about the U-Boot mailing list