[PATCH v5 1/2] arm: rmobile: Add RZ/G2[HMNE] SoC support

Marek Vasut marek.vasut at gmail.com
Mon Nov 2 20:23:27 CET 2020


On 11/1/20 8:26 PM, Biju Das wrote:
> Hi Marek,

Hi,

[...]

>>> @@ -23,7 +48,9 @@ static u32 rmobile_get_prr(void)
>>>
>>>   u32 rmobile_get_cpu_type(void)
>>>   {
>>> -	return (rmobile_get_prr() & 0x00007F00) >> 8;
>>> +	const u32 soc_id = (rmobile_get_prr() & 0x00007F00) >> 8;
>>
>> The soc_id = ... can be inlined into get_cpu_type().
>>
>> However, you might want to cache the result of rmobile_get_cpu_type() ,
>> because doing OF match every time this is called is expensive.
> 
> I agree calling OF match is expensive. So I have ported Renesas SoC identification driver  from Linux to u-boot
> which will cache the family type, soc_id and revision. I already sent a patch for supporting soc_id in UCLASS_SOC in ML[4]
> [4]  http://patchwork.ozlabs.org/project/uboot/patch/20201030140724.12773-1-biju.das.jz@bp.renesas.com/
> 
> On the next version, I will send Renesas SoC identification driver, which supports caching family type which
> can be used to provide unique identification for CPU type.

Please make sure to check it on RCar2 as well, those use SPL and the SPL 
size is quite limited.

[...]


More information about the U-Boot mailing list