From patchwork Wed Nov 16 22:40:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9433153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5EFC36021C for ; Wed, 16 Nov 2016 22:42:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FE1C28F01 for ; Wed, 16 Nov 2016 22:42:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44D8F29179; Wed, 16 Nov 2016 22:42:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D554B28F01 for ; Wed, 16 Nov 2016 22:42:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c78ss-0001xR-AC; Wed, 16 Nov 2016 22:40:50 +0000 Received: from bh-25.webhostbox.net ([208.91.199.152]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c78so-0001ve-MN for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2016 22:40:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date; bh=IWAuKcilpUb7Am4O6tjfSVjBJX7iPn5x0IggP0CNoIk=; b=No7z9Lve0D60MVHjHNMT4F26Tc NVm9Xjnt9m1iWzmFBeq2c+Y55ZrUsaqJubfhJroRghEH4xPlTjQZZemm+ubjwCi66yG5hL3a/4/BI MExIrRUpsub10TidpZOXbhmqS73EMF0CP6VvtBshbBWyjmpU4moUXuAdrIVWVRnzdtCnjj0Zx1TGo 9LRk+9ZaxBvJbzUmPKkZ6XN9kELs8+BR2IIH9FOyd1t8wLYD3PiYNt1Opp9wfYaZbG/geiFZb8p+3 DL+znI8wF4fRaaguNQ4iXArw5JAsC+BxI/inx8iH5ochpmJBV3j3lHafLMfOUe0M/WswapUQeFc41 TnR7Hk2g==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:58328 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1c78sQ-001nNJ-8r; Wed, 16 Nov 2016 22:40:22 +0000 Date: Wed, 16 Nov 2016 14:40:24 -0800 From: Guenter Roeck To: Fabio Estevam 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-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 - lists.infradead.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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161116_144046_870669_997A0754 X-CRM114-Status: GOOD ( 15.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Fabio Estevam , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);