On Tue, Nov 28, 2017 at 12:56 PM, Peter Maydell <peter.mayd...@linaro.org>
wrote:

> On 28 November 2017 at 11:26, bzt bzt <bztem...@gmail.com> wrote:
> > (Although I have a question. I'm not sure what's the preferred
> > way to get MachineClass* object in bcm2836. Use a MachineState* cast on
> it's
> > Object* argument with MACHINE_GET_CLASS() or should I use the
> parameterless
> > qdev_get_machine() instead?)
>
> bcm2836.c should be a self contained object, which its caller creates
> and configures. The MachineClass is the board model object, and the
> SoC object shouldn't have to access it. If there's something (like the
> CPU model string) that the SoC needs, the SoC object should have a
> property which the board model sets.
>
> hw/arm/stm32f205_soc.c has an example of this (as do some of the
> other SoC objects -- 'git grep cpu-type hw/arm' should bring them up).
>

Okay, thanks a lot! I'll check them!


>
> thanks
> -- PMM
>

Reply via email to