Module Name: src
Committed By: jmcneill
Date: Fri Dec 5 01:11:25 UTC 2014
Modified Files:
src/sys/arch/arm/cortex: armperiph.c
Log Message:
Let the "cbar" device property override the cbar value, to work around broken
bootloaders
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/cortex/armperiph.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/cortex/armperiph.c
diff -u src/sys/arch/arm/cortex/armperiph.c:1.4 src/sys/arch/arm/cortex/armperiph.c:1.5
--- src/sys/arch/arm/cortex/armperiph.c:1.4 Thu Jun 20 05:30:21 2013
+++ src/sys/arch/arm/cortex/armperiph.c Fri Dec 5 01:11:25 2014
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.4 2013/06/20 05:30:21 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: armperiph.c,v 1.5 2014/12/05 01:11:25 jmcneill Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -170,6 +170,11 @@ armperiph_attach(device_t parent, device
struct mainbus_attach_args * const mb = aux;
bus_addr_t cbar = armreg_cbar_read();
const struct mpcore_config * const cfg = armperiph_find_config();
+ prop_dictionary_t prop = device_properties(self);
+ uint32_t cbar_override;
+
+ if (prop_dictionary_get_uint32(prop, "cbar", &cbar_override))
+ cbar = (bus_addr_t)cbar_override;
/*
* The normal mainbus bus space will not work for us so the port's