[U-Boot] [PATCH 0/9] Patch set for some Freescale ColdFire boards

The following patches update some ColdFire boards to work with latest u-boot. Those update were tested on following Freescale boards: M54455EVB, M54451EVB, M5475EVB(M5475CFE_config), M5485EVB(M5485HFE_conifg), M5208EVB, M5253DEMO, M52277EVB, M53017EVB, M5373EVB, M5329EVB(M5329BFEE_config).
[PATCH 1/9] Fix the configuration broken for ColdFire boards. [PATCH V2 2/9] ColdFire: Change the way to set platform CPP flags [PATCH V2 3/9] Env and lds file clean up for ColdFire M5445x and M547x/8x boards. [PATCH 4/9] Clean up lds files for some ColdFire nommu chips [PATCH V2 5/9] Enable the dm9000 on ColdFire 5253DEMO board. [PATCH 6/9] Disable the NFS define for 52277 board. [PATCH 7/9] ColdFire:Add mb for 5253 dram initialization [PATCH 8/9] Change the env settings for u-boot update [PATCH 9/9] sync the buffer descriptor IO for coldfire FEC

Some typoes in Makefile and boards.cfg make the M54455 board and M53017 board configuration broken.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- Makefile | 1 + boards.cfg | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile index 713dba1..20e15eb 100644 --- a/Makefile +++ b/Makefile @@ -678,6 +678,7 @@ M54455EVB_stm33_config : unconfig cp $(obj)board/freescale/m54455evb/u-boot.stm $(obj)board/freescale/m54455evb/u-boot.lds ; \ fi; \ echo "#define CONFIG_SYS_INPUT_CLKSRC $${FREQ}" >> $(obj)include/config.h ; \ + $(XECHO) "... with $${FREQ}Hz input clock" @$(MKCONFIG) -n $@ -a M54455EVB m68k mcf5445x m54455evb freescale
M5475AFE_config \ diff --git a/boards.cfg b/boards.cfg index 554e06c..438c603 100644 --- a/boards.cfg +++ b/boards.cfg @@ -217,7 +217,7 @@ M5271EVB m68k mcf52x2 m5271evb freesca M5272C3 m68k mcf52x2 m5272c3 freescale M5275EVB m68k mcf52x2 m5275evb freescale M5282EVB m68k mcf52x2 m5282evb freescale -M53017EVB m68k mcf52x2 m53017evb freescale +M53017EVB m68k mcf532x m53017evb freescale EP2500 m68k mcf52x2 ep2500 Mercury microblaze-generic microblaze microblaze microblaze-generic xilinx dbau1000 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1000

The CPP flags for the ColdFire platform depend on the version of the toolchain. Setting the CPP flags based on the gcc --version is not good and not reliable. This patch try to set the flags by testing if the flag works.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- arch/m68k/cpu/mcf5227x/config.mk | 6 +----- arch/m68k/cpu/mcf523x/config.mk | 6 +----- arch/m68k/cpu/mcf52x2/config.mk | 21 +++++++-------------- arch/m68k/cpu/mcf532x/config.mk | 11 +++-------- arch/m68k/cpu/mcf5445x/config.mk | 6 +----- arch/m68k/cpu/mcf547x_8x/config.mk | 6 +----- 6 files changed, 14 insertions(+), 42 deletions(-)
diff --git a/arch/m68k/cpu/mcf5227x/config.mk b/arch/m68k/cpu/mcf5227x/config.mk index 8eab49d..3a17bcb 100644 --- a/arch/m68k/cpu/mcf5227x/config.mk +++ b/arch/m68k/cpu/mcf5227x/config.mk @@ -24,8 +24,4 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1) -PLATFORM_CPPFLAGS += -mcpu=52277 -fPIC -else -PLATFORM_CPPFLAGS += -m5307 -fPIC -endif +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=52277 -fPIC, -m5307 -fPIC) diff --git a/arch/m68k/cpu/mcf523x/config.mk b/arch/m68k/cpu/mcf523x/config.mk index fc79454..78ae8c1 100644 --- a/arch/m68k/cpu/mcf523x/config.mk +++ b/arch/m68k/cpu/mcf523x/config.mk @@ -24,8 +24,4 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1) -PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC -else -PLATFORM_CPPFLAGS += -m5307 -fPIC -endif +PLATFORM_CPPFLAGS += $(call cc-option, -mcpu=5235 -fPIC, -m5307 -fPIC) diff --git a/arch/m68k/cpu/mcf52x2/config.mk b/arch/m68k/cpu/mcf52x2/config.mk index 52751be..45c47e5 100644 --- a/arch/m68k/cpu/mcf52x2/config.mk +++ b/arch/m68k/cpu/mcf52x2/config.mk @@ -34,31 +34,24 @@ is5272:=$(shell grep CONFIG_M5272 $(TOPDIR)/include/$(cfg)) is5275:=$(shell grep CONFIG_M5275 $(TOPDIR)/include/$(cfg)) is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg))
- -ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1) - ifneq (,$(findstring CONFIG_M5208,$(is5208))) -PLATFORM_CPPFLAGS += -mcpu=5208 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5208,-m5307) endif ifneq (,$(findstring CONFIG_M5249,$(is5249))) -PLATFORM_CPPFLAGS += -mcpu=5249 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5249,-m5307) endif ifneq (,$(findstring CONFIG_M5253,$(is5253))) -PLATFORM_CPPFLAGS += -mcpu=5253 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5253,-m5307) endif ifneq (,$(findstring CONFIG_M5271,$(is5271))) -PLATFORM_CPPFLAGS += -mcpu=5271 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5271,-m5307) endif ifneq (,$(findstring CONFIG_M5272,$(is5272))) -PLATFORM_CPPFLAGS += -mcpu=5272 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5272,-m5307) endif ifneq (,$(findstring CONFIG_M5275,$(is5275))) -PLATFORM_CPPFLAGS += -mcpu=5275 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5275,-m5307) endif ifneq (,$(findstring CONFIG_M5282,$(is5282))) -PLATFORM_CPPFLAGS += -mcpu=5282 -endif - -else -PLATFORM_CPPFLAGS += -m5307 +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5282,-m5307) endif diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk index b783444..b050206 100644 --- a/arch/m68k/cpu/mcf532x/config.mk +++ b/arch/m68k/cpu/mcf532x/config.mk @@ -29,15 +29,10 @@ cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<(configs.*)>/ is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg)) is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg))
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1) - ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x))) -PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC -endif -ifneq (,$(findstring CONFIG_MCF532x,$(is532x))) -PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC +PLATFORM_CPPFLAGS += $(call cc-option, -mcpu=53015 -fPIC, -m5307 -fPIC) endif
-else -PLATFORM_CPPFLAGS += -m5307 -fPIC +ifneq (,$(findstring CONFIG_MCF532x,$(is532x))) +PLATFORM_CPPFLAGS += $(call cc-option, -mcpu=5329 -fPIC, -m5307 -fPIC) endif diff --git a/arch/m68k/cpu/mcf5445x/config.mk b/arch/m68k/cpu/mcf5445x/config.mk index b0b49f7..47ff6ec 100644 --- a/arch/m68k/cpu/mcf5445x/config.mk +++ b/arch/m68k/cpu/mcf5445x/config.mk @@ -24,11 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1) -PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC -else -PLATFORM_CPPFLAGS += -m5407 -fPIC -endif +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=54455 -fPIC,-m5407 -fPIC)
ifneq (,$(findstring -linux-,$(shell $(CC) --version))) ifneq (,$(findstring GOT,$(shell $(LD) --help))) diff --git a/arch/m68k/cpu/mcf547x_8x/config.mk b/arch/m68k/cpu/mcf547x_8x/config.mk index 83102ab..87cc0a5 100644 --- a/arch/m68k/cpu/mcf547x_8x/config.mk +++ b/arch/m68k/cpu/mcf547x_8x/config.mk @@ -24,11 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1) -PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC -else -PLATFORM_CPPFLAGS += -m5407 -fPIC -endif +PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=5485 -fPIC, m5407 -fPIC)
ifneq (,$(findstring -linux-,$(shell $(CC) --version))) ifneq (,$(findstring GOT,$(shell $(LD) --help)))

Move the environment outside the u-boot image, leave more space for the text to avoid the possible PC truncate issue.
The lds file for ColdFire need to clean up since commit 6d8962e814c15807dd6ac5757904be2a02d187b8 'Switch from archive libraries to partial linking'.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- board/freescale/m54451evb/u-boot.spa | 10 ---------- board/freescale/m54451evb/u-boot.stm | 13 ------------- board/freescale/m54455evb/u-boot.atm | 7 ------- board/freescale/m54455evb/u-boot.int | 4 ---- board/freescale/m547xevb/u-boot.lds | 6 ------ board/freescale/m548xevb/u-boot.lds | 6 ------ include/configs/M54451EVB.h | 10 ++++++---- include/configs/M54455EVB.h | 12 ++++++++---- include/configs/M5475EVB.h | 11 +++++++---- include/configs/M5485EVB.h | 10 ++++++---- 10 files changed, 27 insertions(+), 62 deletions(-)
diff --git a/board/freescale/m54451evb/u-boot.spa b/board/freescale/m54451evb/u-boot.spa index e1bacd3..03d8e52 100644 --- a/board/freescale/m54451evb/u-boot.spa +++ b/board/freescale/m54451evb/u-boot.spa @@ -56,16 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf5445x/start.o (.text) - arch/m68k/cpu/mcf5445x/libmcf5445x.o (.text) - arch/m68k/lib/libm68k.o (.text) - common/cmd_flash.o (.text) - common/dlmalloc.o (.text) - common/main.o (.text) - common/image.o (.text) - lib/libgeneric.o (.text) - - . = DEFINED(env_offset) ? env_offset : .; - common/env_embedded.o (.text)
*(.text) *(.fixup) diff --git a/board/freescale/m54451evb/u-boot.stm b/board/freescale/m54451evb/u-boot.stm index 1c6979f..46773d0 100644 --- a/board/freescale/m54451evb/u-boot.stm +++ b/board/freescale/m54451evb/u-boot.stm @@ -56,20 +56,7 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf5445x/start.o (.text) -/* arch/m68k/cpu/mcf5445x/cpu_init.o (.text) - arch/m68k/cpu/mcf5445x/cpu.o (.text) - arch/m68k/cpu/mcf5445x/dspi.o (.text) - arch/m68k/cpu/mcf5445x/interrupt.o (.text) - arch/m68k/cpu/mcf5445x/speed.o (.text) - arch/m68k/lib/board.o (.text) - common/serial.o (.text) - common/console.o (.text) - lib/display_options.o (.text) - board/freescale/m54455evb/m54455evb.o (.text)
- . = DEFINED(env_offset) ? env_offset : .; - common/env_embedded.o (.text) -*/ *(.text) *(.fixup) *(.got1) diff --git a/board/freescale/m54455evb/u-boot.atm b/board/freescale/m54455evb/u-boot.atm index cf4650e..03d8e52 100644 --- a/board/freescale/m54455evb/u-boot.atm +++ b/board/freescale/m54455evb/u-boot.atm @@ -56,13 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf5445x/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/lib/interrupts.o (.text) - common/dlmalloc.o (.text) - lib/zlib.o (.text) - - . = DEFINED(env_offset) ? env_offset : .; - common/env_embedded.o (.text)
*(.text) *(.fixup) diff --git a/board/freescale/m54455evb/u-boot.int b/board/freescale/m54455evb/u-boot.int index 79e64a2..03d8e52 100644 --- a/board/freescale/m54455evb/u-boot.int +++ b/board/freescale/m54455evb/u-boot.int @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf5445x/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/lib/interrupts.o (.text) - common/dlmalloc.o (.text) - lib/zlib.o (.text)
*(.text) *(.fixup) diff --git a/board/freescale/m547xevb/u-boot.lds b/board/freescale/m547xevb/u-boot.lds index a4e4d5a..a5b1c1a 100644 --- a/board/freescale/m547xevb/u-boot.lds +++ b/board/freescale/m547xevb/u-boot.lds @@ -56,12 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf547x_8x/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/lib/interrupts.o (.text) - common/dlmalloc.o (.text) - - . = DEFINED(env_offset) ? env_offset : .; - common/env_embedded.o (.text)
*(.text) *(.fixup) diff --git a/board/freescale/m548xevb/u-boot.lds b/board/freescale/m548xevb/u-boot.lds index a4e4d5a..a5b1c1a 100644 --- a/board/freescale/m548xevb/u-boot.lds +++ b/board/freescale/m548xevb/u-boot.lds @@ -56,12 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf547x_8x/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/lib/interrupts.o (.text) - common/dlmalloc.o (.text) - - . = DEFINED(env_offset) ? env_offset : .; - common/env_embedded.o (.text)
*(.text) *(.fixup) diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h index 37715c5..7c8143e 100644 --- a/include/configs/M54451EVB.h +++ b/include/configs/M54451EVB.h @@ -250,8 +250,9 @@ #endif #define CONFIG_SYS_BOOTPARAMS_LEN 64*1024 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
+/* Reserve 256 kB for malloc() */ +#define CONFIG_SYS_MALLOC_LEN (256 << 10) /* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is @@ -261,7 +262,8 @@ #define CONFIG_SYS_BOOTMAPSZ (CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
/* Configuration for environment - * Environment is embedded in u-boot in the second sector of the flash + * Environment is not embedded in u-boot. First time runing may have env + * crc error warning if there is no correct environment on the flash. */ #if defined(CONFIG_SYS_STMICRO_BOOT) # define CONFIG_ENV_IS_IN_SPI_FLASH 1 @@ -271,9 +273,9 @@ # define CONFIG_ENV_SECT_SIZE 0x10000 #else # define CONFIG_ENV_IS_IN_FLASH 1 -# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x8000) +# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000) # define CONFIG_ENV_SIZE 0x2000 -# define CONFIG_ENV_SECT_SIZE 0x8000 +# define CONFIG_ENV_SECT_SIZE 0x20000 #endif #undef CONFIG_ENV_OVERWRITE
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h index 86faa3d..938773a 100644 --- a/include/configs/M54455EVB.h +++ b/include/configs/M54455EVB.h @@ -310,7 +310,9 @@ #endif #define CONFIG_SYS_BOOTPARAMS_LEN 64*1024 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ + +/* Reserve 256 kB for malloc() */ +#define CONFIG_SYS_MALLOC_LEN (256 << 10)
/* * For booting Linux, the board info and command line data @@ -322,7 +324,8 @@
/* * Configuration for environment - * Environment is embedded in u-boot in the second sector of the flash + * Environment is not embedded in u-boot. First time runing may have env + * crc error warning if there is no correct environment on the flash. */ #ifdef CONFIG_CF_SBF # define CONFIG_ENV_IS_IN_SPI_FLASH @@ -346,8 +349,9 @@ # define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE # define CONFIG_SYS_FLASH0_BASE CONFIG_SYS_CS0_BASE # define CONFIG_SYS_FLASH1_BASE CONFIG_SYS_CS1_BASE -# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x4000) -# define CONFIG_ENV_SECT_SIZE 0x2000 +# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000) +# define CONFIG_ENV_SIZE 0x2000 +# define CONFIG_ENV_SECT_SIZE 0x10000 #endif #ifdef CONFIG_SYS_INTEL_BOOT # define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h index 5f6eb55..63f2186 100644 --- a/include/configs/M5475EVB.h +++ b/include/configs/M5475EVB.h @@ -243,8 +243,9 @@ #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
#define CONFIG_SYS_BOOTPARAMS_LEN 64*1024 -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
+/* Reserve 256 kB for malloc() */ +#define CONFIG_SYS_MALLOC_LEN (256 << 10) /* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is @@ -274,10 +275,12 @@ #endif
/* Configuration for environment - * Environment is embedded in u-boot in the second sector of the flash + * Environment is not embedded in u-boot but at offset 0x40000 on the flash. + * First time runing may have env crc error warning if there is + * no correct environment on the flash. */ -#define CONFIG_ENV_OFFSET 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x2000 +#define CONFIG_ENV_OFFSET 0x40000 +#define CONFIG_ENV_SECT_SIZE 0x10000 #define CONFIG_ENV_IS_IN_FLASH 1
/*----------------------------------------------------------------------- diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index e178e35..b073b51 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -229,8 +229,9 @@ #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
#define CONFIG_SYS_BOOTPARAMS_LEN 64*1024 -#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
+/* Reserve 256 kB for malloc() */ +#define CONFIG_SYS_MALLOC_LEN (256 << 10) /* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is @@ -260,10 +261,11 @@ #endif
/* Configuration for environment - * Environment is embedded in u-boot in the second sector of the flash + * Environment is not embedded in u-boot. First time runing may have env + * crc error warning if there is no correct environment on the flash. */ -#define CONFIG_ENV_OFFSET 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x2000 +#define CONFIG_ENV_OFFSET 0x40000 +#define CONFIG_ENV_SECT_SIZE 0x10000 #define CONFIG_ENV_IS_IN_FLASH 1
/*-----------------------------------------------------------------------

The lds file for ColdFire boards need to clean up since commit 6d8962e814c15807dd6ac5757904be2a02d187b8 'Switch from archive libraries to partial linking'.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- board/freescale/m5208evbe/u-boot.lds | 3 --- board/freescale/m52277evb/u-boot.spa | 3 --- board/freescale/m5253demo/u-boot.lds | 4 ---- board/freescale/m53017evb/u-boot.lds | 2 -- board/freescale/m5329evb/u-boot.lds | 4 ---- board/freescale/m5373evb/u-boot.lds | 4 ---- 6 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/board/freescale/m5208evbe/u-boot.lds b/board/freescale/m5208evbe/u-boot.lds index e5011a6..2bac566 100644 --- a/board/freescale/m5208evbe/u-boot.lds +++ b/board/freescale/m5208evbe/u-boot.lds @@ -56,9 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf52x2/start.o (.text) - arch/m68k/cpu/mcf52x2/libmcf52x2.o (.text) - arch/m68k/lib/libm68k.o (.text) - common/dlmalloc.o (.text)
. = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m52277evb/u-boot.spa b/board/freescale/m52277evb/u-boot.spa index 4b710be..2872250 100644 --- a/board/freescale/m52277evb/u-boot.spa +++ b/board/freescale/m52277evb/u-boot.spa @@ -58,9 +58,6 @@ SECTIONS arch/m68k/cpu/mcf5227x/start.o (.text) arch/m68k/cpu/mcf5227x/libmcf5227x.o (.text) arch/m68k/lib/libm68k.o (.text) - lib/libgeneric.o (.text) - common/cmd_mem.o (.text) - common/main.o (.text)
. = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5253demo/u-boot.lds b/board/freescale/m5253demo/u-boot.lds index 3644838..279c5b9 100644 --- a/board/freescale/m5253demo/u-boot.lds +++ b/board/freescale/m5253demo/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf52x2/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/cpu/mcf52x2/interrupts.o (.text) - common/dlmalloc.o (.text) - lib/zlib.o (.text)
. = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m53017evb/u-boot.lds b/board/freescale/m53017evb/u-boot.lds index 445566b..69b57c5 100644 --- a/board/freescale/m53017evb/u-boot.lds +++ b/board/freescale/m53017evb/u-boot.lds @@ -58,8 +58,6 @@ SECTIONS arch/m68k/cpu/mcf532x/start.o (.text) arch/m68k/cpu/mcf532x/libmcf532x.o (.text) arch/m68k/lib/libm68k.o (.text) - common/dlmalloc.o (.text) - lib/zlib.o (.text)
. = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5329evb/u-boot.lds b/board/freescale/m5329evb/u-boot.lds index 4375342..f267609 100644 --- a/board/freescale/m5329evb/u-boot.lds +++ b/board/freescale/m5329evb/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf532x/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/lib/interrupts.o (.text) - common/dlmalloc.o (.text) - lib/zlib.o (.text)
. = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5373evb/u-boot.lds b/board/freescale/m5373evb/u-boot.lds index f3acfc7..ee2e5a3 100644 --- a/board/freescale/m5373evb/u-boot.lds +++ b/board/freescale/m5373evb/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */
arch/m68k/cpu/mcf532x/start.o (.text) - arch/m68k/lib/traps.o (.text) - arch/m68k/lib/interrupts.o (.text) - common/dlmalloc.o (.text) - lib/zlib.o (.text)
. = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text)

