Commit c2f85087ffef4f99b60d98622371af4ffc5372f9

Authored by Eric Lee
1 parent e44dd05afd

Add Cortex-M4 Support

Showing 1 changed file with 18 additions and 0 deletions Side-by-side Diff

include/configs/smarcimx8mq.h
... ... @@ -85,8 +85,12 @@
85 85 "script=boot.scr\0" \
86 86 "image=Image\0" \
87 87 "splashimage=0x50000000\0" \
  88 + "m4_bin=hello_world.bin\0" \
  89 + "use_m4=no\0" \
88 90 "console=ttymxc0,115200\0" \
89 91 "fdt_addr=0x43000000\0" \
  92 + "m4_addr=0x7e0000\0" \
  93 + "m4_addr_tmp=0x48000000\0" \
90 94 "fdt_high=0xffffffffffffffff\0" \
91 95 "boot_fdt=try\0" \
92 96 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
93 97  
... ... @@ -112,9 +116,11 @@
112 116 "bootscript=echo Running bootscript from mmc ...; " \
113 117 "source\0" \
114 118 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
  119 + "loadm4bin=load mmc ${mmcdev}:${mmcpart} ${m4_addr_tmp} ${m4_bin}\0" \
115 120 "loadusbimage=fatload usb 0:1 ${loadaddr} ${image}\0" \
116 121 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \
117 122 "loadusbfdt=fatload usb 0:1 ${fdt_addr} /dtbs/${fdt_file}\0" \
  123 + "cpm4mem=cp.b ${m4_addr_tmp} ${m4_addr} 20000\0" \
118 124 "mmcboot=echo Booting from mmc ...; " \
119 125 "run mmcargs; " \
120 126 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
... ... @@ -126,6 +132,14 @@
126 132 "else " \
127 133 "echo wait for boot; " \
128 134 "fi;\0" \
  135 + "m4boot=" \
  136 + "if test ${m4_addr} = 0x7e0000; then " \
  137 + "echo Booting M4 from TCM; " \
  138 + "else " \
  139 + "echo Booting M4 from DRAM; " \
  140 + "dcache flush; " \
  141 + "fi; " \
  142 + "bootaux ${m4_addr};\0" \
129 143 "usbboot=echo Booting from USB ...; " \
130 144 "run usbargs; " \
131 145 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
... ... @@ -160,6 +174,10 @@
160 174  
161 175 #define CONFIG_BOOTCOMMAND \
162 176 "mmc dev ${mmcdev}; if mmc rescan; then " \
  177 + "if test ${use_m4} = yes && run loadm4bin; then " \
  178 + "run cpm4mem; " \
  179 + "run m4boot; " \
  180 + "fi; " \
163 181 "echo Checking for: uEnv.txt ...; " \
164 182 "if test -e mmc ${bootpart} /uEnv.txt; then " \
165 183 "if run loadbootenv; then " \