From 03f7053f70bc55b50c9d23e54f90d772419300a6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 19 Jan 2010 15:39:07 -0500 Subject: Blackfin: drop reference to gd->reloc_off The reloc_off member no longer exists, so drop it. Also change this function so that it is always compiled and prevents latent issues like this in the future. Reported-by: Peter Meerwald Signed-off-by: Mike Frysinger --- lib_blackfin/board.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib_blackfin') diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 21fff334a0..b0b52b2ba8 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -73,8 +73,12 @@ static int init_baudrate(void) static void display_global_data(void) { -#ifdef CONFIG_DEBUG_EARLY_SERIAL bd_t *bd; + +#ifndef CONFIG_DEBUG_EARLY_SERIAL + return; +#endif + bd = gd->bd; printf(" gd: %p\n", gd); printf(" |-flags: %lx\n", gd->flags); @@ -82,7 +86,6 @@ static void display_global_data(void) printf(" |-baudrate: %lu\n", gd->baudrate); printf(" |-have_console: %lx\n", gd->have_console); printf(" |-ram_size: %lx\n", gd->ram_size); - printf(" |-reloc_off: %lx\n", gd->reloc_off); printf(" |-env_addr: %lx\n", gd->env_addr); printf(" |-env_valid: %lx\n", gd->env_valid); printf(" |-jt(%p): %p\n", gd->jt, *(gd->jt)); @@ -95,7 +98,6 @@ static void display_global_data(void) printf(" |-bi_flashstart: %lx\n", bd->bi_flashstart); printf(" |-bi_flashsize: %lx\n", bd->bi_flashsize); printf(" \\-bi_flashoffset: %lx\n", bd->bi_flashoffset); -#endif } #define CPLB_PAGE_SIZE (4 * 1024 * 1024) -- cgit v1.2.1 From 38b9b7446ecd3a728bad3e1913a984628a7363fb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 19 Jan 2010 21:02:00 -0500 Subject: Blackfin: relax .data alignment The strictest alignment on Blackfin systems is 32bits (since that is the largest load instruction), so don't force 256byte alignment here. Signed-off-by: Mike Frysinger --- lib_blackfin/u-boot.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib_blackfin') diff --git a/lib_blackfin/u-boot.lds.S b/lib_blackfin/u-boot.lds.S index 3be341fad0..9a757c6984 100644 --- a/lib_blackfin/u-boot.lds.S +++ b/lib_blackfin/u-boot.lds.S @@ -100,7 +100,7 @@ SECTIONS .data : { - . = ALIGN(256); + . = ALIGN(4); *(.data .data.*) *(.data1) *(.sdata) -- cgit v1.2.1 From b874ed17472de492cfbf58c8e362364bc80e3dcd Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 10 Feb 2010 01:20:44 -0500 Subject: Blackfin: link with normal ABI target If someone uses the FDPIC toolchain to compile U-Boot, make sure the linker knows to use the normal ABI target rather than the FDPIC one. This wasn't needed with older toolchains, but when we fixed the linker such that the default target changed based on tuple, this broke. Signed-off-by: Mike Frysinger --- lib_blackfin/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib_blackfin') diff --git a/lib_blackfin/config.mk b/lib_blackfin/config.mk index 323d28f068..1b5cbbaf29 100644 --- a/lib_blackfin/config.mk +++ b/lib_blackfin/config.mk @@ -23,7 +23,7 @@ CROSS_COMPILE ?= bfin-uclinux- -STANDALONE_LOAD_ADDR = 0x1000 +STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU))) CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE))) @@ -33,7 +33,7 @@ CONFIG_ENV_SIZE := $(strip $(subst ",,$(CONFIG_ENV_SIZE))) PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN -LDFLAGS += --gc-sections +LDFLAGS += --gc-sections -m elf32bfin PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections ifneq (,$(CONFIG_BFIN_CPU)) -- cgit v1.2.1 From 0c080aa753eb92e1c0033d3fd33033b2b4813884 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Feb 2010 20:19:10 -0500 Subject: Blackfin: call watchdog_init() for external watchdogs Signed-off-by: Mike Frysinger --- lib_blackfin/board.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib_blackfin') diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index b0b52b2ba8..4e9bb19226 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -199,6 +199,7 @@ void init_cplbtables(void) * "continue" and != 0 means "fatal error, hang the system". */ +extern int watchdog_init(void); extern int exception_init(void); extern int irq_init(void); extern int timer_init(void); @@ -229,6 +230,11 @@ void board_init_f(ulong bootflag) dcache_enable(); #endif +#ifdef CONFIG_WATCHDOG + serial_early_puts("Setting up external watchdog\n"); + watchdog_init(); +#endif + #ifdef DEBUG if (CONFIG_SYS_GBL_DATA_SIZE < sizeof(*gd)) hang(); -- cgit v1.2.1 From a3c08363b927b84dee911bfcb29ab45d53c98f62 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 23 Mar 2010 16:23:39 -0400 Subject: Blackfin: drop bfin #undef in linker script Now that the linker script is preprocessed with -ansi, there is no need to manually undef the bfin define. Signed-off-by: Mike Frysinger --- lib_blackfin/u-boot.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib_blackfin') diff --git a/lib_blackfin/u-boot.lds.S b/lib_blackfin/u-boot.lds.S index 9a757c6984..2b23d8ba63 100644 --- a/lib_blackfin/u-boot.lds.S +++ b/lib_blackfin/u-boot.lds.S @@ -1,7 +1,7 @@ /* * U-boot - u-boot.lds.S * - * Copyright (c) 2005-2008 Analog Device Inc. + * Copyright (c) 2005-2010 Analog Device Inc. * * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -29,7 +29,6 @@ #include #undef ALIGN #undef ENTRY -#undef bfin #ifndef LDS_BOARD_TEXT # define LDS_BOARD_TEXT -- cgit v1.2.1