Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip attach devices marked "crit 1" first
details: https://anonhg.NetBSD.org/src/rev/d79d86181c1f
branches: trunk
changeset: 335329:d79d86181c1f
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jan 03 13:26:31 2015 +0000
description:
attach devices marked "crit 1" first
diffstat:
sys/arch/arm/rockchip/files.rockchip | 4 ++--
sys/arch/arm/rockchip/obio.c | 14 ++++++++++----
2 files changed, 12 insertions(+), 6 deletions(-)
diffs (61 lines):
diff -r c65cdc25a4dc -r d79d86181c1f sys/arch/arm/rockchip/files.rockchip
--- a/sys/arch/arm/rockchip/files.rockchip Sat Jan 03 13:20:11 2015 +0000
+++ b/sys/arch/arm/rockchip/files.rockchip Sat Jan 03 13:26:31 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.rockchip,v 1.7 2015/01/02 23:20:18 jmcneill Exp $
+# $NetBSD: files.rockchip,v 1.8 2015/01/03 13:26:31 jmcneill Exp $
#
# Configuration info for Rockchip ARM Peripherals
#
@@ -19,7 +19,7 @@
file arch/arm/arm/bus_space_a4x.S obio
# On-board I/O
-device obio {[addr = -1], [size = -1], [width = -1], [intr = -1], [mult = 1], [port = -1]}: bus_space_generic
+device obio {[addr = -1], [size = -1], [width = -1], [intr = -1], [mult = 1], [port = -1], [crit = 0]}: bus_space_generic
attach obio at mainbus
file arch/arm/rockchip/obio.c obio
diff -r c65cdc25a4dc -r d79d86181c1f sys/arch/arm/rockchip/obio.c
--- a/sys/arch/arm/rockchip/obio.c Sat Jan 03 13:20:11 2015 +0000
+++ b/sys/arch/arm/rockchip/obio.c Sat Jan 03 13:26:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.10 2015/01/02 23:23:17 jmcneill Exp $ */
+/* $NetBSD: obio.c,v 1.11 2015/01/03 13:26:31 jmcneill Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
#include "opt_rockchip.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.10 2015/01/02 23:23:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.11 2015/01/03 13:26:31 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -101,9 +101,11 @@
/*
* Attach all on-board devices as described in the kernel
- * configuration file.
+ * configuration file. Attach devices marked "crit 1" first.
*/
- config_search_ia(obio_search, self, "obio", NULL);
+ for (int crit = 1; crit >= 0; crit--) {
+ config_search_ia(obio_search, self, "obio", &crit);
+ }
}
int
@@ -131,6 +133,10 @@
{
struct obio_attach_args obio;
bus_addr_t addr = cf->cf_loc[OBIOCF_ADDR];
+ int crit = *(int *)aux;
+
+ if (cf->cf_loc[OBIOCF_CRIT] != crit)
+ return 0;
if (addr >= ROCKCHIP_CORE0_BASE &&
addr < ROCKCHIP_CORE0_BASE + ROCKCHIP_CORE0_SIZE) {
Home |
Main Index |
Thread Index |
Old Index