commit a45dde2293c816138e53c26eca6fd0322583f9a6 changed the dm9000 direct register access to standard IO. This should work on the ColdFire platform as there are corresponding macros for the LE devices. But the hardware settings on M5253DEMO board had swapped the byte order which make the original macros such as out_le16 cannot work. To avoid changing the common io access code on ColdFire platform, the DM9000_BYTE_SWAPPED define added to make the dm9000 use __raw* IO access on ColdFire M5253DEMO board.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- drivers/net/dm9000x.c | 10 +++++++++- include/configs/M5253DEMO.h | 1 + 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c index 709f67a..22158de 100644 --- a/drivers/net/dm9000x.c +++ b/drivers/net/dm9000x.c @@ -116,13 +116,21 @@ static u8 DM9000_ior(int); static void DM9000_iow(int reg, u8 value);
/* DM9000 network board routine ---------------------------- */ - +#ifndef DM9000_BYTE_SWAPPED #define DM9000_outb(d,r) writeb(d, (volatile u8 *)(r)) #define DM9000_outw(d,r) writew(d, (volatile u16 *)(r)) #define DM9000_outl(d,r) writel(d, (volatile u32 *)(r)) #define DM9000_inb(r) readb((volatile u8 *)(r)) #define DM9000_inw(r) readw((volatile u16 *)(r)) #define DM9000_inl(r) readl((volatile u32 *)(r)) +#else +#define DM9000_outb(d, r) __raw_writeb(d, r) +#define DM9000_outw(d, r) __raw_writew(d, r) +#define DM9000_outl(d, r) __raw_writel(d, r) +#define DM9000_inb(r) __raw_readb(r) +#define DM9000_inw(r) __raw_readw(r) +#define DM9000_inl(r) __raw_readl(r) +#endif
#ifdef CONFIG_DM9000_DEBUG static void diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h index f2f3159..8120b68 100644 --- a/include/configs/M5253DEMO.h +++ b/include/configs/M5253DEMO.h @@ -95,6 +95,7 @@ # define DM9000_IO CONFIG_DM9000_BASE # define DM9000_DATA (CONFIG_DM9000_BASE + 4) # undef CONFIG_DM9000_DEBUG +# define DM9000_BYTE_SWAPPED
# define CONFIG_OVERWRITE_ETHADDR_ONCE

