summaryrefslogtreecommitdiff
path: root/src/mainboard/embeddedplanet
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2003-11-02 18:17:47 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2003-11-02 18:17:47 +0000
commitea6f9dabbd19c0a8223e515e6cb92a749ed23eb9 (patch)
tree9331ce4d8058797056be190fb4cd5dfd312882ac /src/mainboard/embeddedplanet
parentdbfec8f0640c52fb229272b795a1010dc01448da (diff)
*** empty log message ***
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1247 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/embeddedplanet')
-rw-r--r--src/mainboard/embeddedplanet/ep405pc/init.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/mainboard/embeddedplanet/ep405pc/init.c b/src/mainboard/embeddedplanet/ep405pc/init.c
new file mode 100644
index 0000000000..2f32203760
--- /dev/null
+++ b/src/mainboard/embeddedplanet/ep405pc/init.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2003, Greg Watson <gwatson@lanl.gov>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Do very early board initialization:
+ *
+ * - Configure External Bus (EBC)
+ * - Setup Flash
+ * - Setup NVRTC
+ * - Setup Board Control and Status Registers (BCSR)
+ * - Enable UART0 for debugging
+ */
+
+#include <ppc_asm.tmpl>
+#include <ppc.h>
+#include <ppc4xx.h>
+#include <arch/io.h>
+#include <timer.h>
+
+void
+board_init(void)
+{
+ /*
+ * Configure FLASH
+ */
+ mtebc(pb0cr, 0xFC0DC000);
+ mtebc(pb0ap, 0x02000000);
+
+ /*
+ * Configure NVTRC/BCSR
+ */
+ mtebc(pb4cr, 0xF4058000);
+ mtebc(pb4ap, 0x04050000);
+
+ /*
+ * Enable UART0
+ */
+ outb(0x20, 0xF4000003);
+
+ /*
+ * Cycle LEDs to show something is happening...
+ */
+ outb(0x07, 0xF4000009);
+ udelay(100000);
+ outb(0x0B, 0xF4000009);
+ udelay(100000);
+ outb(0x0D, 0xF4000009);
+ udelay(100000);
+ outb(0x0E, 0xF4000009);
+}