From a08758835a3cf82424f37b6b3c0a5356d533c1a3 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 14 Jul 2012 07:57:26 +0000 Subject: [PATCH] Add intrbase locator to mainbus. --- sys/arch/arm/conf/files.arm | 4 ++-- sys/arch/arm/mainbus/mainbus.c | 5 +++-- sys/arch/arm/mainbus/mainbus.h | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/arch/arm/conf/files.arm b/sys/arch/arm/conf/files.arm index 863035eccd62..3037e1ef0bd7 100644 --- a/sys/arch/arm/conf/files.arm +++ b/sys/arch/arm/conf/files.arm @@ -1,4 +1,4 @@ -# $NetBSD: files.arm,v 1.104 2012/07/13 05:23:29 matt Exp $ +# $NetBSD: files.arm,v 1.105 2012/07/14 07:57:26 matt Exp $ # temporary define to allow easy moving to ../arch/arm/arm32 defflag ARM32 @@ -78,7 +78,7 @@ file arch/arm/arm/fiq.c file arch/arm/arm/fiq_subr.S # mainbus files -device mainbus { [base = -1], [size = 0], [dack = -1], [irq = -1] } +device mainbus { [base = -1], [size = 0], [dack = -1], [irq = -1], [intrbase = -1] } attach mainbus at root file arch/arm/mainbus/mainbus.c mainbus & arm32 file arch/arm/mainbus/mainbus_io.c mainbus & arm32 diff --git a/sys/arch/arm/mainbus/mainbus.c b/sys/arch/arm/mainbus/mainbus.c index 3d6055811aba..cd99d09387d0 100644 --- a/sys/arch/arm/mainbus/mainbus.c +++ b/sys/arch/arm/mainbus/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.18 2011/07/01 20:31:39 dyoung Exp $ */ +/* $NetBSD: mainbus.c,v 1.19 2012/07/14 07:57:26 matt Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.18 2011/07/01 20:31:39 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.19 2012/07/14 07:57:26 matt Exp $"); #include #include @@ -142,6 +142,7 @@ mainbussearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) mb.mb_drq = cf->cf_loc[MAINBUSCF_DACK]; mb.mb_irq = cf->cf_loc[MAINBUSCF_IRQ]; } + mb.mb_intrbase = cf->cf_loc[MAINBUSCF_INTRBASE]; mb.mb_iot = &mainbus_bs_tag; tryagain = 0; diff --git a/sys/arch/arm/mainbus/mainbus.h b/sys/arch/arm/mainbus/mainbus.h index 7fc51c67ab1c..aa54e24ec929 100644 --- a/sys/arch/arm/mainbus/mainbus.h +++ b/sys/arch/arm/mainbus/mainbus.h @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.h,v 1.2 2011/07/01 20:31:39 dyoung Exp $ */ +/* $NetBSD: mainbus.h,v 1.3 2012/07/14 07:57:26 matt Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -52,6 +52,7 @@ struct mainbus_attach_args { int mb_iosize; /* span of ports used */ int mb_irq; /* interrupt request */ int mb_drq; /* DMA request */ + int mb_intrbase; /* interrupt numbering base */ void *mb_aux; /* driver specific */ bus_space_tag_t mb_iot; /* bus space tag */ };