From 402b04a84a4ff9c046a78da93bd1da81b686a070 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Thu, 3 Sep 2020 11:18:09 +0800 Subject: [PATCH] Add Cortex-M4 Support --- include/configs/smarcimx8mm.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/configs/smarcimx8mm.h b/include/configs/smarcimx8mm.h index 25a4845..6e282e9 100644 --- a/include/configs/smarcimx8mm.h +++ b/include/configs/smarcimx8mm.h @@ -158,8 +158,12 @@ JAILHOUSE_ENV \ "script=boot.scr\0" \ "image=Image\0" \ + "m4_bin=hello_world.bin\0" \ + "use_m4=no\0" \ "console=ttymxc2,115200 earlycon=ec_imx6q,0x30890000,115200\0" \ "fdt_addr=0x43000000\0" \ + "m4_addr=0x7e0000\0" \ + "m4_addr_tmp=0x48000000\0" \ "fdt_high=0xffffffffffffffff\0" \ "boot_fdt=try\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -185,9 +189,11 @@ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ + "loadm4bin=load mmc ${mmcdev}:${mmcpart} ${m4_addr_tmp} ${m4_bin}\0" \ "loadusbimage=fatload usb 0:1 ${loadaddr} ${image}\0" \ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \ "loadusbfdt=fatload usb 0:1 ${fdt_addr} /dtbs/${fdt_file}\0" \ + "cpm4mem=cp.b ${m4_addr_tmp} ${m4_addr} 20000\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ @@ -199,6 +205,14 @@ "else " \ "echo wait for boot; " \ "fi;\0" \ + "m4boot=" \ + "if test ${m4_addr} = 0x7e0000; then " \ + "echo Booting M4 from TCM; " \ + "else " \ + "echo Booting M4 from DRAM; " \ + "dcache flush; " \ + "fi; " \ + "bootaux ${m4_addr};\0" \ "usbboot=echo Booting from USB ...; " \ "run usbargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ @@ -233,6 +247,10 @@ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "if test ${use_m4} = yes && run loadm4bin; then " \ + "run cpm4mem; " \ + "run m4boot; " \ + "fi; " \ "echo Checking for: uEnv.txt ...; " \ "if test -e mmc ${bootpart} /uEnv.txt; then " \ "if run loadbootenv; then " \ -- 1.9.1