patch-2.2.11 linux/arch/ppc/kernel/prom.c

Next file: linux/arch/ppc/kernel/setup.c
Previous file: linux/arch/ppc/kernel/process.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/arch/ppc/kernel/prom.c linux/arch/ppc/kernel/prom.c
@@ -1,5 +1,5 @@
 /*
- * $Id: prom.c,v 1.54.2.1 1999/05/29 19:10:12 cort Exp $
+ * $Id: prom.c,v 1.54.2.3 1999/07/02 19:58:27 cort Exp $
  *
  * Procedures for interfacing to the Open Firmware PROM on
  * Power Macintosh computers.
@@ -338,7 +338,9 @@
 			 */
 			model = (char *) early_get_property
 				(r4 + bi->deviceTreeOffset, 4, RELOC("model"));
-			if (model && strcmp(model, RELOC("iMac,1")) == 0) {
+			if (model
+			    && (strcmp(model, RELOC("iMac,1")) == 0
+				|| strcmp(model, RELOC("PowerMac1,1")) == 0)) {
 				out_le32((unsigned *)0x80880008, 1);	/* XXX */
 			}
 		}
@@ -500,8 +502,8 @@
 			return;
 		
 		/* copy the holding pattern code to someplace safe (8M) */
-		memcpy( (void *)(8<<20), RELOC(__secondary_hold), 0x10000 );
-		for (i = 8<<20; i < ((8<<20)+0x10000); i += 32)
+		memcpy( (void *)(8<<20), RELOC(__secondary_hold), 0x100 );
+		for (i = 8<<20; i < ((8<<20)+0x100); i += 32)
 		{
 			asm volatile("dcbf 0,%0" : : "r" (i) : "memory");
 			asm volatile("icbi 0,%0" : : "r" (i) : "memory");
@@ -887,11 +889,11 @@
 	    && (imp = (struct pci_intr_map *)
 		get_property(np->parent, "interrupt-map", &ml)) != 0
 	    && (ip = (int *) get_property(np, "interrupts", &l)) != 0) {
-		unsigned int busdevfn = pci_addrs[0].addr.a_hi & 0xffff00;
+		unsigned int devfn = pci_addrs[0].addr.a_hi & 0xff00;
 		np->n_intrs = 0;
 		np->intrs = (struct interrupt_info *) mem_start;
 		for (i = 0; (ml -= sizeof(struct pci_intr_map)) >= 0; ++i) {
-			if (imp[i].addr.a_hi == busdevfn) {
+			if (imp[i].addr.a_hi == devfn) {
 				np->intrs[np->n_intrs].line = imp[i].intr;
 				np->intrs[np->n_intrs].sense = 0;
 				++np->n_intrs;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)