diff options
author | Jaxson Han <jaxson.han@arm.com> | 2021-05-25 14:25:02 +0800 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2021-07-22 11:30:09 +0100 |
commit | 3728ea63cd051991be019ae07601b4b9a4f21a0b (patch) | |
tree | ea05c7f52904b1350ce0c85aed0fb039dfeabe49 | |
parent | 114a9fa2e031f94821d96b1b8b2fc6d5e7b60a51 (diff) | |
download | boot-wrapper-aarch64-3728ea63cd051991be019ae07601b4b9a4f21a0b.tar.gz |
Decouple V2M_SYS config by auto-detect dtb node
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 <jaxson.han@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | 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 @@ -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 } |