linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: Boot failures in -next due to 'ARM: dts: imx: Remove skeleton.dtsi'
Date: Thu, 17 Nov 2016 10:55:13 +0000	[thread overview]
Message-ID: <20161117105513.GA12273@leverpostej> (raw)
In-Reply-To: <20161116224024.GA11821@roeck-us.net>

On Wed, Nov 16, 2016 at 02:40:24PM -0800, Guenter Roeck wrote:
> On Wed, Nov 16, 2016 at 08:27:09PM -0200, Fabio Estevam wrote:
> > Hi Guenter,
> > 
> > On Wed, Nov 16, 2016 at 8:10 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > >
> > > Anyway, I guess the problem is that the "official" dtb files no longer provide
> > > the skeleton /chosen and /memory nodes (and maybe others), and qemu seems to
> > > expect that they are provided. Is that correct ?
> > 
> > imx6qdl-sabrelite.dtsi provides chosen and memory nodes.
> 
> Yes, but not the 'device_type' property, which the kernel seems to expect.

Memory nodes require this property per ePAPR and the devicetree.org
spec, so the bug is that we didn't add those when removing the
skeleton.dtsi include.

> The qemu patch below fixes the problem for sabrelite, I just don't know
> if that is really the way to go. You tell me; I'll be happy to submit
> the necessary patch(es) into qemu.

As above, I don't think the below patch is necessary. The dt should have
this property to begin with.

> The same is true for 'chosen'. Right now qemu expects this node to exist.
> It does exist for sabrelite, but apparently not for imx25-pdk.

Having QEMU create a /chosen node if one does not exist already sounds
sensible to me.

Thanks,
Mark.

> Guenter
> 
> ---
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index 1b913a4..080d1e5 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -486,6 +486,12 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
>              g_free(nodename);
>          }
>      } else {
> +        Error *err = NULL;
> +
> +        if (!qemu_fdt_getprop(fdt, "/memory", "device_type", NULL, &err)) {
> +            qemu_fdt_setprop_string(fdt, "/memory", "device_type", "memory");
> +        }
> +
>          rc = qemu_fdt_setprop_sized_cells(fdt, "/memory", "reg",
>                                            acells, binfo->loader_start,
>                                            scells, binfo->ram_size);

  parent reply	other threads:[~2016-11-17 10:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 17:45 Boot failures in -next due to 'ARM: dts: imx: Remove skeleton.dtsi' Guenter Roeck
2016-11-16 18:43 ` Fabio Estevam
2016-11-16 18:46 ` Mark Rutland
2016-11-16 22:10   ` Guenter Roeck
2016-11-16 22:27     ` Fabio Estevam
2016-11-16 22:40       ` Guenter Roeck
2016-11-16 22:59         ` Fabio Estevam
2016-11-17 10:55         ` Mark Rutland [this message]
2016-11-17 14:44           ` Guenter Roeck
2016-11-17 15:05             ` Mark Rutland
2016-11-17 16:17               ` Guenter Roeck
2016-11-17 16:39                 ` Mark Rutland
2016-11-17 17:23                   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161117105513.GA12273@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).