Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/evbsh3/evbsh3 Pullup 1.12 [msaitoh]:
details: https://anonhg.NetBSD.org/src/rev/2e66032111e8
branches: netbsd-1-5
changeset: 490148:2e66032111e8
user: tv <tv%NetBSD.org@localhost>
date: Sun Nov 05 01:06:37 2000 +0000
description:
Pullup 1.12 [msaitoh]:
avoid SH7709A's serious bug (it fails to read IPR* registers under particular
circumstances)
diffstat:
sys/arch/evbsh3/evbsh3/shb.c | 46 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 44 insertions(+), 2 deletions(-)
diffs (96 lines):
diff -r fe200e4dd067 -r 2e66032111e8 sys/arch/evbsh3/evbsh3/shb.c
--- a/sys/arch/evbsh3/evbsh3/shb.c Sun Nov 05 01:03:14 2000 +0000
+++ b/sys/arch/evbsh3/evbsh3/shb.c Sun Nov 05 01:06:37 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: shb.c,v 1.9.4.1 2000/08/21 18:20:56 msaitoh Exp $ */
+/* $NetBSD: shb.c,v 1.9.4.2 2000/11/05 01:06:37 tv Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@@ -382,7 +382,6 @@
#define IRQ_BIT(irq_num) (1 << (irq_num))
-
/*ARGSUSED*/
int /* 1 = check ipending on return, 0 = fast intr return */
intrhandler(p1, p2, p3, p4, frame)
@@ -509,20 +508,48 @@
}
#if !defined(SH4)
+
+#ifdef SH7709A_BROKEN_IPR /* broken IPR patch */
+
+#define IPRA 0
+#define IPRB 1
+#define IPRC 2
+#define IPRD 3
+#define IPRE 4
+
+static unsigned short ipr[ 5 ];
+
+#endif /* SH7709A_BROKEN_IPR */
+
void
mask_irq(irq)
int irq;
{
switch (irq) {
case TMU1_IRQ:
+#ifdef SH7709A_BROKEN_IPR
+ ipr[IPRA] &= ~((15)<<8);
+ SHREG_IPRA = ipr[IPRA];
+#else
SHREG_IPRA &= ~((15)<<8);
+#endif
break;
case SCI_IRQ:
+#ifdef SH7709A_BROKEN_IPR
+ ipr[IPRB] &= ~((15)<<4);
+ SHREG_IPRB = ipr[IPRB];
+#else
SHREG_IPRB &= ~((15)<<4);
+#endif
break;
#if defined(SH7709) || defined(SH7709A) || defined(SH7729)
case SCIF_IRQ:
+#ifdef SH7709A_BROKEN_IPR
+ ipr[IPRE] &= ~((15)<<4);
+ SHREG_IPRE = ipr[IPRE];
+#else
SHREG_IPRE &= ~((15)<<4);
+#endif
break;
#endif
#if 0
@@ -552,14 +579,29 @@
switch (irq) {
case TMU1_IRQ:
+#ifdef SH7709A_BROKEN_IPR
+ ipr[ IPRA ] |= ((15 - irq)<<8);
+ SHREG_IPRA = ipr[ IPRA ];
+#else
SHREG_IPRA |= ((15 - irq)<<8);
+#endif
break;
case SCI_IRQ:
+#ifdef SH7709A_BROKEN_IPR
+ ipr[IPRB] |= ((15 - irq)<<4);
+ SHREG_IPRB = ipr[IPRB];
+#else
SHREG_IPRB |= ((15 - irq)<<4);
+#endif
break;
#if defined(SH7709) || defined(SH7709A) || defined(SH7729)
case SCIF_IRQ:
+#ifdef SH7709A_BROKEN_IPR
+ ipr[ IPRE ] |= ((15 - irq)<<4);
+ SHREG_IPRE = ipr[ IPRE ];
+#else
SHREG_IPRE |= ((15 - irq)<<4);
+#endif
break;
#endif
#if 0
Home |
Main Index |
Thread Index |
Old Index