blob: 4839ede8d4492f3b3507cafc28229e1a83cae4eb [file] [log] [blame]
Stefan Roesee1b8d0b2012-08-14 15:04:19 +02001/*
Stefan Roese9071a442013-04-25 23:20:23 +00002 * Copyright 2012-2013 Stefan Roese <sr@denx.de>
Stefan Roesee1b8d0b2012-08-14 15:04:19 +02003 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Stefan Roesee1b8d0b2012-08-14 15:04:19 +02005 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
9
10/*
11 * High Level Configuration Options
12 * (easy to change)
13 */
14
15#define CONFIG_MPC5200
Masahiro Yamada608ed2c2014-01-16 11:03:07 +090016#define CONFIG_A3M071 /* A3M071 board */
Stefan Roesef22d2962014-11-19 09:37:47 +010017#define CONFIG_DISPLAY_BOARDINFO
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020018
19#define CONFIG_SYS_TEXT_BASE 0x01000000 /* boot low for 32 MiB boards */
20
Stefan Roese512da3b2013-02-07 02:10:11 +000021#define CONFIG_SPL_TARGET "u-boot-img.bin"
22
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020023#define CONFIG_SYS_MPC5XXX_CLKIN 33000000 /* ... running at 33MHz */
24
25#define CONFIG_MISC_INIT_R
26#define CONFIG_SYS_LOWBOOT /* Enable lowboot */
27
Stefan Roese512da3b2013-02-07 02:10:11 +000028#ifdef CONFIG_A4M2K
29#define CONFIG_HOSTNAME a4m2k
30#else
31#define CONFIG_HOSTNAME a3m071
32#endif
33
Stefan Roese5c1617b2013-06-22 16:16:25 +020034#define CONFIG_BOOTCOUNT_LIMIT
35
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020036/*
37 * Serial console configuration
38 */
39#define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */
40#define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */
41#define CONFIG_SYS_BAUDRATE_TABLE \
42 { 9600, 19200, 38400, 57600, 115200, 230400 }
43
44/*
45 * Command line configuration.
46 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020047#define CONFIG_CMD_BSP
48#define CONFIG_CMD_CACHE
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020049#define CONFIG_CMD_MII
50#define CONFIG_CMD_REGINFO
Stefan Roese9071a442013-04-25 23:20:23 +000051#define CONFIG_CMD_DHCP
52#define CONFIG_BOOTP_SEND_HOSTNAME
53#define CONFIG_BOOTP_SERVERIP
54#define CONFIG_BOOTP_MAY_FAIL
55#define CONFIG_BOOTP_BOOTPATH
56#define CONFIG_BOOTP_GATEWAY
57#define CONFIG_BOOTP_SERVERIP
58#define CONFIG_NET_RETRY_COUNT 3
59#define CONFIG_CMD_LINK_LOCAL
60#define CONFIG_NETCONSOLE
61#define CONFIG_SYS_CONSOLE_IS_IN_ENV
62#define CONFIG_CMD_PING
63#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
64#define CONFIG_MTD_PARTITIONS /* needed for UBI */
65#define CONFIG_FLASH_CFI_MTD
66#define MTDIDS_DEFAULT "nor0=fc000000.flash"
67#define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \
Stefan Roese5c1617b2013-06-22 16:16:25 +020068 "128k(env1)," \
69 "128k(env2)," \
Stefan Roese9071a442013-04-25 23:20:23 +000070 "128k(hwinfo)," \
71 "1M(nvramsim)," \
72 "128k(dtb)," \
73 "5M(kernel)," \
74 "128k(sysinfo)," \
75 "7552k(root)," \
76 "4M(app)," \
Stefan Roese5c1617b2013-06-22 16:16:25 +020077 "5376k(data)," \
78 "8M(install)"
79
Stefan Roese9071a442013-04-25 23:20:23 +000080#define CONFIG_LZO /* needed for UBI */
81#define CONFIG_RBTREE /* needed for UBI */
82#define CONFIG_CMD_MTDPARTS
83#define CONFIG_CMD_UBI
84#define CONFIG_CMD_UBIFS
85#define CONFIG_FIT
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020086
87/*
88 * IPB Bus clocking configuration.
89 */
90#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */
91/* define for 66MHz speed - undef for 33MHz PCI clock speed */
Stefan Roese512da3b2013-02-07 02:10:11 +000092#ifdef CONFIG_A4M2K
93#define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
94#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020095#undef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
Stefan Roese512da3b2013-02-07 02:10:11 +000096#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020097
98/* pass open firmware flat tree */
99#define CONFIG_OF_LIBFDT
100#define CONFIG_OF_BOARD_SETUP
101
102/* maximum size of the flat tree (8K) */
103#define OF_FLAT_TREE_MAX_SIZE 8192
104
105#define OF_CPU "PowerPC,5200@0"
106#define OF_SOC "soc5200@f0000000"
107#define OF_TBCLK (bd->bi_busfreq / 4)
108#define OF_STDOUT_PATH "/soc5200@f0000000/serial@2000"
109
110/*
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200111 * NOR flash configuration
112 */
113#define CONFIG_SYS_FLASH_BASE 0xfc000000
Stefan Roese512da3b2013-02-07 02:10:11 +0000114#define CONFIG_SYS_FLASH_SIZE 0x02000000
Stefan Roese9071a442013-04-25 23:20:23 +0000115#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x80000)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200116
117#define CONFIG_SYS_MAX_FLASH_BANKS 1
118#define CONFIG_SYS_MAX_FLASH_SECT 256
119#define CONFIG_SYS_FLASH_ERASE_TOUT 240000
120#define CONFIG_SYS_FLASH_WRITE_TOUT 500
121#define CONFIG_SYS_FLASH_LOCK_TOUT 5
122#define CONFIG_SYS_FLASH_UNLOCK_TOUT 10000
123#define CONFIG_SYS_FLASH_PROTECTION
124#define CONFIG_FLASH_CFI_DRIVER
125#define CONFIG_SYS_FLASH_CFI
126#define CONFIG_SYS_FLASH_EMPTY_INFO
127#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
Stefan Roeseeba076f2013-04-04 03:55:42 +0000128#define CONFIG_FLASH_VERIFY
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200129
130/*
131 * Environment settings
132 */
133#define CONFIG_ENV_IS_IN_FLASH
134#define CONFIG_ENV_SIZE 0x10000
135#define CONFIG_ENV_SECT_SIZE 0x20000
136#define CONFIG_ENV_OVERWRITE
Stefan Roese9071a442013-04-25 23:20:23 +0000137#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
138#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200139
140/*
141 * Memory map
142 */
143#define CONFIG_SYS_MBAR 0xf0000000
144#define CONFIG_SYS_SDRAM_BASE 0x00000000
145#define CONFIG_SYS_DEFAULT_MBAR 0x80000000
146
147/* Use SRAM until RAM will be available */
148#define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM
149#define CONFIG_SYS_INIT_RAM_END MPC5XXX_SRAM_SIZE
150
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200151#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - \
Stefan Roese1c419762013-04-25 23:10:02 +0000152 GENERATED_GBL_DATA_SIZE)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200153#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
154
155#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
156
Stefan Roese9071a442013-04-25 23:20:23 +0000157#define CONFIG_SYS_MONITOR_LEN (512 << 10)
158#define CONFIG_SYS_MALLOC_LEN (4 << 20)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200159#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
160
161/*
162 * Ethernet configuration
163 */
164#define CONFIG_MPC5xxx_FEC
165#define CONFIG_MPC5xxx_FEC_MII100
Stefan Roese512da3b2013-02-07 02:10:11 +0000166#ifdef CONFIG_A4M2K
167#define CONFIG_PHY_ADDR 0x01
168#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200169#define CONFIG_PHY_ADDR 0x00
Stefan Roese512da3b2013-02-07 02:10:11 +0000170#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200171
172/*
173 * GPIO configuration
174 */
175
176/*
177 * GPIO-config depends on failsave-level
178 * failsave 0 means just MPX-config, no digiboard, no fpga
179 * 1 means digiboard ok
180 * 2 means fpga ok
181 */
182
Stefan Roese512da3b2013-02-07 02:10:11 +0000183#ifdef CONFIG_A4M2K
Stefan Roese9071a442013-04-25 23:20:23 +0000184#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C805
Stefan Roese512da3b2013-02-07 02:10:11 +0000185#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200186/* for failsave-level 0 - full failsave */
187#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C005
188/* for failsave-level 1 - only digiboard ok */
Stefan Roese9071a442013-04-25 23:20:23 +0000189#define CONFIG_SYS_GPS_PORT_CONFIG_1 0x1005C065
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200190/* for failsave-level 2 - all ok */
Stefan Roese9071a442013-04-25 23:20:23 +0000191#define CONFIG_SYS_GPS_PORT_CONFIG_2 0x1005C065
Stefan Roese512da3b2013-02-07 02:10:11 +0000192#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200193
Stefan Roese223008d2013-02-07 02:10:28 +0000194#define CONFIG_WDOG_GPIO_PIN GPIO_WKUP_7
195#if defined(CONFIG_A4M2K) && !defined(CONFIG_SPL_BUILD)
196#define CONFIG_HW_WATCHDOG /* Use external HW-Watchdog */
197#endif
198
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200199/*
200 * Configuration matrix
Stefan Roese9071a442013-04-25 23:20:23 +0000201 * MSB LSB
Stefan Roese512da3b2013-02-07 02:10:11 +0000202 * failsave 0 0x1005C005 00010000000001011100000000000101 ( full failsave )
Stefan Roese9071a442013-04-25 23:20:23 +0000203 * failsave 1 0x1005C065 00010000000001011100000001100101 ( digib.-ver ok )
204 * failsave 2 0x1005C065 00010000000001011100000001100101 ( all ok )
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200205 * || ||| || | ||| | | | |
206 * || ||| || | ||| | | | | bit rev name
207 * ++-+++-++--+---+++-+---+---+---+- 0 31 CS1
208 * +-+++-++--+---+++-+---+---+---+- 1 30 LPTZ
209 * ||| || | ||| | | | | 2 29 ALTs
210 * +++-++--+---+++-+---+---+---+- 3 28 ALTs
211 * ++-++--+---+++-+---+---+---+- 4 27 CS7
212 * +-++--+---+++-+---+---+---+- 5 26 CS6
213 * || | ||| | | | | 6 25 ATA
214 * ++--+---+++-+---+---+---+- 7 24 ATA
215 * +--+---+++-+---+---+---+- 8 23 IR_USB_CLK
216 * | ||| | | | | 9 22 IRDA
217 * | ||| | | | | 10 21 IRDA
218 * +---+++-+---+---+---+- 11 20 IRDA
219 * ||| | | | | 12 19 Ether
220 * ||| | | | | 13 18 Ether
221 * ||| | | | | 14 17 Ether
222 * +++-+---+---+---+- 15 16 Ether
223 * ++-+---+---+---+- 16 15 PCI_DIS
224 * +-+---+---+---+- 17 14 USB_SE
225 * | | | | 18 13 USB
226 * +---+---+---+- 19 12 USB
227 * | | | 20 11 PSC3
228 * | | | 21 10 PSC3
229 * | | | 22 9 PSC3
230 * +---+---+- 23 8 PSC3
231 * | | 24 7 -
232 * | | 25 6 PSC2
233 * | | 26 5 PSC2
234 * +---+- 27 4 PSC2
235 * | 28 3 -
236 * | 29 2 PSC1
237 * | 30 1 PSC1
238 * +- 31 0 PSC1
239 */
240
241
242/*
243 * Miscellaneous configurable options
244 */
245#define CONFIG_SYS_LONGHELP
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200246
247#define CONFIG_CMDLINE_EDITING
248#define CONFIG_SYS_HUSH_PARSER
249#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
250
251#if defined(CONFIG_CMD_KGDB)
252#define CONFIG_SYS_CBSIZE 1024
253#else
254#define CONFIG_SYS_CBSIZE 256
255#endif
256#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
257#define CONFIG_SYS_MAXARGS 16
258#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
259
260#define CONFIG_SYS_MEMTEST_START 0x00100000
261#define CONFIG_SYS_MEMTEST_END 0x00f00000
262
263#define CONFIG_SYS_LOAD_ADDR 0x00100000
264
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200265#define CONFIG_LOOPW
266#define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup*/
267
268/*
269 * Various low-level settings
270 */
271#define CONFIG_SYS_HID0_INIT (HID0_ICE | HID0_ICFI)
272#define CONFIG_SYS_HID0_FINAL HID0_ICE
273
274#define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE
275#define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
276#define CONFIG_SYS_CS0_START CONFIG_SYS_FLASH_BASE
277#define CONFIG_SYS_CS0_SIZE CONFIG_SYS_FLASH_SIZE
Stefan Roese512da3b2013-02-07 02:10:11 +0000278
279#ifdef CONFIG_A4M2K
280/* external MRAM */
281#define CONFIG_SYS_CS1_START 0xf1000000
282#define CONFIG_SYS_CS1_SIZE (512 << 10) /* 512KiB MRAM */
283#endif
284
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200285#define CONFIG_SYS_CS2_START 0xe0000000
286#define CONFIG_SYS_CS2_SIZE 0x00100000
287
Stefan Roese512da3b2013-02-07 02:10:11 +0000288/* FPGA slave io (512kiB / 1MiB) - see ticket #66 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200289#define CONFIG_SYS_CS3_START 0xE9000000
Stefan Roese512da3b2013-02-07 02:10:11 +0000290#ifdef CONFIG_A4M2K
291#define CONFIG_SYS_CS3_SIZE 0x00100000
292#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200293#define CONFIG_SYS_CS3_SIZE 0x00080000
Stefan Roese512da3b2013-02-07 02:10:11 +0000294#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200295/* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */
296#define CONFIG_SYS_CS3_CFG 0x0032B900
297
Stefan Roese512da3b2013-02-07 02:10:11 +0000298#ifndef CONFIG_A4M2K
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200299/* Diagnosis Interface - see ticket #63 */
300#define CONFIG_SYS_CS4_START 0xEA000000
301#define CONFIG_SYS_CS4_SIZE 0x00000001
302/* 00000000 00000010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0002B900 */
303#define CONFIG_SYS_CS4_CFG 0x0002B900
Stefan Roese512da3b2013-02-07 02:10:11 +0000304#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200305
Stefan Roese512da3b2013-02-07 02:10:11 +0000306/* FPGA master io (64kiB / 1MiB) - see ticket #66 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200307#define CONFIG_SYS_CS5_START 0xE8000000
Stefan Roese512da3b2013-02-07 02:10:11 +0000308#ifdef CONFIG_A4M2K
309#define CONFIG_SYS_CS5_SIZE 0x00100000
310#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200311#define CONFIG_SYS_CS5_SIZE 0x00010000
Stefan Roese512da3b2013-02-07 02:10:11 +0000312#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200313/* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */
314#define CONFIG_SYS_CS5_CFG 0x0032B900
315
316#ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 /* for pci_clk = 66 MHz */
317#define CONFIG_SYS_BOOTCS_CFG 0x0006F900
Stefan Roese512da3b2013-02-07 02:10:11 +0000318#define CONFIG_SYS_CS1_CFG 0x0008FD00
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200319#define CONFIG_SYS_CS2_CFG 0x0006F90C
320#else /* for pci_clk = 33 MHz */
321#define CONFIG_SYS_BOOTCS_CFG 0x0002F900
322#define CONFIG_SYS_CS1_CFG 0x0001FB00
323#define CONFIG_SYS_CS2_CFG 0x0002F90C
324#endif
325
326#define CONFIG_SYS_CS_BURST 0x00000000
327/* set DC for FPGA CS5 and CS3 to 0 - see ticket #66 */
328/* R 7 R 6 R 5 R 4 R 3 R 2 R 1 R 0 */
329/* 00 11 00 11 00 00 00 11 00 00 00 00 00 00 00 00 */
330#define CONFIG_SYS_CS_DEADCYCLE 0x33030000
331
332#define CONFIG_SYS_RESET_ADDRESS 0xff000000
333
334/*
335 * Environment Configuration
336 */
337
Stefan Roese9071a442013-04-25 23:20:23 +0000338#define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200339#undef CONFIG_BOOTARGS
340#define CONFIG_ZERO_BOOTDELAY_CHECK
341
Stefan Roese9071a442013-04-25 23:20:23 +0000342#define CONFIG_SYS_AUTOLOAD "n"
343
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200344#define CONFIG_PREBOOT "echo;" \
345 "echo Type \"run flash_mtd\" to boot from flash with mtd filesystem;" \
346 "echo Type \"run net_nfs\" to boot from tftp with nfs filesystem;" \
347 "echo"
348
349#undef CONFIG_BOOTARGS
350
Stefan Roese9071a442013-04-25 23:20:23 +0000351#define CONFIG_SYS_OS_BASE 0xfc200000
352#define CONFIG_SYS_FDT_BASE 0xfc1e0000
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200353
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200354#define CONFIG_EXTRA_ENV_SETTINGS \
355 "netdev=eth0\0" \
356 "verify=no\0" \
Stefan Roese512da3b2013-02-07 02:10:11 +0000357 "loadaddr=200000\0" \
358 "kernel_addr=" __stringify(CONFIG_SYS_OS_BASE) "\0" \
359 "kernel_addr_r=1000000\0" \
360 "fdt_addr=" __stringify(CONFIG_SYS_FDT_BASE) "\0" \
361 "fdt_addr_r=1800000\0" \
362 "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \
363 "fdtfile=" __stringify(CONFIG_HOSTNAME) "/" \
364 __stringify(CONFIG_HOSTNAME) ".dtb\0" \
365 "rootpath=/opt/eldk-5.2.1/powerpc/" \
366 "core-image-minimal-mtdutils-dropbear-generic\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200367 "consoledev=ttyPSC0\0" \
368 "nfsargs=setenv bootargs root=/dev/nfs rw " \
369 "nfsroot=${serverip}:${rootpath}\0" \
370 "ramargs=setenv bootargs root=/dev/ram rw\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200371 "mtdargs=setenv bootargs root=/dev/mtdblock8 " \
Stefan Roese9071a442013-04-25 23:20:23 +0000372 "rootfstype=squashfs,jffs2\0" \
373 "addhost=setenv bootargs ${bootargs} " \
374 "hostname=${hostname}\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200375 "addip=setenv bootargs ${bootargs} " \
376 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
377 ":${hostname}:${netdev}:off panic=1\0" \
378 "addtty=setenv bootargs ${bootargs} " \
379 "console=${consoledev},${baudrate}\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200380 "flash_nfs=run nfsargs addip addtty addmtd addhost;" \
Stefan Roese9071a442013-04-25 23:20:23 +0000381 "bootm ${kernel_addr} - ${fdt_addr}\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200382 "flash_mtd=run mtdargs addip addtty addmtd addhost;" \
Stefan Roese9071a442013-04-25 23:20:23 +0000383 "bootm ${kernel_addr} - ${fdt_addr}\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200384 "flash_self=run ramargs addip addtty addmtd addhost;" \
Stefan Roese512da3b2013-02-07 02:10:11 +0000385 "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
386 "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \
387 "tftp ${fdt_addr_r} ${fdtfile};" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200388 "run nfsargs addip addtty addmtd addhost;" \
Stefan Roese512da3b2013-02-07 02:10:11 +0000389 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
390 "load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \
391 "/u-boot-img.bin\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200392 "update=protect off fc000000 fc07ffff;" \
Stefan Roese9071a442013-04-25 23:20:23 +0000393 "era fc000000 fc07ffff;" \
394 "cp.b ${loadaddr} fc000000 ${filesize}\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200395 "upd=run load;run update\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200396 "upd_fdt=tftp 1800000 a3m071/a3m071.dtb;" \
397 "run mtdargs addip addtty addmtd addhost;" \
398 "fdt addr 1800000;fdt boardsetup;fdt chosen;" \
399 "erase fc1e0000 fc1fffff;cp.b 1800000 fc1e0000 20000" \
400 "upd_kernel=tftp 1000000 a3m071/uImage-uncompressed;" \
401 "erase fc200000 fc6fffff;" \
402 "cp.b 1000000 fc200000 ${filesize}" \
403 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
404 "mtdids=" MTDIDS_DEFAULT "\0" \
405 "mtdparts=" MTDPARTS_DEFAULT "\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200406 ""
407
408#define CONFIG_BOOTCOMMAND "run flash_mtd"
409
410/*
411 * SPL related defines
412 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200413#define CONFIG_SPL_FRAMEWORK
Stefan Roese512da3b2013-02-07 02:10:11 +0000414#define CONFIG_SPL_BOARD_INIT
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200415#define CONFIG_SPL_NOR_SUPPORT
416#define CONFIG_SPL_TEXT_BASE 0xfc000000
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200417#define CONFIG_SPL_LIBCOMMON_SUPPORT /* image.c */
418#define CONFIG_SPL_LIBGENERIC_SUPPORT /* string.c */
419#define CONFIG_SPL_SERIAL_SUPPORT
420
421/* Place BSS for SPL near end of SDRAM */
422#define CONFIG_SPL_BSS_START_ADDR ((128 - 1) << 20)
423#define CONFIG_SPL_BSS_MAX_SIZE (64 << 10)
424
425#define CONFIG_SPL_OS_BOOT
Ying Zhang602f7d32013-05-20 14:07:25 +0800426#define CONFIG_SPL_ENV_SUPPORT
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200427/* Place patched DT blob (fdt) at this address */
428#define CONFIG_SYS_SPL_ARGS_ADDR 0x01800000
429
430/* Settings for real U-Boot to be loaded from NOR flash */
431#ifndef __ASSEMBLY__
432extern char __spl_flash_end[];
433#endif
434#define CONFIG_SYS_UBOOT_BASE __spl_flash_end
435#define CONFIG_SYS_SPL_MAX_LEN (32 << 10)
436#define CONFIG_SYS_UBOOT_START 0x1000100
437
438#endif /* __CONFIG_H */