diff options
30 files changed, 79 insertions, 83 deletions
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk index f0909e9..71fd53f 100644 --- a/arch/blackfin/config.mk +++ b/arch/blackfin/config.mk @@ -76,10 +76,6 @@ LDR_FLAGS += $(LDR_FLAGS-y) # Set some default LDR flags based on boot mode. LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE)) -ifeq ($(wildcard $(TOPDIR)/board/$(BOARD)/u-boot.lds*),) -LDSCRIPT = $(obj)arch/$(ARCH)/lib/u-boot.lds.S -endif - ifneq ($(CONFIG_SYS_TEXT_BASE),) $(error do not set CONFIG_SYS_TEXT_BASE for Blackfin boards) endif diff --git a/arch/blackfin/cpu/reset.c b/arch/blackfin/cpu/reset.c index 9307e9f..e23dcc7 100644 --- a/arch/blackfin/cpu/reset.c +++ b/arch/blackfin/cpu/reset.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> #include <asm/blackfin.h> +#include <asm/mach-common/bits/bootrom.h> #include "cpu.h" /* A system soft reset makes external memory unusable so force @@ -29,46 +30,40 @@ static void bfin_reset(void) */ __builtin_bfin_ssync(); - /* The bootrom checks to see how it was reset and will - * automatically perform a software reset for us when - * it starts executing after the core reset. - */ - if (ANOMALY_05000353 || ANOMALY_05000386) { - /* Initiate System software reset. */ - bfin_write_SWRST(0x7); + /* Initiate System software reset. */ + bfin_write_SWRST(0x7); - /* Due to the way reset is handled in the hardware, we need - * to delay for 10 SCLKS. The only reliable way to do this is - * to calculate the CCLK/SCLK ratio and multiply 10. For now, - * we'll assume worse case which is a 1:15 ratio. - */ - asm( - "LSETUP (1f, 1f) LC0 = %0\n" - "1: nop;" - : - : "a" (15 * 10) - : "LC0", "LB0", "LT0" - ); + /* Due to the way reset is handled in the hardware, we need + * to delay for 10 SCLKS. The only reliable way to do this is + * to calculate the CCLK/SCLK ratio and multiply 10. For now, + * we'll assume worse case which is a 1:15 ratio. + */ + asm( + "LSETUP (1f, 1f) LC0 = %0\n" + "1: nop;" + : + : "a" (15 * 10) + : "LC0", "LB0", "LT0" + ); - /* Clear System software reset */ - bfin_write_SWRST(0); + /* Clear System software reset */ + bfin_write_SWRST(0); - /* The BF526 ROM will crash during reset */ + /* The BF526 ROM will crash during reset */ #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) - bfin_read_SWRST(); + bfin_read_SWRST(); #endif - /* Wait for the SWRST write to complete. Cannot rely on SSYNC - * though as the System state is all reset now. - */ - asm( - "LSETUP (1f, 1f) LC1 = %0\n" - "1: nop;" - : - : "a" (15 * 1) - : "LC1", "LB1", "LT1" - ); - } + /* Wait for the SWRST write to complete. Cannot rely on SSYNC + * though as the System state is all reset now. + */ + asm( + "LSETUP (1f, 1f) LC1 = %0\n" + "1: nop;" + : + : "a" (15 * 1) + : "LC1", "LB1", "LT1" + ); while (1) /* Issue core reset */ @@ -84,7 +79,10 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (board_reset) board_reset(); - while (1) - asm("jump (%0);" : : "a" (bfin_reset)); + if (ANOMALY_05000353 || ANOMALY_05000386) + while (1) + asm("jump (%0);" : : "a" (bfin_reset)); + else + bfrom_SoftReset((void *)(L1_SRAM_SCRATCH_END - 20)); return 0; } diff --git a/arch/blackfin/lib/u-boot.lds.S b/arch/blackfin/cpu/u-boot.lds index 2b8d285..2b8d285 100644 --- a/arch/blackfin/lib/u-boot.lds.S +++ b/arch/blackfin/cpu/u-boot.lds diff --git a/board/bct-brettl2/config.mk b/board/bct-brettl2/config.mk index 799a682..b3ed337 100644 --- a/board/bct-brettl2/config.mk +++ b/board/bct-brettl2/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/bf518f-ezbrd/config.mk b/board/bf518f-ezbrd/config.mk index 799a682..b3ed337 100644 --- a/board/bf518f-ezbrd/config.mk +++ b/board/bf518f-ezbrd/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/bf526-ezbrd/config.mk b/board/bf526-ezbrd/config.mk index 799a682..b3ed337 100644 --- a/board/bf526-ezbrd/config.mk +++ b/board/bf526-ezbrd/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/bf527-ad7160-eval/config.mk b/board/bf527-ad7160-eval/config.mk index 799a682..b3ed337 100644 --- a/board/bf527-ad7160-eval/config.mk +++ b/board/bf527-ad7160-eval/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/bf527-ezkit/config.mk b/board/bf527-ezkit/config.mk index 799a682..b3ed337 100644 --- a/board/bf527-ezkit/config.mk +++ b/board/bf527-ezkit/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/bf527-sdp/config.mk b/board/bf527-sdp/config.mk index 7271774..beb4651 100644 --- a/board/bf527-sdp/config.mk +++ b/board/bf527-sdp/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6 diff --git a/board/bf533-ezkit/config.mk b/board/bf533-ezkit/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/bf533-ezkit/config.mk +++ b/board/bf533-ezkit/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf533-stamp/config.mk b/board/bf533-stamp/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/bf533-stamp/config.mk +++ b/board/bf533-stamp/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf537-stamp/config.mk b/board/bf537-stamp/config.mk index 7c023d1..0adae73 100644 --- a/board/bf537-stamp/config.mk +++ b/board/bf537-stamp/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf538f-ezkit/config.mk b/board/bf538f-ezkit/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/bf538f-ezkit/config.mk +++ b/board/bf538f-ezkit/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf548-ezkit/config.mk b/board/bf548-ezkit/config.mk index 7f38b14..ab3ff14 100644 --- a/board/bf548-ezkit/config.mk +++ b/board/bf548-ezkit/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 diff --git a/board/bf561-acvilon/config.mk b/board/bf561-acvilon/config.mk index 4c811ba..4d6184e 100644 --- a/board/bf561-acvilon/config.mk +++ b/board/bf561-acvilon/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 diff --git a/board/bf561-ezkit/config.mk b/board/bf561-ezkit/config.mk index 4c811ba..4d6184e 100644 --- a/board/bf561-ezkit/config.mk +++ b/board/bf561-ezkit/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 diff --git a/board/cm-bf527/config.mk b/board/cm-bf527/config.mk index 799a682..b3ed337 100644 --- a/board/cm-bf527/config.mk +++ b/board/cm-bf527/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/cm-bf533/config.mk b/board/cm-bf533/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/cm-bf533/config.mk +++ b/board/cm-bf533/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/cm-bf537e/config.mk b/board/cm-bf537e/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/cm-bf537e/config.mk +++ b/board/cm-bf537e/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/cm-bf537u/config.mk b/board/cm-bf537u/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/cm-bf537u/config.mk +++ b/board/cm-bf537u/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/cm-bf548/config.mk b/board/cm-bf548/config.mk index 5adb6fc..358e4c1 100644 --- a/board/cm-bf548/config.mk +++ b/board/cm-bf548/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 diff --git a/board/cm-bf561/config.mk b/board/cm-bf561/config.mk index 4c811ba..4d6184e 100644 --- a/board/cm-bf561/config.mk +++ b/board/cm-bf561/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 diff --git a/board/ip04/config.mk b/board/ip04/config.mk index 7c023d1..0adae73 100644 --- a/board/ip04/config.mk +++ b/board/ip04/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/tcm-bf518/config.mk b/board/tcm-bf518/config.mk index 799a682..b3ed337 100644 --- a/board/tcm-bf518/config.mk +++ b/board/tcm-bf518/config.mk @@ -25,3 +25,4 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 diff --git a/board/tcm-bf537/config.mk b/board/tcm-bf537/config.mk index c0cb9ff..7d1fc44 100644 --- a/board/tcm-bf537/config.mk +++ b/board/tcm-bf537/config.mk @@ -25,6 +25,7 @@ CFLAGS_lib += -O2 CFLAGS_lib/lzma += -O2 +CFLAGS_lib/zlib += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h index 4d7d877..3550fd3 100644 --- a/include/configs/bf548-ezkit.h +++ b/include/configs/bf548-ezkit.h @@ -113,12 +113,12 @@ #define CONFIG_ENV_OFFSET 0x60000 #define CONFIG_ENV_SIZE 0x20000 #else +/* The BF548-EZKIT uses a top boot flash */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR 0x20002000 -#define CONFIG_ENV_OFFSET 0x2000 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE (128 * 1024) -#define CONFIG_ENV_IS_EMBEDDED_IN_LDR +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) +#define CONFIG_ENV_OFFSET (0x1000000 - CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SECT_SIZE 0x8000 #endif diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h index 33c7e18..6cfc19b 100644 --- a/include/configs/bf561-ezkit.h +++ b/include/configs/bf561-ezkit.h @@ -80,27 +80,10 @@ #define CONFIG_SYS_MAX_FLASH_SECT 135 /* The BF561-EZKIT uses a top boot flash */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x4000 +#define CONFIG_ENV_OFFSET (0x800000 - CONFIG_ENV_SECT_SIZE) #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x10000 -#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS) -#define ENV_IS_EMBEDDED -#else -#define CONFIG_ENV_IS_EMBEDDED_IN_LDR -#endif -#ifdef ENV_IS_EMBEDDED -/* WARNING - the following is hand-optimized to fit within - * the sector before the environment sector. If it throws - * an error during compilation remove an object here to get - * it linked after the configuration sector. - */ -# define LDS_BOARD_TEXT \ - arch/blackfin/lib/libblackfin.o (.text*); \ - arch/blackfin/cpu/libblackfin.o (.text*); \ - . = DEFINED(env_offset) ? env_offset : .; \ - common/env_embedded.o (.text*); -#endif +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SECT_SIZE 0x2000 /* diff --git a/include/configs/cm-bf537e.h b/include/configs/cm-bf537e.h index 934b74b..04bca6c 100644 --- a/include/configs/cm-bf537e.h +++ b/include/configs/cm-bf537e.h @@ -89,13 +89,12 @@ * Env Storage Settings */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x4000 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x20000 +#define CONFIG_ENV_OFFSET 0x8000 +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SECT_SIZE 0x8000 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS) #define ENV_IS_EMBEDDED -#else -#define CONFIG_ENV_IS_EMBEDDED_IN_LDR #endif #ifdef ENV_IS_EMBEDDED /* WARNING - the following is hand-optimized to fit within @@ -127,7 +126,7 @@ #define CONFIG_UART_CONSOLE 0 #define CONFIG_BOOTCOMMAND "run flashboot" #define FLASHBOOT_ENV_SETTINGS \ - "flashboot=flread 20040000 1000000 300000;" \ + "flashboot=flread 20040000 1000000 3c0000;" \ "bootm 0x1000000\0" diff --git a/include/configs/cm-bf537u.h b/include/configs/cm-bf537u.h index c274c20..af2fe89 100644 --- a/include/configs/cm-bf537u.h +++ b/include/configs/cm-bf537u.h @@ -90,13 +90,12 @@ * Env Storage Settings */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x4000 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x20000 +#define CONFIG_ENV_OFFSET 0x8000 +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SECT_SIZE 0x8000 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS) #define ENV_IS_EMBEDDED -#else -#define CONFIG_ENV_IS_EMBEDDED_IN_LDR #endif #ifdef ENV_IS_EMBEDDED /* WARNING - the following is hand-optimized to fit within @@ -128,7 +127,7 @@ #define CONFIG_UART_CONSOLE 0 #define CONFIG_BOOTCOMMAND "run flashboot" #define FLASHBOOT_ENV_SETTINGS \ - "flashboot=flread 20040000 1000000 280000;" \ + "flashboot=flread 20040000 1000000 300000;" \ "bootm 0x1000000\0" diff --git a/include/configs/tcm-bf537.h b/include/configs/tcm-bf537.h index 8ded175..9a6100e 100644 --- a/include/configs/tcm-bf537.h +++ b/include/configs/tcm-bf537.h @@ -90,13 +90,12 @@ * Env Storage Settings */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x4000 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x20000 +#define CONFIG_ENV_OFFSET 0x8000 +#define CONFIG_ENV_SIZE 0x8000 +#define CONFIG_ENV_SECT_SIZE 0x8000 +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS) #define ENV_IS_EMBEDDED -#else -#define CONFIG_ENV_IS_EMBEDDED_IN_LDR #endif #ifdef ENV_IS_EMBEDDED /* WARNING - the following is hand-optimized to fit within @@ -128,7 +127,7 @@ #define CONFIG_UART_CONSOLE 0 #define CONFIG_BOOTCOMMAND "run flashboot" #define FLASHBOOT_ENV_SETTINGS \ - "flashboot=flread 20040000 1000000 280000;" \ + "flashboot=flread 20040000 1000000 300000;" \ "bootm 0x1000000\0" |