From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81FF0C63793 for ; Thu, 22 Jul 2021 10:44:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A06761279 for ; Thu, 22 Jul 2021 10:44:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A06761279 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j+D9go6qy3qQHurI9yHfQ6ai8VZmGI4nKhhDstleft8=; b=sHUvFCsrANWC4n 1YKxgbpc8954teitBHrqlTqN2jrBnpPnPJHLA0tnGRCw8Mo5iWBpg83Nv90GuwJUMTeTpT9N3gn1k r3539eO9KhkzY3YFyginS9+TdD8cepy3w7jLKe93SGUltTGFxlHWGMUt2RvBRUu9QqXDy5VY9VDWA XMOIkN7YLOlx/iIfO0qpdm1lhep2VwJ3jS8CItahoZaoRwgJ9r8ibexV8CsZnjkIGuMjTzxKenXxS PoK705Lxi2xVMCoBCmwZlt0q/WuFNJk+T3s66UCBzrxiJIuzvZakRzUrJ10e+4TIfLVGeJWg+O/Yl HyOLiJHH+OQGjPncTUlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6WA4-001FxR-T1; Thu, 22 Jul 2021 10:42:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6WA0-001Fwi-4K for linux-arm-kernel@lists.infradead.org; Thu, 22 Jul 2021 10:42:37 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9051C31B; Thu, 22 Jul 2021 03:42:34 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.9.64]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 548803F73D; Thu, 22 Jul 2021 03:42:33 -0700 (PDT) Date: Thu, 22 Jul 2021 11:42:30 +0100 From: Mark Rutland To: Jaxson Han Cc: andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, wei.chen@arm.com Subject: Re: [boot-wrapper PATCH v3 1/8] Decouple V2M_SYS config by auto-detect dtb node Message-ID: <20210722104230.GB12199@C02TD0UTHF1T.local> References: <20210525062509.201464-1-jaxson.han@arm.com> <20210525062509.201464-2-jaxson.han@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210525062509.201464-2-jaxson.han@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210722_034236_268306_323BF862 X-CRM114-Status: GOOD ( 19.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 25, 2021 at 02:25:02PM +0800, Jaxson Han wrote: > An auto-detect switch is added to make it an option to enable/disable > 'arm,vexpress-sysreg', because not all platforms support this feature. > > But the auto-detection generates the side-effect of printing a warning > message about the missing node: > No matching devices found at ./findbase.pl line 37. > > In this case, to drop the warning message, add "2> /dev/null" at the > end of the findbase.pl call. > > Signed-off-by: Jaxson Han > Reviewed-by: Andre Przywara This looks good to me; I'll apply it shortly. Thanks, Mark. > --- > Makefile.am | 4 ++-- > platform.c | 4 ++++ > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/Makefile.am b/Makefile.am > index af694b7..ef6b793 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -10,7 +10,7 @@ > # VE > PHYS_OFFSET := $(shell perl -I $(top_srcdir) $(top_srcdir)/findmem.pl $(KERNEL_DTB)) > UART_BASE := $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011') > -SYSREGS_BASE := $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg') > +SYSREGS_BASE := $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg' 2> /dev/null) > CNTFRQ := 0x01800000 # 24Mhz > > CPU_IDS := $(shell perl -I $(top_srcdir) $(top_srcdir)/findcpuids.pl $(KERNEL_DTB)) > @@ -19,7 +19,7 @@ NR_CPUS := $(shell echo $(CPU_IDS) | tr ',' ' ' | wc -w) > DEFINES = -DCNTFRQ=$(CNTFRQ) > DEFINES += -DCPU_IDS=$(CPU_IDS) > DEFINES += -DNR_CPUS=$(NR_CPUS) > -DEFINES += -DSYSREGS_BASE=$(SYSREGS_BASE) > +DEFINES += $(if $(SYSREGS_BASE), -DSYSREGS_BASE=$(SYSREGS_BASE), ) > DEFINES += -DUART_BASE=$(UART_BASE) > DEFINES += -DSTACK_SIZE=256 > > diff --git a/platform.c b/platform.c > index a528a55..d11f568 100644 > --- a/platform.c > +++ b/platform.c > @@ -23,10 +23,12 @@ > > #define PL011(reg) ((void *)UART_BASE + PL011_##reg) > > +#ifdef SYSREGS_BASE > #define V2M_SYS_CFGDATA 0xa0 > #define V2M_SYS_CFGCTRL 0xa4 > > #define V2M_SYS(reg) ((void *)SYSREGS_BASE + V2M_SYS_##reg) > +#endif > > static void print_string(const char *str) > { > @@ -59,6 +61,7 @@ void init_platform(void) > > print_string("Boot-wrapper v0.2\r\n\r\n"); > > +#ifdef SYSREGS_BASE > /* > * CLCD output site MB > */ > @@ -66,4 +69,5 @@ void init_platform(void) > /* START | WRITE | MUXFPGA | SITE_MB */ > raw_writel((1 << 31) | (1 << 30) | (7 << 20) | (0 << 16), > V2M_SYS(CFGCTRL)); > +#endif > } > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel