summaryrefslogtreecommitdiffstats
path: root/board/ipe337
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
parent70a338bc2748dec8dd8ed8badd2f9fc48f9ca687 (diff)
downloadbarebox-3fc674cc516c005e1b7f1499134c77a1383c725c.tar.gz
barebox-3fc674cc516c005e1b7f1499134c77a1383c725c.tar.xz
add support for the PII bf561 board
Diffstat (limited to 'board/ipe337')
-rw-r--r--board/ipe337/Makefile3
-rw-r--r--board/ipe337/ipe337.c68
-rw-r--r--board/ipe337/u-boot.lds.S78
3 files changed, 149 insertions, 0 deletions
diff --git a/board/ipe337/Makefile b/board/ipe337/Makefile
new file mode 100644
index 0000000000..448133ceb4
--- /dev/null
+++ b/board/ipe337/Makefile
@@ -0,0 +1,3 @@
+obj-y += ipe337.o
+
+extra-y += u-boot.lds
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);
+
diff --git a/board/ipe337/u-boot.lds.S b/board/ipe337/u-boot.lds.S
new file mode 100644
index 0000000000..83d5ffbd80
--- /dev/null
+++ b/board/ipe337/u-boot.lds.S
@@ -0,0 +1,78 @@
+/*
+ * U-boot - u-boot.lds.S
+ *
+ * Copyright (c) 2005-2007 Analog Device Inc.
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * 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
+ */
+
+#include <config.h>
+#include <asm-generic/u-boot.lds.h>
+
+OUTPUT_ARCH("bfin")
+SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
+/* Do we need any of these for elf?
+ __DYNAMIC = 0; */
+/*
+MEMORY
+{
+ ram : ORIGIN = (0x2000000), LENGTH = (256 * 1024)
+ l1_code : ORIGIN = 0xFFA00000, LENGTH = 0xC000
+ l1_data : ORIGIN = 0xFF900000, LENGTH = 0x4000
+}
+*/
+
+SECTIONS
+{
+ . = 0x00000000;
+
+ . = ALIGN(4);
+ .text :
+ {
+ *(.text_entry)
+ *(.text)
+ }
+
+ . = ALIGN(4);
+ .rodata : { *(.rodata) }
+
+ . = ALIGN(4);
+ .data : { *(.data) }
+
+ . = ALIGN(4);
+ .got : { *(.got) }
+
+ . = .;
+ ___u_boot_cmd_start = .;
+ .u_boot_cmd : { U_BOOT_CMDS }
+ ___u_boot_cmd_end = .;
+
+ ___u_boot_initcalls_start = .;
+ .u_boot_initcalls : { INITCALLS }
+ ___u_boot_initcalls_end = .;
+
+ . = ALIGN(4);
+ __bss_start = .;
+ .bss : { *(.bss) }
+ _end = .;
+}
+