Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp881825imp; Thu, 21 Feb 2019 13:14:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IbgPrQBIkcIMX5fujWRzgwlsQTi1857AzB0L3UGk/LbXRg4DQ58XmgpDKUROE1OF3ybkm93 X-Received: by 2002:a17:902:b101:: with SMTP id q1mr597551plr.296.1550783682101; Thu, 21 Feb 2019 13:14:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550783682; cv=none; d=google.com; s=arc-20160816; b=crlh4FUyDJoyGGng1jUaHrceYOlCjvBDyCh+n/XQkLS0XOewszhv9EGg6m9XnuC1ql yV1kjlEnCHJGpDIrE66M1RE4Xy9FV07OTO+9C/AjmnTepqPN6RxGT1DeC5Y1dtnBMzbf wiWZ52eaAN5QqUgp9JZBvIRIkBtSEa0yNsPmPGJVfBvSdsKQxjjMw96diZJUyQhzKVSI Ami13Y5ldTzMFAT1zx6roKLGe49R3ZCHFmZhXOvPYgYC01tbQifEE1LdsRvZl8VnTejD UwBYWk2MF7C2c3yTBinJUdICpXXLyHDM4Q+ga/xaynaFol3Js+LGLEyE+rNwYsiywCLe G+0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PramYZvIyZ1cJpZWKaIMwNL+tlzfLoaSYlmfFhVMK4Y=; b=KepSeLk4l8+LJFy2O/6Rd7c68bJN4+4sKZfbIEU68FKgPQRUVXa+lGAT22GWXMNuBy 61Be4ARg+a7Oc6hsYiGahSwZpyhkdrhswUcmhuJwLbvOMf8qASCZiumr8ly/TAinz5PF xabc20xWv2JaP2GCdYblcHQgLXZ2n3Kk3YaKGH6l4tL4gL5xJHxy6PBFLp5hwwcYYFMo zSB5qrw5oBS+I7W61n8uOoohb26XPrMlaTTMfSc0Py6Dc5mGzcz2jMkyQh4tuU44Yig4 J8ROZnUMxvjkcw/0oCOOrAZSHIBgV4gqdyR0h11KQNqRO9z3gUtM0xoYZe5yUqFRAdJH PJ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HN7YGBZr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si19803988pfm.39.2019.02.21.13.14.25; Thu, 21 Feb 2019 13:14:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HN7YGBZr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726409AbfBUVN6 (ORCPT + 99 others); Thu, 21 Feb 2019 16:13:58 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34166 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725891AbfBUVN5 (ORCPT ); Thu, 21 Feb 2019 16:13:57 -0500 Received: by mail-wm1-f67.google.com with SMTP id y185so7525906wmd.1; Thu, 21 Feb 2019 13:13:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PramYZvIyZ1cJpZWKaIMwNL+tlzfLoaSYlmfFhVMK4Y=; b=HN7YGBZrx+jA7ANnB1ZG1wIfR+GMX8iiAvwmid9sADKVyc0hldLOHuL54ebcZ/BGF4 n/I9wnd5mNoGDAyE7+LEBYh7UtyNzNdcmVWcA2EcsX5fMZJ3syzy4pL6NQCIYpvlEahj VCfei7NlTNujNvDK3faBPDLGCyXqMYA/BKGxRqyFg1n/o3OshZbZ0KS5x8WSp4UmRZSJ Nqdr7ihf0WhSGKNKwbzs/UAHk7l6h3OiQimKasALCIokDCxiI4uNZuO2KbqsGCOepNqh dodqLAxNqtLDtcySm8VvzWkbmBLtO3E9ZYs4utGiGvvWH+9ziHZ3pY3XM8rQF05HHfZJ OrSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PramYZvIyZ1cJpZWKaIMwNL+tlzfLoaSYlmfFhVMK4Y=; b=fIsE5sUBQpM5HgKhRxuxTsVxawQ8Y9tXmbKaZUPlDFZ/Iq6/hUyqrFFUb4Qjy6EMuG 6PVLjqFE8eWrgEO4LqqykTjBsyLD0tDqyiBnHMPfy8DJgvdcNm7zAKeyiY0NflyoQvI+ +2bk8KYVzczezIqRp9AL9Jp3UI91ePcy/kmO+TZ5XmMtzt6q6FuqmrOI0/SOJvHPDjyF FJy15TIAQa8YDyy5FTkp9hqYbKyPfhF6i7DUokZdwzQiocuY7icUBiSHmdKTGp71lh4c 3G2ZBGDwC3hfVryyRzsPNHWAsqN5+EpNCxpymKiYEdciyzWg9ZkUgjbwMcmO9A1fqh7W KECg== X-Gm-Message-State: AHQUAua5Mkh77d0ugnqkleio4rUNPWbCpKRCcvqsXXPxCvMNq1l1TemK BbZ1J018tNAW4e8xdUrk/5Inrgvy+mX4NZc1XKvhABdk X-Received: by 2002:a1c:ca01:: with SMTP id a1mr286932wmg.124.1550783635899; Thu, 21 Feb 2019 13:13:55 -0800 (PST) MIME-Version: 1.0 References: <20190221203820.7044-1-paul@crapouillou.net> In-Reply-To: <20190221203820.7044-1-paul@crapouillou.net> From: Jonas Gorski Date: Thu, 21 Feb 2019 22:13:55 +0100 Message-ID: Subject: Re: [PATCH] MIPS: ingenic: Add support for appended devicetree To: Paul Cercueil Cc: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Feb 2019 at 21:39, Paul Cercueil wrote: > > Add support for booting the kernel from an externally-appended > devicetree, if no devicetree was built-in. > > Signed-off-by: Paul Cercueil > --- > arch/mips/Kconfig | 2 +- > arch/mips/jz4740/setup.c | 14 +++++++++++--- > 2 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index a84c24d894aa..8b7ea9062198 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -391,7 +391,7 @@ config MACH_INGENIC > select GPIOLIB > select COMMON_CLK > select GENERIC_IRQ_CHIP > - select BUILTIN_DTB > + select BUILTIN_DTB if MIPS_NO_APPENDED_DTB > select USE_OF > select LIBFDT > > diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c > index afb40f8bce96..5c00064937c4 100644 > --- a/arch/mips/jz4740/setup.c > +++ b/arch/mips/jz4740/setup.c > @@ -31,6 +31,7 @@ > > #define JZ4740_EMC_SDRAM_CTRL 0x80 > > +extern const char __appended_dtb; Does this build/link with MIPS_NO_APPENDED_DTB? I would assume it won't be able to resolve the symbol in that case. You can also just use fw_passed_dtb from asm/bootinfo.h, which will be populated automatically from fw_args (if UHI) or __appended_dtb (if present and valid)[1], without having to care where it came from. Regards Jonas [1] https://elixir.bootlin.com/linux/latest/source/arch/mips/kernel/head.S#L96