m68k: restore bi_enetaddr & bi_enet1addr in bd_t for bootm compatibility.
Subsystems (2)
PATCH 1/4 m68k: restore bi_enetaddr & bi_enet1addr in bd_t for bootm compatibility.
--- arch/m68k/include/asm/u-boot.h | 4 ++++ arch/m68k/lib/bootm.c | 8 ++++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
arch/m68k/include/asm/u-boot.h +4 -0
@@ -48,6 +48,7 @@ typedef struct bd_info {unsigned long bi_bootflags;/* boot / reboot flag (for LynxOS) */ unsigned long bi_boot_params;/* where this board expects params */ unsigned long bi_ip_addr;/* IP Address */ +unsigned char bi_enetaddr[6 ];/* OLD: see README.enetaddr */ unsigned short bi_ethspeed;/* Ethernet speed in Mbps */ unsigned long bi_intfreq;/* Internal Freq, in MHz */ unsigned long bi_busfreq;/* Bus Freq, in MHz */
@@ -60,6 +61,9 @@ typedef struct bd_info {unsigned long bi_flbfreq;/* Flexbus Freq in MHz */ #endif unsigned long bi_baudrate;/* Console Baudrate */ +#ifdef CONFIG_HAS_ETH1 +unsigned char bi_enet1addr[6 ];/* OLD: see README.enetaddr */ +#endif } bd_t;#endif /* __ASSEMBLY__ */
arch/m68k/lib/bootm.c +8 -0
@@ -32,6 +32,7 @@#ifdef CONFIG_SHOW_BOOT_PROGRESS # include <status_led.h> #endif +#include <net.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -96,6 +97,13 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) }set_clocks_in_mhz (kbd); +#if defined(CONFIG_CMD_NET ) +eth_getenv_enetaddr ("ethaddr" , kbd->bi_enetaddr); +#if defined(CONFIG_HAS_ETH1 ) +eth_getenv_enetaddr ("eth1addr" , kbd->bi_enet1addr); +#endif +#endif + kernel = (void (*)(bd_t *,ulong ,ulong ,ulong ,ulong ))images->ep; rd_len = images->rd_end - images->rd_start;
Signature · 1 line
1.6.3.3
PATCH 2/4 m68k: Make m548xevb config reusable for derived boards.
Allow to redefine :
- CONFIG_BOARD_NAME_STRING and CONFIG_HOSTNAME,
- flash-model related constants :
- TEXT_BASE (for loader) and CONFIG_SYS_CS0_BASE,
- CONFIG_SYS_MAX_FLASH_SECT, CONFIG_ENV_OFFSET and CONFIG_ENV_SECT_SIZE,
- and CONFIG_CMD_PCI.
--- board/freescale/m548xevb/config.mk | 4 ++++ board/freescale/m548xevb/m548xevb.c | 5 ++++- include/configs/M5485EVB.h | 16 +++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-)
board/freescale/m548xevb/config.mk +4 -0
@@ -22,4 +22,8 @@ # MA 02111-1307 USA # +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +ifndef TEXT_BASE TEXT_BASE = 0xFF800000 +endif
board/freescale/m548xevb/m548xevb.c +4 -1
@@ -34,7 +34,10 @@ DECLARE_GLOBAL_DATA_PTR;int checkboard (void ) {puts ("Board: " ); -puts ("Freescale FireEngine 5485 EVB\n" ); +#ifndef CONFIG_BOARD_NAME_STRING +#define CONFIG_BOARD_NAME_STRING "Freescale FireEngine 5485 EVB\n" +#endif +puts (CONFIG_BOARD_NAME_STRING );return 0 ; };
include/configs/M5485EVB.h +13 -3
@@ -58,10 +58,12 @@#define CONFIG_CMD_MISC #define CONFIG_CMD_MII #define CONFIG_CMD_NET +#ifndef CONFIG_NO_CMD_PCI #define CONFIG_CMD_PCI +#define CONFIG_CMD_USB +#endif #define CONFIG_CMD_PING #define CONFIG_CMD_REGINFO -#define CONFIG_CMD_USB #define CONFIG_SLTTMR
@@ -149,7 +151,9 @@#define CONFIG_BOOTDELAY 1/* autoboot after 5 seconds */ #define CONFIG_UDP_CHECKSUM +#ifndef CONFIG_HOSTNAME #define CONFIG_HOSTNAME M548xEVB +#endif #define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "loadaddr=10000\0" \
@@ -247,7 +251,9 @@# define CONFIG_SYS_FLASH_BASE (CONFIG_SYS_CS0_BASE)# define CONFIG_FLASH_CFI_DRIVER 1# define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT -# define CONFIG_SYS_MAX_FLASH_SECT 137/* max number of sectors on one chip */ +# ifndef CONFIG_SYS_MAX_FLASH_SECT +# define CONFIG_SYS_MAX_FLASH_SECT 137/* max number of sectors on one chip */ +# endif # define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */ # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE #ifdef CONFIG_SYS_NOR1SZ
@@ -263,8 +269,10 @@/* Configuration for environment * Environment is embedded in u-boot in the second sector of the flash */ -#define CONFIG_ENV_OFFSET 0x2000 +#ifndef CONFIG_ENV_OFFSET +#define CONFIG_ENV_OFFSET 0x2000#define CONFIG_ENV_SECT_SIZE 0x2000 +#endif #define CONFIG_ENV_IS_IN_FLASH 1/*-----------------------------------------------------------------------
@@ -299,7 +307,9 @@* CS4 - Available * CS5 - Available */ +#ifndef CONFIG_SYS_CS0_BASE #define CONFIG_SYS_CS0_BASE 0xFF800000 +#endif #define CONFIG_SYS_CS0_MASK (((CONFIG_SYS_BOOTSZ << 20) - 1) & 0xFFFF0001)#define CONFIG_SYS_CS0_CTRL 0x00101980
Signature · 1 line
1.6.3.3
PATCH 3/4 m68k/mcf547x_8x : Fix relocation errors in start.S
If the environment sectors in the flash are big, one get those errors :mcf547x_8x/start.S:173: relocation truncated to fit: R_68K_PC16 against symbol cpu_init_f' defined in .text section in libmcf547x_8x.a(cpu_init.o) mcf547x_8x/start.S:174: relocation truncated to fit: R_68K_PC16 against symbol board_init_f' defined in .text section in libm68k.a(board.o) Fix that.
--- arch/m68k/cpu/mcf547x_8x/start.S | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/cpu/mcf547x_8x/start.S +2 -2
@@ -164,8 +164,8 @@ _start: move.l #__got_start, %a5 /* put relocation table address to a5 */ - bsr cpu_init_f /* run low-level CPU init code (from flash) */ - bsr board_init_f /* run low-level board init code (from flash) */ + jbsr cpu_init_f /* run low-level CPU init code (from flash) */ + jbsr board_init_f /* run low-level board init code (from flash) */ /* board_init_f() does not return */
Signature · 1 line
1.6.3.3
PATCH 4/4 m68k: Add ME2060_config (Macq Electronique MCF5484-based board)
--- Makefile | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
Makefile +15 -0
@@ -2188,6 +2188,7 @@ M5475GFE_config : unconfig fi @$(MKCONFIG) -a M5475EVB m68k mcf547x_8x m547xevb freescale +ME2060_config \ M5485AFE_config \ M5485BFE_config \ M5485CFE_config \
@@ -2197,6 +2198,7 @@ M5485FFE_config \ M5485GFE_config \ M5485HFE_config : unconfig @case "$@" in \ + ME2060_config) BOOT=32;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ M5485AFE_config) BOOT=2;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ M5485BFE_config) BOOT=2;CODE=16;VID=0;USB=0;RAM=64;RAM1=0;; \ M5485CFE_config) BOOT=2;CODE=16;VID=1;USB=1;RAM=64;RAM1=0;; \
@@ -2220,6 +2222,19 @@ M5485HFE_config : unconfig fi; \ if [ "$${USB}" == "1" ] ; then \ echo "#define CONFIG_SYS_USBCTRL" >> $(obj)include/config.h ; \ + fi; \ + if [ "$@" == "ME2060_config" ] ; then \ + echo '#define CONFIG_HOSTNAME ME2060' >> $(obj)include/config.h ; \ + echo '#define CONFIG_BOARD_NAME_STRING "Macq Electronique ME2060\n"' >> $(obj)include/config.h ; \ + echo "#define CONFIG_NO_CMD_PCI" >> $(obj)include/config.h ; \ + echo "#define CONFIG_CMD_DHCP" >> $(obj)include/config.h ; \ + echo "#define CONFIG_SYS_ALT_MEMTEST" >> $(obj)include/config.h ; \ + echo "#define CONFIG_SYS_CS0_BASE 0xFE000000" >> $(obj)include/config.h ; \ + echo "#define CONFIG_SYS_MAX_FLASH_SECT 259" >> $(obj)include/config.h ; \ + echo "#define CONFIG_ENV_OFFSET 0x8000" >> $(obj)include/config.h ; \ + echo "#define CONFIG_ENV_SECT_SIZE 0x8000" >> $(obj)include/config.h ; \ + echo "#define CONFIG_ENV_OFFSET_REDUND 0x10000" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/m548xevb/config.tmp ; \ fi @$(MKCONFIG) -a M5485EVB m68k mcf547x_8x m548xevb freescale
Signature · 1 line
1.6.3.3