There is no network device on ColdFire 52277EVB board.But the default cmd include NFS define which make the build error.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- include/configs/M52277EVB.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h index bb3b474..5722544 100644 --- a/include/configs/M52277EVB.h +++ b/include/configs/M52277EVB.h @@ -69,6 +69,7 @@ #define CONFIG_CMD_MEMORY #define CONFIG_CMD_MISC #undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS #define CONFIG_CMD_REGINFO #undef CONFIG_CMD_USB #undef CONFIG_CMD_BMP

The dram initialization sequence should be in order. This patch add mb for the dram intialization code to make sure the compiler do not disorder the code.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- arch/m68k/include/asm/io.h | 2 ++ board/freescale/m5253demo/m5253demo.c | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h index 531f420..d86eaf9 100644 --- a/arch/m68k/include/asm/io.h +++ b/arch/m68k/include/asm/io.h @@ -81,6 +81,8 @@ #define outl(val, port) out_le32((u32 *)((port)+_IO_BASE), (val)) #endif
+#define mb() __asm__ __volatile__ ("" : : : "memory") + extern inline void _insb(volatile u8 * port, void *buf, int ns) { u8 *data = (u8 *) buf; diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index 4772074..8ffb2cc 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -27,6 +27,7 @@ #include <common.h> #include <asm/immap.h> #include <netdev.h> +#include <asm/io.h>
int checkboard(void) { @@ -63,10 +64,12 @@ phys_size_t initdram(int board_type) __asm__("nop");
mbar_writeLong(MCFSIM_DACR0, 0x0000322c); + mb(); __asm__("nop");
/* Write to this block to initiate precharge */ *(u32 *) (CONFIG_SYS_SDRAM_BASE) = 0xa5a5a5a5; + mb(); __asm__("nop");
/* Set RE bit in DACR */ @@ -83,6 +86,7 @@ phys_size_t initdram(int board_type) __asm__("nop");
*(u32 *) (CONFIG_SYS_SDRAM_BASE + 0x800) = 0xa5a5a5a5; + mb(); }
return dramsize;

