aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-28 15:22:39 -0500
committerTom Rini <trini@konsulko.com>2023-02-28 15:22:39 -0500
commit4a65e93ac0993945f5e0670820773f052f8ef13e (patch)
tree7387722cdebf811020937a556565f0277398d0a6
parente8c80ac0f7a13bf0fc016ce324b870c0cff7a2b8 (diff)
parent4c885f9f64cd85471614c75027620e3bcf3046bd (diff)
downloadu-boot-WIP/28Feb2023.zip
u-boot-WIP/28Feb2023.tar.gz
u-boot-WIP/28Feb2023.tar.bz2
Merge https://source.denx.de/u-boot/custodians/u-boot-coldfireWIP/28Feb2023
- Assorted changes to bring m68k back in to functioning
-rw-r--r--arch/Kconfig1
-rw-r--r--arch/m68k/cpu/mcf530x/start.S18
-rw-r--r--arch/m68k/dts/stmark2.dts2
-rw-r--r--arch/m68k/include/asm/global_data.h3
-rw-r--r--board/sysam/stmark2/Kconfig2
-rw-r--r--include/configs/amcore.h20
6 files changed, 33 insertions, 13 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index d30676a..55b9a5e 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -67,6 +67,7 @@ config ARM
config M68K
bool "M68000 architecture"
select HAVE_PRIVATE_LIBGCC
+ select USE_PRIVATE_LIBGCC
select NEEDS_MANUAL_RELOC
select SYS_BOOT_GET_CMDLINE
select SYS_BOOT_GET_KBD
diff --git a/arch/m68k/cpu/mcf530x/start.S b/arch/m68k/cpu/mcf530x/start.S
index dbe2b54..cef8d79 100644
--- a/arch/m68k/cpu/mcf530x/start.S
+++ b/arch/m68k/cpu/mcf530x/start.S
@@ -132,7 +132,8 @@ _start:
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
- bsr board_init_f_alloc_reserve
+ move.l #board_init_f_alloc_reserve, %a1
+ jsr (%a1)
/* update stack and frame-pointers */
move.l %d0, %sp
@@ -140,14 +141,17 @@ _start:
/* initialize reserved area */
move.l %d0, -(%sp)
- bsr board_init_f_init_reserve
+ move.l #board_init_f_init_reserve, %a1
+ jsr (%a1)
/* run low-level CPU init code (from flash) */
- bsr cpu_init_f
+ move.l #cpu_init_f, %a1
+ jsr (%a1)
/* run low-level board init code (from flash) */
clr.l %sp@-
- bsr board_init_f
+ move.l #board_init_f, %a1
+ jsr (%a1)
/* board_init_f() does not return */
@@ -239,7 +243,8 @@ _fault:
_exc_handler:
SAVE_ALL
movel %sp,%sp@-
- bsr exc_handler
+ move.l #exc_handler, %a1
+ jsr (%a1)
addql #4,%sp
RESTORE_ALL
@@ -247,7 +252,8 @@ _exc_handler:
_int_handler:
SAVE_ALL
movel %sp,%sp@-
- bsr int_handler
+ move.l #int_handler, %a1
+ jsr (%a1)
addql #4,%sp
RESTORE_ALL
diff --git a/arch/m68k/dts/stmark2.dts b/arch/m68k/dts/stmark2.dts
index 306b56d..3688651 100644
--- a/arch/m68k/dts/stmark2.dts
+++ b/arch/m68k/dts/stmark2.dts
@@ -27,7 +27,7 @@
flash: is25lp128@1 {
#address-cells = <1>;
#size-cells = <1>;
- compatible = "spi-flash";
+ compatible = "jedec,spi-nor";
spi-max-frequency = <60000000>;
reg = <1>;
};
diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h
index 273e843..5f576ba 100644
--- a/arch/m68k/include/asm/global_data.h
+++ b/arch/m68k/include/asm/global_data.h
@@ -23,6 +23,9 @@ struct arch_global_data {
#ifdef CONFIG_MCF5441x
unsigned long sdhc_clk;
#endif
+#if defined(CONFIG_FSL_ESDHC)
+ u32 sdhc_per_clk;
+#endif
};
#include <asm-generic/global_data.h>
diff --git a/board/sysam/stmark2/Kconfig b/board/sysam/stmark2/Kconfig
index b259505..94f5049 100644
--- a/board/sysam/stmark2/Kconfig
+++ b/board/sysam/stmark2/Kconfig
@@ -11,7 +11,7 @@ config SERIAL_BOOT
depends on CF_SBF
config SYS_INPUT_CLKSRC
- hex
+ int "External crystal clock"
default 30000000
config SYS_CPU
diff --git a/include/configs/amcore.h b/include/configs/amcore.h
index 648d30a..37c45e7 100644
--- a/include/configs/amcore.h
+++ b/include/configs/amcore.h
@@ -10,14 +10,20 @@
#define CFG_SYS_UART_PORT 0
-#define CFG_EXTRA_ENV_SETTINGS \
+#define CONFIG_MCFTMR
+#define CONFIG_MCFUART
+#define CONFIG_SYS_UART_PORT 0
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+
+#define CONFIG_BOOTCOMMAND "bootm ffc30000"
+#define CONFIG_EXTRA_ENV_SETTINGS \
"upgrade_uboot=loady; " \
- "protect off 0xffc00000 0xffc1ffff; " \
- "erase 0xffc00000 0xffc1ffff; " \
+ "protect off 0xffc00000 0xffc2ffff; " \
+ "erase 0xffc00000 0xffc2ffff; " \
"cp.b 0x20000 0xffc00000 ${filesize}\0" \
"upgrade_kernel=loady; " \
- "erase 0xffc20000 0xffefffff; " \
- "cp.b 0x20000 0xffc20000 ${filesize}\0" \
+ "erase 0xffc30000 0xffefffff; " \
+ "cp.b 0x20000 0xffc30000 ${filesize}\0" \
"upgrade_jffs2=loady; " \
"erase 0xfff00000 0xffffffff; " \
"cp.b 0x20000 0xfff00000 ${filesize}\0"
@@ -38,6 +44,10 @@
/* amcore design has flash data bytes wired swapped */
#define CFG_SYS_WRITE_SWAPPED_DATA
/* reserve 128-4KB */
+#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE + 0x400)
+#define CONFIG_SYS_MONITOR_LEN ((192 - 4) * 1024)
+#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
+#define CONFIG_SYS_BOOTPARAMS_LEN (64 * 1024)
#define LDS_BOARD_TEXT \
. = DEFINED(env_offset) ? env_offset : .; \