patch-2.4.23 linux-2.4.23/arch/ppc/boot/simple/misc-44x.c
Next file: linux-2.4.23/arch/ppc/boot/simple/misc-embedded.c
Previous file: linux-2.4.23/arch/ppc/boot/simple/head.S
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
2003-11-28 10:26:19.000000000 -0800
- Orig file:
linux-2.4.22/arch/ppc/boot/simple/misc-44x.c
- Orig date:
1969-12-31 16:00:00.000000000 -0800
diff -urN linux-2.4.22/arch/ppc/boot/simple/misc-44x.c linux-2.4.23/arch/ppc/boot/simple/misc-44x.c
@@ -0,0 +1,34 @@
+/*
+ * arch/ppc/simple/misc-44x.c
+ *
+ * Misc. bootloader code for IBM PPC 44x reference boards (Ebony, Ocotea)
+ *
+ * Matt Porter <mporter@mvista.com>
+ * Eugene Surovegin <ebs@ebshome.net>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/io.h>
+#include <asm/processor.h>
+#include <asm/ibm4xx.h>
+
+extern struct bi_record *decompress_kernel(unsigned long load_addr,
+ int num_words, unsigned long cksum);
+extern unsigned long timebase_period_ns;
+
+struct bi_record *
+load_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
+{
+ timebase_period_ns = 3;
+ mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR); /* reset MAL */
+ while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; /* wait for reset */
+ *(volatile unsigned long *)PPC44x_EMAC0_MR0 = 0x20000000; /* reset EMAC */
+ eieio();
+
+ return decompress_kernel(load_addr, num_words, cksum);
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)