diff options
author | Stefan Roese <sr@denx.de> | 2007-04-29 16:40:31 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-04-29 16:40:31 +0200 |
commit | bd38b7ecfdf01e0b7bce551a0834226630be81c1 (patch) | |
tree | e86a79fb7791af81a3325d0e177abdc2d97624d4 /board/atmel/atstk1000 | |
parent | 6f69bbc8f33f03f6a1adf845101c15a9917ff5f5 (diff) | |
parent | 14da5f7675bbb427c469e3f45006e027b6e21db9 (diff) | |
download | u-boot-imx-bd38b7ecfdf01e0b7bce551a0834226630be81c1.zip u-boot-imx-bd38b7ecfdf01e0b7bce551a0834226630be81c1.tar.gz u-boot-imx-bd38b7ecfdf01e0b7bce551a0834226630be81c1.tar.bz2 |
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'board/atmel/atstk1000')
-rw-r--r-- | board/atmel/atstk1000/Makefile | 2 | ||||
-rw-r--r-- | board/atmel/atstk1000/atstk1000.c | 24 | ||||
-rw-r--r-- | board/atmel/atstk1000/eth.c | 38 | ||||
-rw-r--r-- | board/atmel/atstk1000/flash.c | 2 | ||||
-rw-r--r-- | board/atmel/atstk1000/u-boot.lds | 21 |
5 files changed, 74 insertions, 13 deletions
diff --git a/board/atmel/atstk1000/Makefile b/board/atmel/atstk1000/Makefile index 155d46a..8a15713 100644 --- a/board/atmel/atstk1000/Makefile +++ b/board/atmel/atstk1000/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)lib$(BOARD).a -COBJS := $(BOARD).o flash.o +COBJS := $(BOARD).o flash.o eth.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) diff --git a/board/atmel/atstk1000/atstk1000.c b/board/atmel/atstk1000/atstk1000.c index 4d737d2..6618963 100644 --- a/board/atmel/atstk1000/atstk1000.c +++ b/board/atmel/atstk1000/atstk1000.c @@ -23,6 +23,8 @@ #include <asm/io.h> #include <asm/sdram.h> +#include <asm/arch/gpio.h> +#include <asm/arch/hmatrix2.h> DECLARE_GLOBAL_DATA_PTR; @@ -40,9 +42,27 @@ static const struct sdram_info sdram = { .txsr = 5, }; -void board_init_memories(void) +int board_early_init_f(void) { - gd->sdram_size = sdram_init(&sdram); + /* Set the SDRAM_ENABLE bit in the HEBI SFR */ + hmatrix2_writel(SFR4, 1 << 1); + + gpio_enable_ebi(); + gpio_enable_usart1(); +#if defined(CONFIG_MACB) + gpio_enable_macb0(); + gpio_enable_macb1(); +#endif +#if defined(CONFIG_MMC) + gpio_enable_mmci(); +#endif + + return 0; +} + +long int initdram(int board_type) +{ + return sdram_init(&sdram); } void board_init_info(void) diff --git a/board/atmel/atstk1000/eth.c b/board/atmel/atstk1000/eth.c new file mode 100644 index 0000000..3a7916e --- /dev/null +++ b/board/atmel/atstk1000/eth.c @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * Ethernet initialization for the ATSTK1000 starterkit + * + * 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 <common.h> + +#include <asm/arch/memory-map.h> + +extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); + +#if defined(CONFIG_MACB) && (CONFIG_COMMANDS & CFG_CMD_NET) +void atstk1000_eth_initialize(bd_t *bi) +{ + int id = 0; + + macb_eth_initialize(id++, (void *)MACB0_BASE, bi->bi_phy_id[0]); + macb_eth_initialize(id++, (void *)MACB1_BASE, bi->bi_phy_id[1]); +} +#endif diff --git a/board/atmel/atstk1000/flash.c b/board/atmel/atstk1000/flash.c index 3aebf66..958f4dc 100644 --- a/board/atmel/atstk1000/flash.c +++ b/board/atmel/atstk1000/flash.c @@ -57,7 +57,7 @@ unsigned long flash_init(void) gd->bd->bi_flashstart = CFG_FLASH_BASE; gd->bd->bi_flashsize = CFG_FLASH_SIZE; - gd->bd->bi_flashoffset = __edata_lma - _text; + gd->bd->bi_flashoffset = _edata - _text; flash_info[0].size = CFG_FLASH_SIZE; flash_info[0].sector_count = 135; diff --git a/board/atmel/atstk1000/u-boot.lds b/board/atmel/atstk1000/u-boot.lds index ef89ea4..34e347a 100644 --- a/board/atmel/atstk1000/u-boot.lds +++ b/board/atmel/atstk1000/u-boot.lds @@ -40,35 +40,38 @@ SECTIONS } . = ALIGN(32); __flashprog_end = .; + _etext = .; - . = ALIGN(8); .rodata : { *(.rodata) *(.rodata.*) } - _etext = .; - __data_lma = ALIGN(8); - . = 0x24000000; + . = ALIGN(8); _data = .; - .data : AT(__data_lma) { + .data : { *(.data) *(.data.*) } . = ALIGN(4); __u_boot_cmd_start = .; - __u_boot_cmd_lma = __data_lma + (__u_boot_cmd_start - _data); - .u_boot_cmd : AT(__u_boot_cmd_lma) { + .u_boot_cmd : { KEEP(*(.u_boot_cmd)) } __u_boot_cmd_end = .; + . = ALIGN(4); + _got = .; + .got : { + *(.got) + } + _egot = .; + . = ALIGN(8); _edata = .; - __edata_lma = __u_boot_cmd_lma + (_edata - __u_boot_cmd_start); - .bss : AT(__edata_lma) { + .bss : { *(.bss) *(.bss.*) } |