Commit f7cc15046cf48b28161cc164cd36c7c0813dc39f
1 parent
2fd847944d
Exists in
smarc_8m-imx_v2019.04_4.19.35_1.1.0
Add Cortex-M4 Support
Showing 1 changed file with 18 additions and 0 deletions Side-by-side Diff
include/configs/smarcimx8mq.h
... | ... | @@ -122,8 +122,12 @@ |
122 | 122 | JAILHOUSE_ENV \ |
123 | 123 | "script=boot.scr\0" \ |
124 | 124 | "image=Image\0" \ |
125 | + "m4_bin=hello_world.bin\0" \ | |
126 | + "use_m4=no\0" \ | |
125 | 127 | "console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200\0" \ |
126 | 128 | "fdt_addr=0x43000000\0" \ |
129 | + "m4_addr=0x7e0000\0" \ | |
130 | + "m4_addr_tmp=0x48000000\0" \ | |
127 | 131 | "fdt_high=0xffffffffffffffff\0" \ |
128 | 132 | "boot_fdt=try\0" \ |
129 | 133 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
130 | 134 | |
... | ... | @@ -149,9 +153,11 @@ |
149 | 153 | "bootscript=echo Running bootscript from mmc ...; " \ |
150 | 154 | "source\0" \ |
151 | 155 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
156 | + "loadm4bin=load mmc ${mmcdev}:${mmcpart} ${m4_addr_tmp} ${m4_bin}\0" \ | |
152 | 157 | "loadusbimage=fatload usb 0:1 ${loadaddr} ${image}\0" \ |
153 | 158 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \ |
154 | 159 | "loadusbfdt=fatload usb 0:1 ${fdt_addr} /dtbs/${fdt_file}\0" \ |
160 | + "cpm4mem=cp.b ${m4_addr_tmp} ${m4_addr} 20000\0" \ | |
155 | 161 | "mmcboot=echo Booting from mmc ...; " \ |
156 | 162 | "run mmcargs; " \ |
157 | 163 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
... | ... | @@ -163,6 +169,14 @@ |
163 | 169 | "else " \ |
164 | 170 | "echo wait for boot; " \ |
165 | 171 | "fi;\0" \ |
172 | + "m4boot=" \ | |
173 | + "if test ${m4_addr} = 0x7e0000; then " \ | |
174 | + "echo Booting M4 from TCM; " \ | |
175 | + "else " \ | |
176 | + "echo Booting M4 from DRAM; " \ | |
177 | + "dcache flush; " \ | |
178 | + "fi; " \ | |
179 | + "bootaux ${m4_addr};\0" \ | |
166 | 180 | "usbboot=echo Booting from USB ...; " \ |
167 | 181 | "run usbargs; " \ |
168 | 182 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
... | ... | @@ -197,6 +211,10 @@ |
197 | 211 | |
198 | 212 | #define CONFIG_BOOTCOMMAND \ |
199 | 213 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
214 | + "if test ${use_m4} = yes && run loadm4bin; then " \ | |
215 | + "run cpm4mem; " \ | |
216 | + "run m4boot; " \ | |
217 | + "fi; " \ | |
200 | 218 | "echo Checking for: uEnv.txt ...; " \ |
201 | 219 | "if test -e mmc ${bootpart} /uEnv.txt; then " \ |
202 | 220 | "if run loadbootenv; then " \ |