]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
m68k: add generic-board support
authorangelo@sysam.it <angelo@sysam.it>
Thu, 12 Feb 2015 00:40:17 +0000 (01:40 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:45:42 +0000 (21:45 +0200)
Add generic-board support for the m68k architecture.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
arch/m68k/config.mk
arch/m68k/include/asm/config.h
arch/m68k/lib/Makefile
common/board_f.c
common/board_r.c

index 3b3a7e88ab6077eb9de13dcbc4e0073b1787194b..a629b68d6190a1227afc57d85d15b5102710b4a0 100644 (file)
@@ -11,6 +11,9 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x20000
 
+# Support generic board on m68k
+__HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -D__M68K__
 PLATFORM_LDFLAGS  += -n
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
index e1458acd2c76091b5217f163e72e0654973236d0..75908428819b464a792e1c6d519bdd2b0c1675c0 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 
 #define CONFIG_NEEDS_MANUAL_RELOC
index 73d40bda8bdabdb1229324c85c8cad8d9065283f..d0e1a845dd1c5cf733d35d5d6317f39ebc728739 100644 (file)
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+ifndef CONFIG_SYS_GENERIC_BOARD
+obj-y   += board.o
+endif
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-y  += cache.o
 obj-y  += interrupts.o
index 2ee398b93ec6895845b0b53958f6036d040dd495..cca854d4b1aebba2e9df970c35ec53d9fee03603 100644 (file)
@@ -744,6 +744,13 @@ static int setup_reloc(void)
        gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
 #else
        gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
+#ifdef CONFIG_M68K
+       /*
+        * On all ColdFire arch cpu, monitor code starts always
+        * just after the default vector table location, so at 0x400
+        */
+       gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400);
+#endif
 #endif
 #endif
        memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
index 0335f6bde6ce78f002d34b3ef05b2c14b91b86d7..38be09b8c11163214f45348a5127ab174fcb6271 100644 (file)
@@ -271,14 +271,6 @@ static int initr_malloc(void)
        return 0;
 }
 
-#ifdef CONFIG_SYS_NONCACHED_MEMORY
-static int initr_noncached(void)
-{
-       noncached_init();
-       return 0;
-}
-#endif
-
 #ifdef CONFIG_DM
 static int initr_dm(void)
 {
@@ -706,9 +698,6 @@ init_fnc_t init_sequence_r[] = {
 #endif
        initr_barrier,
        initr_malloc,
-#ifdef CONFIG_SYS_NONCACHED_MEMORY
-       initr_noncached,
-#endif
        bootstage_relocate,
 #ifdef CONFIG_DM
        initr_dm,