[PATCH 3/4] arm: rmobile: Add RZ/G2M SoC
Marek Vasut
marek.vasut at gmail.com
Wed Sep 16 16:02:48 CEST 2020
On 9/15/20 4:36 PM, Biju Das wrote:
[...]
> static int rmobile_cpuinfo_idx(void)
> {
> int i = 0;
> u32 cpu_type = rmobile_get_cpu_type();
> + const struct udevice_id *match = of_soc_match_compatible();
>
> for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++)
> - if (rmobile_cpuinfo[i].cpu_type == cpu_type)
> - break;
> + if (rmobile_cpuinfo[i].cpu_type == cpu_type) {
> + if (match &&
> + rmobile_cpuinfo[i].family_type == match->data)
> + break;
> + else if (!match &&
> + rmobile_cpuinfo[i].family_type != SOC_RZG2)
> + break;
> + }
Can you please add some comment on how this loop works now. It really
isn't obvious, so a detailed comment would help greatly. I think it does
some discerning between the RCar and RZG, right ?
More information about the U-Boot
mailing list