Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp907169imp; Thu, 21 Feb 2019 13:51:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IYb6v5m5DXo48V+FQR2eYQtuw1+Tgt/chNNjEFLMPcOzWZOhOWV8C+m88I3QJaXfcFeZPZU X-Received: by 2002:a65:6642:: with SMTP id z2mr675330pgv.196.1550785898024; Thu, 21 Feb 2019 13:51:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550785898; cv=none; d=google.com; s=arc-20160816; b=HM8hBOjAJa9vGXffyzFCqNQvSosk+FyP0ju4bupCf32zBiEPGNYw5ulMbM0X5DTrbS y11NOEi5ISZGVzZOJVBNjpXwCcx/o6L+AsplcjlD0KA7rsFIiAr60ouhzR8mvgPHTSlS RhgF8e1cYfg2sbZlSE7zLB29jELTOV8SD4oyXo7hVGvy4uEUd5CGUKineULg3VW2NZbB UJ8R289p9Xe1SsVsKQEZhHK2IrfMSy+57wT8iEEp4aLR5/oSSW5K2F0gUHzv69Zor+T/ AXrO472Vq6LYAjR0/mOgCVUx6awSEttn8vCXVXybGlavBneLLa/Kk2ib7dj0a+WmQrpl FYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:cc:to:subject:from:date:dkim-signature; bh=HBpaBF/AxOE2d1d6D+kIlVE9vLNXo5LOaqGhO54/UcE=; b=VBb+fcJeMdvuAbTz7XSObYReUnX3TQ6vV5FyS4oH7T0ChUgkAengmRl9zM+d1eRsFD 7X/KUtpHlpAm7rKfJnT4hDMQKmOzzTAhCNK6tfubOcatTJyLhHGtkZXCT9rXWoKGIU44 D1e/aKwl+jYwWqMwcddW7rtHyTMxdlt8unk0anGQdfukORG9LH3D1X4UPi5Mp6rqeS/5 bd/nXzdfIs0/uvLGTujfHxguci5j4rAC+nwR/xShPK6S6gm/yVsBns8QcUMQK75b8CpV FF91HAQOsI8LVnByX1hgB5qFcFrBMcL6K6R2wAvl6hK8bOrfM+TJR+8ViPKIEyc9TAOr yOaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=JRLybqwo; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si7214pgr.341.2019.02.21.13.51.21; Thu, 21 Feb 2019 13:51:38 -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=fail header.i=@crapouillou.net header.s=mail header.b=JRLybqwo; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726893AbfBUVu6 (ORCPT + 99 others); Thu, 21 Feb 2019 16:50:58 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:40852 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbfBUVu5 (ORCPT ); Thu, 21 Feb 2019 16:50:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1550785854; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HBpaBF/AxOE2d1d6D+kIlVE9vLNXo5LOaqGhO54/UcE=; b=JRLybqwooDCDDwsaX8ttlQ+ZbVwzBInFMUkuJ3uQ/UDTSZHAPo5fub/FYyWJULhY6gabxi dNowz0Xt+Q00k2klShTK5XU81vcWfaQKcy78MITkie7baxtR4mxT7wTR4+urfUFZN0amt9 nUv0SH5fJd7n75sOPkr+PKPeJPzDzCY= Date: Thu, 21 Feb 2019 18:50:43 -0300 From: Paul Cercueil Subject: Re: [PATCH] MIPS: ingenic: Add support for appended devicetree To: Jonas Gorski Cc: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <1550785843.28751.0@crapouillou.net> In-Reply-To: References: <20190221203820.7044-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonas, On Thu, 21 Feb 2019 at 21:39, Jonas Gorski wrote: > 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. Oops. You're right. > 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. Thanks, I will. Regards, -Paul