All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaxson Han <jaxson.han@arm.com>
To: mark.rutland@arm.com
Cc: linux-arm-kernel@lists.infradead.org, wei.chen@arm.com,
	andre.przywara@arm.com, jaxson.han@arm.com
Subject: [boot-wrapper PATCH 1/5] Decouple V2M_SYS config by auto-detect dtb node
Date: Tue, 20 Apr 2021 15:24:34 +0800	[thread overview]
Message-ID: <20210420072438.183086-2-jaxson.han@arm.com> (raw)
In-Reply-To: <20210420072438.183086-1-jaxson.han@arm.com>

An auto-detect switch is added to make it an option to enable/disable
'arm,vexpress-sysreg', because not all platforms support this feature.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
---
 Makefile.am | 2 +-
 platform.c  | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index af694b7..e131207 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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

  reply	other threads:[~2021-04-20  7:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  7:24 [boot-wrapper PATCH 0/5] Add Armv8-R AArch64 support Jaxson Han
2021-04-20  7:24 ` Jaxson Han [this message]
2021-04-26 11:30   ` [boot-wrapper PATCH 1/5] Decouple V2M_SYS config by auto-detect dtb node Andre Przywara
2021-04-28  3:23     ` Jaxson Han
2021-05-10  8:30       ` Andre Przywara
2021-05-10  8:45         ` Jaxson Han
2021-04-20  7:24 ` [boot-wrapper PATCH 2/5] aarch64: Rename labels and prepare for lower EL booting Jaxson Han
2021-04-26 11:40   ` Andre Przywara
2021-04-28  3:28     ` Jaxson Han
2021-04-20  7:24 ` [boot-wrapper PATCH 3/5] gic-v3: Prepare for gicv3 with EL2 Jaxson Han
2021-04-26 11:48   ` Andre Przywara
2021-04-28  3:30     ` Jaxson Han
2021-04-20  7:24 ` [boot-wrapper PATCH 4/5] aarch64: Prepare for booting " Jaxson Han
2021-04-26 11:51   ` Andre Przywara
2021-04-20  7:24 ` [boot-wrapper PATCH 5/5] aarch64: Introduce EL2 boot code for Armv8-R AArch64 Jaxson Han
2021-04-26 12:35   ` Andre Przywara
2021-04-28  3:44     ` Jaxson Han
2021-05-10  2:13       ` Jaxson Han
2021-05-10  8:54         ` Andre Przywara
2021-05-11  2:03           ` Jaxson Han
2021-05-11  7:59             ` Andre Przywara
2021-05-11  9:49               ` Jaxson Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210420072438.183086-2-jaxson.han@arm.com \
    --to=jaxson.han@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=wei.chen@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.