On Mon, 1 Jul 2019 at 13:31, Philippe Mathieu-Daudé <phi...@redhat.com> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> ---
>  hw/arm/fsl-imx25.c | 4 +++-
>  hw/arm/fsl-imx31.c | 4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
> index 869ee89b15..a237e967e4 100644
> --- a/hw/arm/fsl-imx25.c
> +++ b/hw/arm/fsl-imx25.c
> @@ -36,7 +36,9 @@ static void fsl_imx25_init(Object *obj)
>      FslIMX25State *s = FSL_IMX25(obj);
>      int i;
>
> -    object_initialize(&s->cpu, sizeof(s->cpu), "arm926-" TYPE_ARM_CPU);
> +    object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
> +                            ARM_CPU_TYPE_NAME("arm926"),
> +                            &error_abort, NULL);
>
>      sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
>                            TYPE_IMX_AVIC);
> diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
> index 662fe78f1b..423d9ef076 100644
> --- a/hw/arm/fsl-imx31.c
> +++ b/hw/arm/fsl-imx31.c
> @@ -33,7 +33,9 @@ static void fsl_imx31_init(Object *obj)
>      FslIMX31State *s = FSL_IMX31(obj);
>      int i;
>
> -    object_initialize(&s->cpu, sizeof(s->cpu), "arm1136-" TYPE_ARM_CPU);
> +    object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
> +                            ARM_CPU_TYPE_NAME("arm1136"),
> +                            &error_abort, NULL);
>
>      sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
>                            TYPE_IMX_AVIC);
> --
> 2.20.1

Really the ARM_CPU_TYPE_NAME part of this change should be
in patch 1 I think...

Could you expand the commit message a little to explain why
we want to make the CPU a child of the SoC object?

thanks
-- PMM

Reply via email to