blob: 7a08c334eb4a22f95b5846bd9db0a0d8d62927b4 [file] [log] [blame]
Dirk Eibachd494cdb2019-03-29 10:18:19 +01001/*
2 * (C) Copyright 2015
3 * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de
4 *
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12/*
13 * DDR Setup
14 */
15#define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */
16/* TODO: Check: Can this be unified with CONFIG_SYS_SDRAM_BASE? */
17#define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_SDRAM_BASE
18
19/*
20 * Memory test
21 * TODO: Migrate!
22 */
Dirk Eibachd494cdb2019-03-29 10:18:19 +010023
24/*
25 * The reserved memory
26 */
27#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
28
29#define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon */
Dirk Eibachd494cdb2019-03-29 10:18:19 +010030
31/*
32 * Initial RAM Base Address Setup
33 */
34#define CONFIG_SYS_INIT_RAM_LOCK
35#define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
36#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */
37#define CONFIG_SYS_GBL_DATA_OFFSET \
38 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
39
40/*
41 * FLASH on the Local Bus
42 */
43#define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */
44#define CONFIG_SYS_FLASH_SIZE 8 /* FLASH size is up to 8M */
45
Dirk Eibachd494cdb2019-03-29 10:18:19 +010046#define CONFIG_SYS_MAX_FLASH_SECT 135
47
48#define CONFIG_SYS_BAUDRATE_TABLE \
49 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
50
51/*
52 * Environment
53 */
Dirk Eibachd494cdb2019-03-29 10:18:19 +010054
55#define CONFIG_LOADS_ECHO /* echo on for serial download */
56#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
57
58/*
59 * Miscellaneous configurable options
60 */
Dirk Eibachd494cdb2019-03-29 10:18:19 +010061
62#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
63
64/* Print Buffer Size */
65#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
66#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
67#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
68
69/*
70 * For booting Linux, the board info and command line data
71 * have to be in the first 256 MB of memory, since this is
72 * the maximum mapped by the Linux kernel during initialization.
73 */
74#define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */
75
76/*
77 * Environment Configuration
78 */
Dirk Eibachd494cdb2019-03-29 10:18:19 +010079
80#define CONFIG_HAS_ETH0
81#define CONFIG_HAS_ETH1
82
Dirk Eibachd494cdb2019-03-29 10:18:19 +010083/* TODO: Turn into string option and migrate to Kconfig */
84#define CONFIG_HOSTNAME "gazerbeam"
85#define CONFIG_ROOTPATH "/opt/nfsroot"
Dirk Eibachd494cdb2019-03-29 10:18:19 +010086
Dirk Eibachd494cdb2019-03-29 10:18:19 +010087#define CONFIG_EXTRA_ENV_SETTINGS \
88 "netdev=eth0\0" \
89 "consoledev=ttyS1\0" \
90 "u-boot=u-boot.bin\0" \
91 "kernel_addr=1000000\0" \
92 "fdt_addr=C00000\0" \
93 "fdtfile=hrcon.dtb\0" \
94 "load=tftp ${loadaddr} ${u-boot}\0" \
95 "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE) \
96 " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
97 " +${filesize};cp.b ${fileaddr} " \
98 __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
99 "upd=run load update\0" \
100
Dirk Eibachd494cdb2019-03-29 10:18:19 +0100101#endif /* __CONFIG_H */