1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2012 Michael Walle
4 * Michael Walle <michael@walle.cc>
11 * General configuration options
14 #include "mv-common.h"
16 /* loading initramfs images without uimage header */
19 * Environment variables configurations
21 #ifdef CONFIG_SPI_FLASH
22 #define CONFIG_SYS_MAX_FLASH_SECT 8
26 * Default environment variables
29 #if defined(CONFIG_LSXHL)
30 #define CONFIG_FDTFILE "kirkwood-lsxhl.dtb"
31 #elif defined(CONFIG_LSCHLV2)
32 #define CONFIG_FDTFILE "kirkwood-lschlv2.dtb"
34 #error "Unsupported board"
37 #define CONFIG_EXTRA_ENV_SETTINGS \
38 "bootsource=legacy\0" \
40 "kernel_addr=0x00800000\0" \
41 "ramdisk_addr=0x01000000\0" \
42 "fdt_addr=0x00ff0000\0" \
43 "bootcmd_legacy=sata init " \
44 "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
45 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
46 "&& bootm ${kernel_addr} ${ramdisk_addr}\0" \
47 "bootcmd_net=bootp ${kernel_addr} vmlinuz " \
48 "&& tftpboot ${ramdisk_addr} initrd.img " \
49 "&& setenv ramdisk_len ${filesize} " \
50 "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " " \
51 "&& bootz ${kernel_addr} " \
52 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
53 "bootcmd_hdd=sata init " \
54 "&& load sata ${hdpart} ${kernel_addr} /vmlinuz " \
55 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.img " \
56 "&& setenv ramdisk_len ${filesize} " \
57 "&& load sata ${hdpart} ${fdt_addr} /dtb " \
58 "&& bootz ${kernel_addr} " \
59 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
60 "bootcmd_usb=usb start " \
61 "&& load usb 0:1 ${kernel_addr} /vmlinuz " \
62 "&& load usb 0:1 ${ramdisk_addr} /initrd.img " \
63 "&& setenv ramdisk_len ${filesize} " \
64 "&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " " \
65 "&& bootz ${kernel_addr} " \
66 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
67 "bootcmd_rescue=run config_nc_dhcp; run nc\0" \
68 "eraseenv=sf probe 0 " \
69 "&& sf erase " __stringify(CONFIG_ENV_OFFSET) \
70 " +" __stringify(CONFIG_ENV_SIZE) "\0" \
71 "config_nc_dhcp=setenv autoload_old ${autoload}; " \
72 "setenv autoload no " \
75 "&& setenv autoload ${autoload_old}; " \
76 "setenv autoload_old\0" \
77 "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \
78 "setenv ncip; setenv gatewayip; setenv ethact; " \
79 "setenv bootfile; setenv dnsip; " \
80 "setenv bootsource legacy; run ser\0" \
81 "restore_env=run standard_env; saveenv; reset\0" \
82 "ser=setenv stdin serial; setenv stdout serial; " \
83 "setenv stderr serial\0" \
84 "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0" \
90 * Ethernet Driver configuration
93 #define CONFIG_MVGBE_PORTS {0, 1} /* enable port 1 only */
94 #define CONFIG_PHY_BASE_ADR 7
95 #endif /* CONFIG_CMD_NET */
97 #endif /* _CONFIG_LSXL_H */