Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2010-2017 CS Systemes d'Information |
| 4 | * Christophe Leroy <christophe.leroy@c-s.fr> |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
| 10 | /* High Level Configuration Options */ |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 11 | |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 12 | #define CFG_EXTRA_ENV_SETTINGS \ |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 13 | "sdram_type=SDRAM\0" \ |
| 14 | "flash_type=AM29LV160DB\0" \ |
| 15 | "loadaddr=0x400000\0" \ |
| 16 | "filename=uImage.lzma\0" \ |
| 17 | "nfsroot=/opt/ofs\0" \ |
| 18 | "dhcp_ip=ip=:::::eth0:dhcp\0" \ |
| 19 | "console_args=console=ttyCPM0,115200N8\0" \ |
| 20 | "flashboot=setenv bootargs " \ |
| 21 | "${console_args} " \ |
| 22 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ |
| 23 | "mcr3k:eth0:off;" \ |
| 24 | "${ofl_args}; " \ |
| 25 | "bootm 0x04060000 - 0x04050000\0" \ |
| 26 | "tftpboot=setenv bootargs " \ |
| 27 | "${console_args} " \ |
| 28 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ |
| 29 | "mcr3k:eth0:off " \ |
| 30 | "${ofl_args}; " \ |
| 31 | "tftp ${loadaddr} ${filename};" \ |
| 32 | "tftp 0xf00000 mcr3000.dtb;" \ |
| 33 | "bootm ${loadaddr} - 0xf00000\0" \ |
| 34 | "netboot=dhcp ${loadaddr} ${filename};" \ |
| 35 | "tftp 0xf00000 mcr3000.dtb;" \ |
| 36 | "setenv bootargs " \ |
| 37 | "root=/dev/nfs rw " \ |
| 38 | "${console_args} " \ |
| 39 | "${dhcp_ip};" \ |
| 40 | "bootm ${loadaddr} - 0xf00000\0" \ |
| 41 | "nfsboot=setenv bootargs " \ |
| 42 | "root=/dev/nfs rw nfsroot=${serverip}:${nfsroot} " \ |
| 43 | "${console_args} " \ |
| 44 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ |
| 45 | "mcr3k:eth0:off;" \ |
| 46 | "bootm 0x04060000 - 0x04050000\0" \ |
| 47 | "dhcpboot=dhcp ${loadaddr} ${filename};" \ |
| 48 | "tftp 0xf00000 mcr3000.dtb;" \ |
| 49 | "setenv bootargs " \ |
| 50 | "${console_args} " \ |
| 51 | "${dhcp_ip} " \ |
| 52 | "${ofl_args}; " \ |
| 53 | "bootm ${loadaddr} - 0xf00000\0" |
| 54 | |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 55 | /* Miscellaneous configurable options */ |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 56 | |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 57 | /* Definitions for initial stack pointer and data area (in DPRAM) */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 58 | #define CFG_SYS_INIT_RAM_ADDR (CONFIG_SYS_IMMR + 0x2800) |
| 59 | #define CFG_SYS_INIT_RAM_SIZE (0x2e00 - 0x2800) |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 60 | |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 61 | /* RAM configuration (note that CFG_SYS_SDRAM_BASE must be zero) */ |
| 62 | #define CFG_SYS_SDRAM_BASE 0x00000000 |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 63 | |
| 64 | /* FLASH organization */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 65 | #define CFG_SYS_FLASH_BASE CONFIG_TEXT_BASE |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 66 | |
| 67 | /* |
| 68 | * For booting Linux, the board info and command line data |
| 69 | * have to be in the first 8 MB of memory, since this is |
| 70 | * the maximum mapped by the Linux kernel during initialization. |
| 71 | */ |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 72 | #define CFG_SYS_BOOTMAPSZ (8 << 20) |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 73 | |
| 74 | /* Environment Configuration */ |
| 75 | |
| 76 | /* environment is in FLASH */ |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 77 | |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 78 | /* Ethernet configuration part */ |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 79 | |
| 80 | /* NAND configuration part */ |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 81 | #define CFG_SYS_NAND_BASE 0x0C000000 |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 82 | |
Christophe Leroy | 53193a4 | 2017-07-07 10:16:42 +0200 | [diff] [blame] | 83 | #endif /* __CONFIG_H */ |