From 3fc674cc516c005e1b7f1499134c77a1383c725c Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 11 Sep 2007 10:21:10 +0200 Subject: add support for the PII bf561 board --- board/ipe337/Makefile | 3 ++ board/ipe337/ipe337.c | 68 +++++++++++++++++++++++++++++++++++++++++ board/ipe337/u-boot.lds.S | 78 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 board/ipe337/Makefile create mode 100644 board/ipe337/ipe337.c create mode 100644 board/ipe337/u-boot.lds.S (limited to 'board/ipe337') 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 +#include +#include +#include + +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 +#include + +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 = .; +} + -- cgit v1.2.3