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 ?

Reply via email to