summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2006-03-07 22:35:58 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2006-03-07 22:35:58 +0000
commite0c136191a5a534be0a9ff5ad292bf33aa1e3245 (patch)
treeffcf0db59a41a555ca7b29d5cd330a13855bd418 /sys
parent1a73fef118e273170531ddee5b3455bb725f7f99 (diff)
Fix collision between SI_SOFTSERIAL and OS timers in the interrupt mask.
The new allocation of softintr bits complicates SI_TO_IRQBIT, but I see no safe way around it.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/xscale/pxa2x0_intr.c11
-rw-r--r--sys/arch/arm/xscale/pxa2x0reg.h6
2 files changed, 10 insertions, 7 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c
index 16c8ea63234..48842d81eed 100644
--- a/sys/arch/arm/xscale/pxa2x0_intr.c
+++ b/sys/arch/arm/xscale/pxa2x0_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_intr.c,v 1.12 2005/08/08 16:30:47 uwe Exp $ */
+/* $OpenBSD: pxa2x0_intr.c,v 1.13 2006/03/07 22:35:57 uwe Exp $ */
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -181,10 +181,13 @@ pxa2x0_intr_bootstrap(vaddr_t addr)
}
/*
- * Cotulla's integrated ICU doesn't have IRQ0..7, PXA27x has useful
- * interrupts 0..3, so we map software interrupts to bit 4..7.
+ * PXA27x has MSL interface and SSP3 interrupts [0,1], USIM interface
+ * and SSP2 interrupts [15,16]. PXA255 has bits [0..6,15] reserved and
+ * bit [16] network SSP interrupt. We don't need any of those, so we
+ * map software interrupts to bits [0..1,15..16]. Sadly there are no
+ * four contiguous bits safe enough to use on both processors.
*/
-#define SI_TO_IRQBIT(si) (1U<<(4+(si)))
+#define SI_TO_IRQBIT(si) ((si) < 2 ? 1U<<(si) : 1U<<(15-2+(si)))
/*
* Map a software interrupt queue to an interrupt priority level.
diff --git a/sys/arch/arm/xscale/pxa2x0reg.h b/sys/arch/arm/xscale/pxa2x0reg.h
index 5418d8b4eac..953f16a17f2 100644
--- a/sys/arch/arm/xscale/pxa2x0reg.h
+++ b/sys/arch/arm/xscale/pxa2x0reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0reg.h,v 1.26 2006/03/07 22:12:46 uwe Exp $ */
+/* $OpenBSD: pxa2x0reg.h,v 1.27 2006/03/07 22:35:57 uwe Exp $ */
/* $NetBSD: pxa2x0reg.h,v 1.4 2003/06/11 20:43:01 scw Exp $ */
/*
@@ -131,8 +131,8 @@
#define PXA2X0_IRQ_MIN 1
/*
- * [4..7] are used as soft intrs by SI_TO_IRQBIT,
- * and [0,1,15,16] are not used by us.
+ * [0..1,15..16] are used as soft intrs by SI_TO_IRQBIT,
+ * and [4..6] are not likely to be used by us.
*/
#define PXA2X0_INT_USBH2 2 /* USB host (all other events) */
#define PXA2X0_INT_USBH1 3 /* USB host (OHCI) */