The u-boot image size increased and the u-boot udpate command should be adjusted to fit larger image.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- include/configs/M5329EVB.h | 4 ++-- include/configs/M5373EVB.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index 7ae0fad..3adcf4d 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -124,8 +124,8 @@ "u-boot=u-boot.bin\0" \ "load=tftp ${loadaddr) ${u-boot}\0" \ "upd=run load; run prog\0" \ - "prog=prot off 0 2ffff;" \ - "era 0 2ffff;" \ + "prog=prot off 0 3ffff;" \ + "era 0 3ffff;" \ "cp.b ${loadaddr} 0 ${filesize};" \ "save\0" \ "" diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index 7086a1b..71b5af6 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -124,8 +124,8 @@ "u-boot=u-boot.bin\0" \ "load=tftp ${loadaddr) ${u-boot}\0" \ "upd=run load; run prog\0" \ - "prog=prot off 0 2ffff;" \ - "era 0 2ffff;" \ + "prog=prot off 0 3ffff;" \ + "era 0 3ffff;" \ "cp.b ${loadaddr} 0 ${filesize};" \ "save\0" \ ""

Some low-end ColdFire chip such as 5208 need more io sync for FEC to work.
Signed-off-by: Jason Jin Jason.jin@freescale.com --- drivers/net/mcffec.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index a08ff27..666b24e 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -160,6 +160,8 @@ int fec_send(struct eth_device *dev, volatile void *packet, int length) info->txbd[info->txIdx].cbd_datlen = length; info->txbd[info->txIdx].cbd_sc |= BD_ENET_TX_RDY_LST;
+ __asm__("tpf"); + /* Activate transmit Buffer Descriptor polling */ fecp->tdar = 0x01000000; /* Descriptor polling active */
participants (1)
-
Jason Jin