1
2
3
4
5
6
7
8
9
10
11
12#ifndef __CONFIGS_XEA_H__
13#define __CONFIGS_XEA_H__
14
15#include <linux/sizes.h>
16
17
18
19#define CFG_SYS_SPI_KERNEL_OFFS SZ_1M
20#define CFG_SYS_SPI_ARGS_OFFS SZ_512K
21#define CFG_SYS_SPI_ARGS_SIZE SZ_32K
22
23
24#define PHYS_SDRAM_1 0x40000000
25#define PHYS_SDRAM_1_SIZE 0x10000000
26#define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1
27
28
29
30#define CFG_EXTRA_ENV_SETTINGS \
31 "bootmode=update\0" \
32 "bootpri=mmc_mmc\0" \
33 "bootsec=sf_swu\0" \
34 "consdev=ttyAMA0\0" \
35 "baudrate=115200\0" \
36 "dtbaddr=0x44000000\0" \
37 "dtbfile=imx28-xea.dtb\0" \
38 "rootdev=/dev/mmcblk0p2\0" \
39 "netdev=eth0\0" \
40 "rdaddr=0x43000000\0" \
41 "swufile=swupdate.img\0" \
42 "sf_kernel_offset=0x100000\0" \
43 "sf_kernel_size=0x400000\0" \
44 "sf_swu_offset=0x500000\0" \
45 "sf_swu_size=0x800000\0" \
46 "rootpath=/opt/eldk-5.5/armv5te/rootfs-qte-sdk\0" \
47 "do_update_mmc=" \
48 "if mmc rescan ; then " \
49 "mmc dev 0 ${update_mmc_part} ; " \
50 "if dhcp ${hostname}/${update_filename} ; then " \
51 "setexpr fw_sz ${filesize} / 0x200 ; " \
52 "setexpr fw_sz ${fw_sz} + 1 ; " \
53 "mmc write ${loadaddr} ${update_offset} ${fw_sz} ; " \
54 "fi ; " \
55 "fi\0" \
56 "do_update_sf=" \
57 "if sf probe ; then " \
58 "if dhcp ${hostname}/${update_filename} ; then " \
59 "sf erase ${update_offset} +${filesize} ; " \
60 "sf write ${loadaddr} ${update_offset} ${filesize} ; " \
61 "fi ; " \
62 "fi\0" \
63 "update_spl_filename=u-boot.sb\0" \
64 "update_spl=" \
65 "setenv update_filename ${update_spl_filename} ; " \
66 "setenv update_offset 0 ; " \
67 "run do_update_sf\0" \
68 "update_uboot_filename=u-boot.img\0" \
69 "update_uboot=" \
70 "setenv update_filename ${update_uboot_filename} ; " \
71 "setenv update_offset 0x10000 ; " \
72 "run do_update_sf ; " \
73 "setenv update_mmc_part 1 ; " \
74 "setenv update_offset 0 ; " \
75 "run do_update_mmc\0" \
76 "update_kernel_filename=uImage\0" \
77 "update_kernel=" \
78 "setenv update_mmc_part 1 ; " \
79 "setenv update_filename ${update_kernel_filename} ; " \
80 "setenv update_offset 0x800 ; " \
81 "run do_update_mmc ; " \
82 "setenv update_filename ${dtbfile} ; " \
83 "setenv update_offset 0x400 ; " \
84 "run do_update_mmc\0" \
85 "update_sfkernel=" \
86 "setenv update_filename fitImage ; " \
87 "setenv update_offset ${sf_kernel_offset} ; " \
88 "run do_update_sf\0" \
89 "update_swu=" \
90 "setenv update_filename ${swufile} ; " \
91 "setenv update_offset ${sf_swu_offset} ; " \
92 "run do_update_sf\0" \
93 "addcons=" \
94 "setenv bootargs ${bootargs} " \
95 "console=${consdev},${baudrate}\0" \
96 "addip=" \
97 "setenv bootargs ${bootargs} " \
98 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
99 "${netmask}:${hostname}:${netdev}:off\0" \
100 "addmisc=" \
101 "setenv bootargs ${bootargs} ${miscargs}\0" \
102 "addargs=run addcons addmisc\0" \
103 "mmcload=" \
104 "mmc rescan ; " \
105 "mmc dev 0 1 ; " \
106 "mmc read ${loadaddr} 0x800 0x2000 ; " \
107 "mmc read ${dtbaddr} 0x400 0x80\0" \
108 "netload=" \
109 "dhcp ${loadaddr} ${hostname}/${bootfile} ; " \
110 "tftp ${dtbaddr} ${hostname}/${dtbfile}\0" \
111 "sfload=" \
112 "sf probe ; " \
113 "sf read ${loadaddr} ${sf_kernel_offset} ${sf_kernel_size}\0" \
114 "usbload=" \
115 "usb start ; " \
116 "load usb 0:1 ${loadaddr} ${bootfile}\0" \
117 "miscargs=panic=1\0" \
118 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
119 "nfsargs=" \
120 "setenv bootargs root=/dev/nfs rw " \
121 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
122 "mmc_mmc=" \
123 "if run mmcload mmcargs addargs ; then " \
124 "bootm ${loadaddr} - ${dtbaddr} ; " \
125 "fi\0" \
126 "mmc_nfs=" \
127 "if run mmcload nfsargs addip addargs ; then " \
128 "bootm ${loadaddr} - ${dtbaddr} ; " \
129 "fi\0" \
130 "sf_mmc=" \
131 "if run sfload mmcargs addargs ; then " \
132 "bootm ${loadaddr} - ${dtbaddr} ; " \
133 "fi\0" \
134 "sf_swu=" \
135 "if run sfload ; then " \
136 "sf read ${rdaddr} ${sf_swu_offset} ${sf_swu_size} ; " \
137 "setenv bootargs root=/dev/ram0 rw ; " \
138 "run addargs ; " \
139 "bootm ${loadaddr} ${rdaddr} ; " \
140 "fi\0" \
141 "net_mmc=" \
142 "if run netload mmcargs addargs ; then " \
143 "bootm ${loadaddr} - ${dtbaddr} ; " \
144 "fi\0" \
145 "net_nfs=" \
146 "if run netload nfsargs addip addargs ; then " \
147 "bootm ${loadaddr} - ${dtbaddr} ; " \
148 "fi\0" \
149 "prebootcmd=" \
150 "if test \"${envsaved}\" != y ; then ; " \
151 "setenv envsaved y ; " \
152 "saveenv ; " \
153 "fi ; " \
154 "if test \"${bootmode}\" = normal ; then " \
155 "setenv bootdelay 0 ; " \
156 "setenv bootpri mmc_mmc ; " \
157 "elif test \"${bootmode}\" = devel ; then " \
158 "setenv bootdelay 3 ; " \
159 "setenv bootpri net_mmc ; " \
160 "else " \
161 "if test \"${bootmode}\" != update ; then " \
162 "echo Warning: unknown bootmode \"${bootmode}\" ; " \
163 "fi ; " \
164 "setenv bootdelay 1 ; " \
165 "setenv bootpri sf_swu ; " \
166 "fi\0"
167
168
169#include <configs/mxs.h>
170
171#endif
172