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