Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Let the "cbar" device property override ...
details: https://anonhg.NetBSD.org/src/rev/a3ec037170e8
branches: trunk
changeset: 334741:a3ec037170e8
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Dec 05 01:11:25 2014 +0000
description:
Let the "cbar" device property override the cbar value, to work around broken bootloaders
diffstat:
sys/arch/arm/cortex/armperiph.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r fafdbee82930 -r a3ec037170e8 sys/arch/arm/cortex/armperiph.c
--- a/sys/arch/arm/cortex/armperiph.c Thu Dec 04 21:50:29 2014 +0000
+++ b/sys/arch/arm/cortex/armperiph.c Fri Dec 05 01:11:25 2014 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index