[Glibc-bsd-commits] r3686 - trunk/kfreebsd-9/debian/patches

Robert Millan rmh at alioth.debian.org
Sat Aug 20 14:26:49 UTC 2011


Author: rmh
Date: 2011-08-20 14:26:49 +0000 (Sat, 20 Aug 2011)
New Revision: 3686

Modified:
   trunk/kfreebsd-9/debian/patches/006_mips_i8259_alloc.diff
Log:
Extend 006_mips_i8259_alloc.diff to also fix i8254 registration

Modified: trunk/kfreebsd-9/debian/patches/006_mips_i8259_alloc.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/006_mips_i8259_alloc.diff	2011-08-17 12:10:42 UTC (rev 3685)
+++ trunk/kfreebsd-9/debian/patches/006_mips_i8259_alloc.diff	2011-08-20 14:26:49 UTC (rev 3686)
@@ -1,6 +1,14 @@
 --- a/sys/mips/malta/gt_pci.c
 +++ b/sys/mips/malta/gt_pci.c
-@@ -401,7 +401,22 @@
+@@ -59,6 +59,7 @@
+ #include <machine/bus.h>
+ #include <machine/cpu.h>
+ #include <machine/pmap.h>
++#include <machine/timerreg.h>
+ 
+ #include <mips/malta/maltareg.h>
+ 
+@@ -401,7 +402,26 @@
  	}
  
  	/* Initialize memory and i/o rmans. */
@@ -14,13 +22,29 @@
 +
 +		res = bus_alloc_resource(child, SYS_RES_IOPORT, &rid, IO_ICU1, IO_ICU1 + IO_ICUSIZE, IO_ICUSIZE, RF_ACTIVE);
 +		if (res == NULL)
-+			device_printf(child, "cannot allocate registers\n");
++			device_printf(child, "cannot allocate registers for i8259 controller #1\n");
 +
 +		res = bus_alloc_resource(child, SYS_RES_IOPORT, &rid, IO_ICU2, IO_ICU2 + IO_ICUSIZE, IO_ICUSIZE, RF_ACTIVE);
 +		if (res == NULL)
-+			device_printf(child, "cannot allocate registers\n");
++			device_printf(child, "cannot allocate registers for i8259 controller #2\n");
++
++		res = bus_alloc_resource(child, SYS_RES_IOPORT, &rid, IO_TIMER1, IO_TIMER1 + IO_TIMERSIZE, IO_TIMERSIZE, RF_ACTIVE);
++		if (res == NULL)
++			device_printf(child, "cannot allocate registers for i8254 controllers\n");
 +	}
 +
  	return (bus_generic_attach(dev));
  }
  
+--- a/sys/mips/include/timerreg.h
++++ b/sys/mips/include/timerreg.h
+@@ -49,6 +49,9 @@
+ #define	TIMER_CNTR2	(IO_TIMER1 + TIMER_REG_CNTR2)
+ #define	TIMER_MODE	(IO_TIMER1 + TIMER_REG_MODE)
+ 
++/* 3 timers, 4 registers each. */
++#define IO_TIMERSIZE	3 * 4
++
+ #define	timer_spkr_acquire() \
+ 	acquire_timer2(TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT)
+ #define	timer_spkr_release() \




More information about the Glibc-bsd-commits mailing list