Skip to contentSkip to conversation

fix redwood boot (linuxppc-2.4, from linuxppc_2_4_devel)

PATCH Applied Andreas Oberritter 2 participants 2 messages Oct 13, 2003 – Oct 15, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix redwood boot (linuxppc-2.4, from linuxppc_2_4_devel)

Hi,

without this patch booting stops at "Calibrating delay loop" (jiffies don't increase). Please apply to linuxppc-2.4.

Regards,
Andreas

===== arch/ppc/boot/simple/embed_config.c 1.16 vs edited =====

arch/ppc/boot/simple/embed_config.c +10 -13
@@ -684,26 +684,23 @@
 			bd->bi_pci_enetaddr[i] = *cp++;
 #endif
 		}
+		bd->bi_tbfreq = 200000000;
 		bd->bi_intfreq = 200000000;
 		bd->bi_busfreq = 100000000;
 #ifdef CONFIG_PCI
 		bd->bi_pci_busfreq = 66666666;
 #endif
-		/* Yeah, this look weird, but on Redwood 4 they are
-		 * different object in the structure.  When RW5 uses
-		 * OpenBIOS, it requires a special value.
-		 */
-#ifdef CONFIG_REDWOOD_5
-	bd->bi_intfreq = 200 * 1000 * 1000;
-	bd->bi_busfreq = 0;
-
-		bd->bi_tbfreq = 27 * 1000 * 1000;
-#elif CONFIG_REDWOOD_4
-		bd->bi_tbfreq = bd->bi_intfreq;
-#endif
 	}
-}
+	/* Yeah, this look weird, but on Redwood 4 they are
+	 * different object in the structure.  When RW5 uses
+	 * OpenBIOS, it requires a special value.
+	 */
+#if defined(CONFIG_REDWOOD_5) || defined (CONFIG_REDWOOD_6)
+	bd->bi_tbfreq = 27000000;
 #endif
+	timebase_period_ns = 1000000000 / bd->bi_tbfreq;
+}
+#endif /* CONFIG_IBM_OPENBIOS */
 
 #ifdef CONFIG_ARCTIC2
 /* Several bootloaders have been used on the Arctic.  We assume either