Linus Walleij | aaa9e3d | 2023-04-24 09:38:30 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | |
| 3 | #ifndef __BCM_NS_H |
| 4 | #define __BCM_NS_H |
| 5 | |
| 6 | #include <linux/sizes.h> |
| 7 | |
| 8 | /* Physical Memory Map */ |
| 9 | #define V2M_BASE 0x00000000 |
| 10 | #define PHYS_SDRAM_1 V2M_BASE |
| 11 | |
| 12 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| 13 | |
| 14 | /* Called "periph_clk" in Linux, used by the global timer */ |
| 15 | #define CFG_SYS_HZ_CLOCK 500000000 |
| 16 | |
| 17 | /* Called "iprocslow" in Linux */ |
| 18 | #define CFG_SYS_NS16550_CLK 125000000 |
| 19 | |
| 20 | /* console configuration */ |
| 21 | #define CONSOLE_ARGS "console_args=console=ttyS0,115200n8\0" |
| 22 | #define MAX_CPUS "max_cpus=maxcpus=2\0" |
| 23 | #define EXTRA_ARGS "extra_args=earlycon=uart8250,mmio32,0x18000300\0" |
| 24 | |
| 25 | #define BASE_ARGS "${console_args} ${extra_args} ${pcie_args}" \ |
| 26 | " ${max_cpus} ${log_level} ${reserved_mem}" |
| 27 | #define SETBOOTARGS "setbootargs=setenv bootargs " BASE_ARGS "\0" |
| 28 | |
| 29 | #define KERNEL_LOADADDR_CFG \ |
| 30 | "loadaddr=0x01000000\0" \ |
| 31 | "dtb_loadaddr=0x02000000\0" |
| 32 | |
| 33 | /* |
| 34 | * Hardcoded for the only boards we support, if you add more |
| 35 | * boards, add a more clever bootcmd! |
| 36 | */ |
| 37 | #define NS_BOOTCMD "bootcmd_dlink_dir8xxl=seama 0x00fe0000; go 0x01000000" |
| 38 | |
| 39 | #define ARCH_ENV_SETTINGS \ |
| 40 | CONSOLE_ARGS \ |
| 41 | MAX_CPUS \ |
| 42 | EXTRA_ARGS \ |
| 43 | KERNEL_LOADADDR_CFG \ |
| 44 | NS_BOOTCMD |
| 45 | |
| 46 | #define CFG_EXTRA_ENV_SETTINGS \ |
| 47 | ARCH_ENV_SETTINGS |
| 48 | |
| 49 | #endif /* __BCM_NS_H */ |