From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424467AbcKPWke (ORCPT ); Wed, 16 Nov 2016 17:40:34 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:48483 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422822AbcKPWk0 (ORCPT ); Wed, 16 Nov 2016 17:40:26 -0500 Date: Wed, 16 Nov 2016 14:40:24 -0800 From: Guenter Roeck To: Fabio Estevam Cc: Mark Rutland , Fabio Estevam , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: Boot failures in -next due to 'ARM: dts: imx: Remove skeleton.dtsi' Message-ID: <20161116224024.GA11821@roeck-us.net> References: <20161116184649.GF11228@leverpostej> <20161116221002.GA19925@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. 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. 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. 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); From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@roeck-us.net (Guenter Roeck) Date: Wed, 16 Nov 2016 14:40:24 -0800 Subject: Boot failures in -next due to 'ARM: dts: imx: Remove skeleton.dtsi' In-Reply-To: References: <20161116184649.GF11228@leverpostej> <20161116221002.GA19925@roeck-us.net> Message-ID: <20161116224024.GA11821@roeck-us.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 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. 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. 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. 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);