blob: cc211c5e203e9f8b8834874e1457320b30db6b9b [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
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020048#define CONFIG_CMD_REGINFO
Stefan Roese9071a442013-04-25 23:20:23 +000049#define CONFIG_BOOTP_SEND_HOSTNAME
50#define CONFIG_BOOTP_SERVERIP
51#define CONFIG_BOOTP_MAY_FAIL
52#define CONFIG_BOOTP_BOOTPATH
53#define CONFIG_BOOTP_GATEWAY
54#define CONFIG_BOOTP_SERVERIP
55#define CONFIG_NET_RETRY_COUNT 3
Stefan Roese9071a442013-04-25 23:20:23 +000056#define CONFIG_NETCONSOLE
57#define CONFIG_SYS_CONSOLE_IS_IN_ENV
Stefan Roese9071a442013-04-25 23:20:23 +000058#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
59#define CONFIG_MTD_PARTITIONS /* needed for UBI */
60#define CONFIG_FLASH_CFI_MTD
61#define MTDIDS_DEFAULT "nor0=fc000000.flash"
62#define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \
Stefan Roese5c1617b2013-06-22 16:16:25 +020063 "128k(env1)," \
64 "128k(env2)," \
Stefan Roese9071a442013-04-25 23:20:23 +000065 "128k(hwinfo)," \
66 "1M(nvramsim)," \
67 "128k(dtb)," \
68 "5M(kernel)," \
69 "128k(sysinfo)," \
70 "7552k(root)," \
71 "4M(app)," \
Stefan Roese5c1617b2013-06-22 16:16:25 +020072 "5376k(data)," \
73 "8M(install)"
74
Stefan Roese9071a442013-04-25 23:20:23 +000075#define CONFIG_LZO /* needed for UBI */
76#define CONFIG_RBTREE /* needed for UBI */
77#define CONFIG_CMD_MTDPARTS
Stefan Roese9071a442013-04-25 23:20:23 +000078#define CONFIG_CMD_UBIFS
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020079
80/*
81 * IPB Bus clocking configuration.
82 */
83#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */
84/* define for 66MHz speed - undef for 33MHz PCI clock speed */
Stefan Roese512da3b2013-02-07 02:10:11 +000085#ifdef CONFIG_A4M2K
86#define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
87#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020088#undef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
Stefan Roese512da3b2013-02-07 02:10:11 +000089#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020090
Stefan Roesee1b8d0b2012-08-14 15:04:19 +020091/* maximum size of the flat tree (8K) */
92#define OF_FLAT_TREE_MAX_SIZE 8192
93
94#define OF_CPU "PowerPC,5200@0"
95#define OF_SOC "soc5200@f0000000"
96#define OF_TBCLK (bd->bi_busfreq / 4)
97#define OF_STDOUT_PATH "/soc5200@f0000000/serial@2000"
98
99/*
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200100 * NOR flash configuration
101 */
102#define CONFIG_SYS_FLASH_BASE 0xfc000000
Stefan Roese512da3b2013-02-07 02:10:11 +0000103#define CONFIG_SYS_FLASH_SIZE 0x02000000
Stefan Roese9071a442013-04-25 23:20:23 +0000104#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x80000)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200105
106#define CONFIG_SYS_MAX_FLASH_BANKS 1
107#define CONFIG_SYS_MAX_FLASH_SECT 256
108#define CONFIG_SYS_FLASH_ERASE_TOUT 240000
109#define CONFIG_SYS_FLASH_WRITE_TOUT 500
110#define CONFIG_SYS_FLASH_LOCK_TOUT 5
111#define CONFIG_SYS_FLASH_UNLOCK_TOUT 10000
112#define CONFIG_SYS_FLASH_PROTECTION
113#define CONFIG_FLASH_CFI_DRIVER
114#define CONFIG_SYS_FLASH_CFI
115#define CONFIG_SYS_FLASH_EMPTY_INFO
116#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
Stefan Roeseeba076f2013-04-04 03:55:42 +0000117#define CONFIG_FLASH_VERIFY
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200118
119/*
120 * Environment settings
121 */
122#define CONFIG_ENV_IS_IN_FLASH
123#define CONFIG_ENV_SIZE 0x10000
124#define CONFIG_ENV_SECT_SIZE 0x20000
125#define CONFIG_ENV_OVERWRITE
Stefan Roese9071a442013-04-25 23:20:23 +0000126#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
127#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200128
129/*
130 * Memory map
131 */
132#define CONFIG_SYS_MBAR 0xf0000000
133#define CONFIG_SYS_SDRAM_BASE 0x00000000
134#define CONFIG_SYS_DEFAULT_MBAR 0x80000000
135
136/* Use SRAM until RAM will be available */
137#define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM
York Sun515fbb42016-04-06 13:22:10 -0700138#define CONFIG_SYS_INIT_RAM_SIZE MPC5XXX_SRAM_SIZE
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200139
York Sun515fbb42016-04-06 13:22:10 -0700140#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
Stefan Roese1c419762013-04-25 23:10:02 +0000141 GENERATED_GBL_DATA_SIZE)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200142#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
143
144#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
145
Stefan Roese9071a442013-04-25 23:20:23 +0000146#define CONFIG_SYS_MONITOR_LEN (512 << 10)
147#define CONFIG_SYS_MALLOC_LEN (4 << 20)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200148#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
149
150/*
151 * Ethernet configuration
152 */
153#define CONFIG_MPC5xxx_FEC
154#define CONFIG_MPC5xxx_FEC_MII100
Stefan Roese512da3b2013-02-07 02:10:11 +0000155#ifdef CONFIG_A4M2K
156#define CONFIG_PHY_ADDR 0x01
157#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200158#define CONFIG_PHY_ADDR 0x00
Stefan Roese512da3b2013-02-07 02:10:11 +0000159#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200160
161/*
162 * GPIO configuration
163 */
164
165/*
166 * GPIO-config depends on failsave-level
167 * failsave 0 means just MPX-config, no digiboard, no fpga
168 * 1 means digiboard ok
169 * 2 means fpga ok
170 */
171
Stefan Roese512da3b2013-02-07 02:10:11 +0000172#ifdef CONFIG_A4M2K
Stefan Roese9071a442013-04-25 23:20:23 +0000173#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C805
Stefan Roese512da3b2013-02-07 02:10:11 +0000174#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200175/* for failsave-level 0 - full failsave */
176#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C005
177/* for failsave-level 1 - only digiboard ok */
Stefan Roese9071a442013-04-25 23:20:23 +0000178#define CONFIG_SYS_GPS_PORT_CONFIG_1 0x1005C065
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200179/* for failsave-level 2 - all ok */
Stefan Roese9071a442013-04-25 23:20:23 +0000180#define CONFIG_SYS_GPS_PORT_CONFIG_2 0x1005C065
Stefan Roese512da3b2013-02-07 02:10:11 +0000181#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200182
Stefan Roese223008d2013-02-07 02:10:28 +0000183#define CONFIG_WDOG_GPIO_PIN GPIO_WKUP_7
184#if defined(CONFIG_A4M2K) && !defined(CONFIG_SPL_BUILD)
185#define CONFIG_HW_WATCHDOG /* Use external HW-Watchdog */
186#endif
187
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200188/*
189 * Configuration matrix
Stefan Roese9071a442013-04-25 23:20:23 +0000190 * MSB LSB
Stefan Roese512da3b2013-02-07 02:10:11 +0000191 * failsave 0 0x1005C005 00010000000001011100000000000101 ( full failsave )
Stefan Roese9071a442013-04-25 23:20:23 +0000192 * failsave 1 0x1005C065 00010000000001011100000001100101 ( digib.-ver ok )
193 * failsave 2 0x1005C065 00010000000001011100000001100101 ( all ok )
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200194 * || ||| || | ||| | | | |
195 * || ||| || | ||| | | | | bit rev name
196 * ++-+++-++--+---+++-+---+---+---+- 0 31 CS1
197 * +-+++-++--+---+++-+---+---+---+- 1 30 LPTZ
198 * ||| || | ||| | | | | 2 29 ALTs
199 * +++-++--+---+++-+---+---+---+- 3 28 ALTs
200 * ++-++--+---+++-+---+---+---+- 4 27 CS7
201 * +-++--+---+++-+---+---+---+- 5 26 CS6
202 * || | ||| | | | | 6 25 ATA
203 * ++--+---+++-+---+---+---+- 7 24 ATA
204 * +--+---+++-+---+---+---+- 8 23 IR_USB_CLK
205 * | ||| | | | | 9 22 IRDA
206 * | ||| | | | | 10 21 IRDA
207 * +---+++-+---+---+---+- 11 20 IRDA
208 * ||| | | | | 12 19 Ether
209 * ||| | | | | 13 18 Ether
210 * ||| | | | | 14 17 Ether
211 * +++-+---+---+---+- 15 16 Ether
212 * ++-+---+---+---+- 16 15 PCI_DIS
213 * +-+---+---+---+- 17 14 USB_SE
214 * | | | | 18 13 USB
215 * +---+---+---+- 19 12 USB
216 * | | | 20 11 PSC3
217 * | | | 21 10 PSC3
218 * | | | 22 9 PSC3
219 * +---+---+- 23 8 PSC3
220 * | | 24 7 -
221 * | | 25 6 PSC2
222 * | | 26 5 PSC2
223 * +---+- 27 4 PSC2
224 * | 28 3 -
225 * | 29 2 PSC1
226 * | 30 1 PSC1
227 * +- 31 0 PSC1
228 */
229
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200230/*
231 * Miscellaneous configurable options
232 */
233#define CONFIG_SYS_LONGHELP
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200234
235#define CONFIG_CMDLINE_EDITING
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200236
237#if defined(CONFIG_CMD_KGDB)
238#define CONFIG_SYS_CBSIZE 1024
239#else
240#define CONFIG_SYS_CBSIZE 256
241#endif
242#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
243#define CONFIG_SYS_MAXARGS 16
244#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
245
246#define CONFIG_SYS_MEMTEST_START 0x00100000
247#define CONFIG_SYS_MEMTEST_END 0x00f00000
248
249#define CONFIG_SYS_LOAD_ADDR 0x00100000
250
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200251#define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup*/
252
253/*
254 * Various low-level settings
255 */
256#define CONFIG_SYS_HID0_INIT (HID0_ICE | HID0_ICFI)
257#define CONFIG_SYS_HID0_FINAL HID0_ICE
258
259#define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE
260#define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
261#define CONFIG_SYS_CS0_START CONFIG_SYS_FLASH_BASE
262#define CONFIG_SYS_CS0_SIZE CONFIG_SYS_FLASH_SIZE
Stefan Roese512da3b2013-02-07 02:10:11 +0000263
264#ifdef CONFIG_A4M2K
265/* external MRAM */
266#define CONFIG_SYS_CS1_START 0xf1000000
267#define CONFIG_SYS_CS1_SIZE (512 << 10) /* 512KiB MRAM */
268#endif
269
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200270#define CONFIG_SYS_CS2_START 0xe0000000
271#define CONFIG_SYS_CS2_SIZE 0x00100000
272
Stefan Roese512da3b2013-02-07 02:10:11 +0000273/* FPGA slave io (512kiB / 1MiB) - see ticket #66 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200274#define CONFIG_SYS_CS3_START 0xE9000000
Stefan Roese512da3b2013-02-07 02:10:11 +0000275#ifdef CONFIG_A4M2K
276#define CONFIG_SYS_CS3_SIZE 0x00100000
277#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200278#define CONFIG_SYS_CS3_SIZE 0x00080000
Stefan Roese512da3b2013-02-07 02:10:11 +0000279#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200280/* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */
281#define CONFIG_SYS_CS3_CFG 0x0032B900
282
Stefan Roese512da3b2013-02-07 02:10:11 +0000283#ifndef CONFIG_A4M2K
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200284/* Diagnosis Interface - see ticket #63 */
285#define CONFIG_SYS_CS4_START 0xEA000000
286#define CONFIG_SYS_CS4_SIZE 0x00000001
287/* 00000000 00000010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0002B900 */
288#define CONFIG_SYS_CS4_CFG 0x0002B900
Stefan Roese512da3b2013-02-07 02:10:11 +0000289#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200290
Stefan Roese512da3b2013-02-07 02:10:11 +0000291/* FPGA master io (64kiB / 1MiB) - see ticket #66 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200292#define CONFIG_SYS_CS5_START 0xE8000000
Stefan Roese512da3b2013-02-07 02:10:11 +0000293#ifdef CONFIG_A4M2K
294#define CONFIG_SYS_CS5_SIZE 0x00100000
295#else
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200296#define CONFIG_SYS_CS5_SIZE 0x00010000
Stefan Roese512da3b2013-02-07 02:10:11 +0000297#endif
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200298/* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */
299#define CONFIG_SYS_CS5_CFG 0x0032B900
300
301#ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 /* for pci_clk = 66 MHz */
302#define CONFIG_SYS_BOOTCS_CFG 0x0006F900
Stefan Roese512da3b2013-02-07 02:10:11 +0000303#define CONFIG_SYS_CS1_CFG 0x0008FD00
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200304#define CONFIG_SYS_CS2_CFG 0x0006F90C
305#else /* for pci_clk = 33 MHz */
306#define CONFIG_SYS_BOOTCS_CFG 0x0002F900
307#define CONFIG_SYS_CS1_CFG 0x0001FB00
308#define CONFIG_SYS_CS2_CFG 0x0002F90C
309#endif
310
311#define CONFIG_SYS_CS_BURST 0x00000000
312/* set DC for FPGA CS5 and CS3 to 0 - see ticket #66 */
313/* R 7 R 6 R 5 R 4 R 3 R 2 R 1 R 0 */
314/* 00 11 00 11 00 00 00 11 00 00 00 00 00 00 00 00 */
315#define CONFIG_SYS_CS_DEADCYCLE 0x33030000
316
317#define CONFIG_SYS_RESET_ADDRESS 0xff000000
318
319/*
320 * Environment Configuration
321 */
322
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200323#undef CONFIG_BOOTARGS
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200324
Stefan Roese9071a442013-04-25 23:20:23 +0000325#define CONFIG_SYS_AUTOLOAD "n"
326
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200327#define CONFIG_PREBOOT "echo;" \
328 "echo Type \"run flash_mtd\" to boot from flash with mtd filesystem;" \
329 "echo Type \"run net_nfs\" to boot from tftp with nfs filesystem;" \
330 "echo"
331
332#undef CONFIG_BOOTARGS
333
Stefan Roese9071a442013-04-25 23:20:23 +0000334#define CONFIG_SYS_OS_BASE 0xfc200000
335#define CONFIG_SYS_FDT_BASE 0xfc1e0000
Mike Looijmansde627902016-07-26 07:34:07 +0200336#define CONFIG_SYS_FDT_SIZE (16<<10)
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200337
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200338#define CONFIG_EXTRA_ENV_SETTINGS \
339 "netdev=eth0\0" \
340 "verify=no\0" \
Stefan Roese512da3b2013-02-07 02:10:11 +0000341 "loadaddr=200000\0" \
342 "kernel_addr=" __stringify(CONFIG_SYS_OS_BASE) "\0" \
343 "kernel_addr_r=1000000\0" \
344 "fdt_addr=" __stringify(CONFIG_SYS_FDT_BASE) "\0" \
345 "fdt_addr_r=1800000\0" \
346 "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \
347 "fdtfile=" __stringify(CONFIG_HOSTNAME) "/" \
348 __stringify(CONFIG_HOSTNAME) ".dtb\0" \
349 "rootpath=/opt/eldk-5.2.1/powerpc/" \
350 "core-image-minimal-mtdutils-dropbear-generic\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200351 "consoledev=ttyPSC0\0" \
352 "nfsargs=setenv bootargs root=/dev/nfs rw " \
353 "nfsroot=${serverip}:${rootpath}\0" \
354 "ramargs=setenv bootargs root=/dev/ram rw\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200355 "mtdargs=setenv bootargs root=/dev/mtdblock8 " \
Stefan Roese9071a442013-04-25 23:20:23 +0000356 "rootfstype=squashfs,jffs2\0" \
357 "addhost=setenv bootargs ${bootargs} " \
358 "hostname=${hostname}\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200359 "addip=setenv bootargs ${bootargs} " \
360 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
361 ":${hostname}:${netdev}:off panic=1\0" \
362 "addtty=setenv bootargs ${bootargs} " \
363 "console=${consoledev},${baudrate}\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200364 "flash_nfs=run nfsargs addip addtty addmtd addhost;" \
Stefan Roese9071a442013-04-25 23:20:23 +0000365 "bootm ${kernel_addr} - ${fdt_addr}\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200366 "flash_mtd=run mtdargs addip addtty addmtd addhost;" \
Stefan Roese9071a442013-04-25 23:20:23 +0000367 "bootm ${kernel_addr} - ${fdt_addr}\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200368 "flash_self=run ramargs addip addtty addmtd addhost;" \
Stefan Roese512da3b2013-02-07 02:10:11 +0000369 "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
370 "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \
371 "tftp ${fdt_addr_r} ${fdtfile};" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200372 "run nfsargs addip addtty addmtd addhost;" \
Stefan Roese512da3b2013-02-07 02:10:11 +0000373 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
374 "load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \
375 "/u-boot-img.bin\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200376 "update=protect off fc000000 fc07ffff;" \
Stefan Roese9071a442013-04-25 23:20:23 +0000377 "era fc000000 fc07ffff;" \
378 "cp.b ${loadaddr} fc000000 ${filesize}\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200379 "upd=run load;run update\0" \
Stefan Roese5c1617b2013-06-22 16:16:25 +0200380 "upd_fdt=tftp 1800000 a3m071/a3m071.dtb;" \
381 "run mtdargs addip addtty addmtd addhost;" \
382 "fdt addr 1800000;fdt boardsetup;fdt chosen;" \
383 "erase fc1e0000 fc1fffff;cp.b 1800000 fc1e0000 20000" \
384 "upd_kernel=tftp 1000000 a3m071/uImage-uncompressed;" \
385 "erase fc200000 fc6fffff;" \
386 "cp.b 1000000 fc200000 ${filesize}" \
387 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
388 "mtdids=" MTDIDS_DEFAULT "\0" \
389 "mtdparts=" MTDPARTS_DEFAULT "\0" \
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200390 ""
391
392#define CONFIG_BOOTCOMMAND "run flash_mtd"
393
394/*
395 * SPL related defines
396 */
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200397#define CONFIG_SPL_FRAMEWORK
Stefan Roese512da3b2013-02-07 02:10:11 +0000398#define CONFIG_SPL_BOARD_INIT
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200399#define CONFIG_SPL_TEXT_BASE 0xfc000000
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200400
401/* Place BSS for SPL near end of SDRAM */
402#define CONFIG_SPL_BSS_START_ADDR ((128 - 1) << 20)
403#define CONFIG_SPL_BSS_MAX_SIZE (64 << 10)
404
405#define CONFIG_SPL_OS_BOOT
Stefan Roesee1b8d0b2012-08-14 15:04:19 +0200406/* Place patched DT blob (fdt) at this address */
407#define CONFIG_SYS_SPL_ARGS_ADDR 0x01800000
408
409/* Settings for real U-Boot to be loaded from NOR flash */
410#ifndef __ASSEMBLY__
411extern char __spl_flash_end[];
412#endif
413#define CONFIG_SYS_UBOOT_BASE __spl_flash_end
414#define CONFIG_SYS_SPL_MAX_LEN (32 << 10)
415#define CONFIG_SYS_UBOOT_START 0x1000100
416
417#endif /* __CONFIG_H */