summaryrefslogtreecommitdiffstats
path: root/board/ipe337/ipe337.c
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-11 10:21:10 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-11 10:21:10 +0200
commit3fc674cc516c005e1b7f1499134c77a1383c725c (patch)
treec8a3bea7e3deed053be427f5fc60e22b5fa57021 /board/ipe337/ipe337.c
parent70a338bc2748dec8dd8ed8badd2f9fc48f9ca687 (diff)
downloadbarebox-3fc674cc516c005e1b7f1499134c77a1383c725c.tar.gz
barebox-3fc674cc516c005e1b7f1499134c77a1383c725c.tar.xz
add support for the PII bf561 board
Diffstat (limited to 'board/ipe337/ipe337.c')
-rw-r--r--board/ipe337/ipe337.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/board/ipe337/ipe337.c b/board/ipe337/ipe337.c
new file mode 100644
index 0000000000..b57d8b4f6e
--- /dev/null
+++ b/board/ipe337/ipe337.c
@@ -0,0 +1,68 @@
+#include <common.h>
+#include <init.h>
+#include <driver.h>
+#include <asm/cpu/cdefBF561.h>
+
+static struct device_d cfi_dev = {
+ .name = "cfi_flash",
+ .id = "nor0",
+
+ .map_base = 0x20000000,
+ .size = 32 * 1024 * 1024,
+};
+
+static struct device_d sdram_dev = {
+ .name = "ram",
+ .id = "ram0",
+
+ .map_base = 0x08000000,
+ .size = 16 * 1024 * 1024,
+
+ .type = DEVICE_TYPE_DRAM,
+};
+
+static struct device_d smc911x_dev = {
+ .name = "smc911x",
+ .id = "eth0",
+ .map_base = 0x24000000,
+ .size = 4096,
+ .type = DEVICE_TYPE_ETHER,
+};
+
+static int ipe337_devices_init(void) {
+ register_device(&cfi_dev);
+ register_device(&sdram_dev);
+
+ *pFIO0_DIR = (1<<12);
+ *pFIO0_FLAG_C = (1<<12);
+ udelay(1000);
+ *pFIO0_FLAG_S = (1<<12);
+ udelay(1000);
+
+ register_device(&smc911x_dev);
+
+ dev_add_partition(&cfi_dev, 0x00000, 0x20000, "self");
+ dev_add_partition(&cfi_dev, 0x40000, 0x20000, "env");
+ dev_protect(&cfi_dev, 0x20000, 0, 1);
+
+ return 0;
+}
+
+device_initcall(ipe337_devices_init);
+
+static struct device_d blackfin_serial_device = {
+ .name = "blackfin_serial",
+ .id = "cs0",
+ .map_base = 0,
+ .size = 4096,
+ .type = DEVICE_TYPE_CONSOLE,
+};
+
+static int blackfin_console_init(void)
+{
+ register_device(&blackfin_serial_device);
+ return 0;
+}
+
+console_initcall(blackfin_console_init);
+