[PATCH] Introduce 'struct machine_class' for SoC level abstraction

Eric Miao eric.y.miao at gmail.com
Thu Jul 22 07:20:59 EDT 2010


On Thu, Jul 22, 2010 at 1:11 PM, Hendrik Sattler
<post at hendrik-sattler.de> wrote:
> Zitat von Eric Miao <eric.miao at canonical.com>:
>>
>> @@ -772,8 +774,13 @@ void __init setup_arch(char **cmdline_p)
>>
>>        if (__atags_pointer)
>>                tags = phys_to_virt(__atags_pointer);
>> -       else if (mdesc->boot_params)
>> -               tags = phys_to_virt(mdesc->boot_params);
>> +       else {
>> +               unsigned long boot_params = mdesc->boot_params ?
>> +                                           mdesc->boot_params :
>> +                                          (class ? class->boot_params:
>> 0);
>> +               if (boot_params)
>> +                       tags = phys_to_virt(boot_params);
>> +       }
>
> Isn't
>        if (__atags_pointer)
>                tags = phys_to_virt(__atags_pointer);
>        else if (mdesc->boot_params)
>                tags = phys_to_virt(mdesc->boot_params);
> +       else if (class)
> +               tags = phys_to_virt(class->boot_params);
>
> equivalent and much simpler?
>

The idea is for mdesc->boot_params to override class->boot_params
if it's non-zero. Eventually this can be removed as the old way of
passing parameters from the bootloader at .boot_params will just
go away.

> HS
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>



More information about the linux-arm-kernel mailing list