Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2012 Michael Walle |
| 4 | * Michael Walle <michael@walle.cc> |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _CONFIG_LSXL_H |
| 8 | #define _CONFIG_LSXL_H |
| 9 | |
| 10 | /* |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 11 | * General configuration options |
| 12 | */ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 13 | |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 14 | #include "mv-common.h" |
| 15 | |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 16 | /* loading initramfs images without uimage header */ |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 17 | |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 18 | /* |
| 19 | * Environment variables configurations |
| 20 | */ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 21 | |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 22 | /* |
| 23 | * Default environment variables |
| 24 | */ |
Michael Walle | 848fe23 | 2014-04-01 20:09:14 +0200 | [diff] [blame] | 25 | |
| 26 | #if defined(CONFIG_LSXHL) |
| 27 | #define CONFIG_FDTFILE "kirkwood-lsxhl.dtb" |
| 28 | #elif defined(CONFIG_LSCHLV2) |
| 29 | #define CONFIG_FDTFILE "kirkwood-lschlv2.dtb" |
| 30 | #else |
| 31 | #error "Unsupported board" |
| 32 | #endif |
| 33 | |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 34 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Michael Walle | 848fe23 | 2014-04-01 20:09:14 +0200 | [diff] [blame] | 35 | "bootsource=legacy\0" \ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 36 | "hdpart=0:1\0" \ |
Michael Walle | 848fe23 | 2014-04-01 20:09:14 +0200 | [diff] [blame] | 37 | "kernel_addr=0x00800000\0" \ |
| 38 | "ramdisk_addr=0x01000000\0" \ |
Michael Walle | 145df6f | 2015-02-08 20:06:06 +0100 | [diff] [blame] | 39 | "fdt_addr=0x00ff0000\0" \ |
Michael Walle | f94b522 | 2019-04-03 23:28:31 +0200 | [diff] [blame] | 40 | "bootcmd_legacy=sata init " \ |
| 41 | "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\ |
| 42 | "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\ |
Michael Walle | bc2ad9f0 | 2015-02-08 20:06:05 +0100 | [diff] [blame] | 43 | "&& bootm ${kernel_addr} ${ramdisk_addr}\0" \ |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 44 | "bootcmd_net=bootp ${kernel_addr} vmlinuz " \ |
| 45 | "&& tftpboot ${ramdisk_addr} initrd.img " \ |
| 46 | "&& setenv ramdisk_len ${filesize} " \ |
Michael Walle | 848fe23 | 2014-04-01 20:09:14 +0200 | [diff] [blame] | 47 | "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " " \ |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 48 | "&& bootz ${kernel_addr} " \ |
| 49 | "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \ |
Michael Walle | f94b522 | 2019-04-03 23:28:31 +0200 | [diff] [blame] | 50 | "bootcmd_hdd=sata init " \ |
| 51 | "&& load sata ${hdpart} ${kernel_addr} /vmlinuz " \ |
| 52 | "&& load sata ${hdpart} ${ramdisk_addr} /initrd.img " \ |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 53 | "&& setenv ramdisk_len ${filesize} " \ |
Michael Walle | f94b522 | 2019-04-03 23:28:31 +0200 | [diff] [blame] | 54 | "&& load sata ${hdpart} ${fdt_addr} /dtb " \ |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 55 | "&& bootz ${kernel_addr} " \ |
| 56 | "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 57 | "bootcmd_usb=usb start " \ |
Michael Walle | 4fe49d7 | 2015-02-08 20:06:07 +0100 | [diff] [blame] | 58 | "&& load usb 0:1 ${kernel_addr} /vmlinuz " \ |
| 59 | "&& load usb 0:1 ${ramdisk_addr} /initrd.img " \ |
| 60 | "&& setenv ramdisk_len ${filesize} " \ |
| 61 | "&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " " \ |
| 62 | "&& bootz ${kernel_addr} " \ |
| 63 | "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 64 | "bootcmd_rescue=run config_nc_dhcp; run nc\0" \ |
| 65 | "eraseenv=sf probe 0 " \ |
Marek Vasut | 5368c55 | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 66 | "&& sf erase " __stringify(CONFIG_ENV_OFFSET) \ |
| 67 | " +" __stringify(CONFIG_ENV_SIZE) "\0" \ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 68 | "config_nc_dhcp=setenv autoload_old ${autoload}; " \ |
| 69 | "setenv autoload no " \ |
| 70 | "&& bootp " \ |
Michael Walle | 23c9946 | 2012-10-04 06:54:25 +0000 | [diff] [blame] | 71 | "&& setenv ncip " \ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 72 | "&& setenv autoload ${autoload_old}; " \ |
| 73 | "setenv autoload_old\0" \ |
| 74 | "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \ |
| 75 | "setenv ncip; setenv gatewayip; setenv ethact; " \ |
| 76 | "setenv bootfile; setenv dnsip; " \ |
Michael Walle | 45e60c2 | 2014-09-28 00:05:23 +0200 | [diff] [blame] | 77 | "setenv bootsource legacy; run ser\0" \ |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 78 | "restore_env=run standard_env; saveenv; reset\0" \ |
| 79 | "ser=setenv stdin serial; setenv stdout serial; " \ |
| 80 | "setenv stderr serial\0" \ |
| 81 | "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0" \ |
| 82 | "stdin=serial\0" \ |
| 83 | "stdout=serial\0" \ |
| 84 | "stderr=serial\0" |
| 85 | |
| 86 | /* |
| 87 | * Ethernet Driver configuration |
| 88 | */ |
| 89 | #ifdef CONFIG_CMD_NET |
| 90 | #define CONFIG_MVGBE_PORTS {0, 1} /* enable port 1 only */ |
| 91 | #define CONFIG_PHY_BASE_ADR 7 |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 92 | #endif /* CONFIG_CMD_NET */ |
| 93 | |
Michael Walle | f214a20 | 2012-06-05 11:33:17 +0000 | [diff] [blame] | 94 | #endif /* _CONFIG_LSXL_H */ |