On 12 September 2017 at 08:40, Igor Mammedov <imamm...@redhat.com> wrote:
> On Mon, 11 Sep 2017 14:33:03 +0100
> Peter Maydell <peter.mayd...@linaro.org> wrote:
>> It's not possible in all cases to set a CPU property from the
>> top level board code. In quite a lot of cases the CPU
>> object is created by an SoC object which is in turn
>> created by the board code, and there is no plumbing
>> there to pass arbitrary properties through to the CPU
>> object...
> there is a cleaner way without cpu accessing machine,
> make it property of cpu and use compat machinery that
> was invented for fixing up stuff of this kind.
>
> SET_MACHINE_COMPAT(MachineClass,
>                    { .driver = "arm-cpu",
>                      .property = "foo",
>                      .value    = "off",
>                    }
>                   )

It looks like we only use that machine-compat stuff on
our versioned boards, which is pretty much the only place
where we don't need to set this particular flag...

thanks
-- PMM

Reply via email to