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=-17.1 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, USER_AGENT_GIT 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 AD9E5C433B4 for ; Fri, 21 May 2021 10:51:02 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 72DC1613B6 for ; Fri, 21 May 2021 10:51:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72DC1613B6 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YU52vQB1TDgw835mH/3VQo1u3RzMrihH54vPbRBjsQQ=; b=JUb2R6tHd4wxAj5vKzr3CozbYF PfkD/Hj4c1e3+aBss4fju6LbcusjnaySYpc8DYxkUUYZhnNiaF0ysM2KBh65A49O+XeLUkCE7St7R 3+Qz+77WZI0wfkPFbOhhcIi952idLK8rQr1dUou3f3Le6p0LjC14D9OfHDM5uIRbozyV2Tprz+k0A 2euYmwxlOU+FGkre9GZiflFiHtZbLTEIxy7+T+5cSokDja9H5AwlSAor0XG+ODekakdwKonfCjRyi JL1uzw9y3HuQdgjTIHf7aJ8sy34CwfeuRZCRXIleunpaRiNjZyRhI72qDdAtCpakDK6XudmStTyDA H4JALtIA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk2hm-00506L-5B; Fri, 21 May 2021 10:48:34 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk2hi-00505C-VK for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 10:48:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=sd0Bmaqah4VjZKs1fAZMSitNJVLkB5Af5L1JhWa9E14=; b=PW1lm+jGTerm0aKICHe1BnTKwS aefdKFXHWmjkh2d7WVrFQwHqhcrap2e+lUS86klodHvK0uGnQAuGaMIPdISL97Za6QA/tRo1KLPK0 ofRRycbm2FTFOWgchqVGHpCn2jXOpPC3+VFkFzeege8PIGpXiVlIUYrmJrge3oz07YdijYA497TGW +Hmvo9I8nsc4c5D7+TB3DS0mPLIUGwM/pcqKrLDy0dSkwvaC5TdMF73UThnd3i423auSCv/+2RncV bbM0mJIhzkD1xo83LzTQQxtDshlAFQ5qtTQk7Fq3hKvCK2l/vVMk6c20ZWylgjyIwM0QEUwso0qLJ y4ukhRRQ==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lk2he-00H37L-5n for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 10:48:29 +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 7E3461480; Fri, 21 May 2021 03:48:23 -0700 (PDT) Received: from optiplex-7070.shanghai.arm.com (optiplex-7070.shanghai.arm.com [10.169.188.115]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A81323F73D; Fri, 21 May 2021 03:48:21 -0700 (PDT) From: Jaxson Han To: mark.rutland@arm.com, andre.przywara@arm.com Cc: linux-arm-kernel@lists.infradead.org, wei.chen@arm.com, jaxson.han@arm.com Subject: [boot-wrapper PATCH v2 1/8] Decouple V2M_SYS config by auto-detect dtb node Date: Fri, 21 May 2021 18:48:00 +0800 Message-Id: <20210521104807.138269-2-jaxson.han@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210521104807.138269-1-jaxson.han@arm.com> References: <20210521104807.138269-1-jaxson.han@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_034826_283829_7A0022E9 X-CRM114-Status: GOOD ( 11.43 ) 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 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 --- 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