blob: 227c0ca84bc1f4afb308a5b0829adbf8e2a23008 [file] [log] [blame]
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +00001/*
2 * (C) Copyright 2011, Stefan Kristiansson, stefan.kristianssons@saunalahti.fi
3 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02004 * SPDX-License-Identifier: GPL-2.0+
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +00005 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
9
10/*
11 * BOARD/CPU
12 */
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +000013#define CONFIG_SYS_CLK_FREQ 50000000
14#define CONFIG_SYS_RESET_ADDR 0x00000100
15
16#define CONFIG_SYS_SDRAM_BASE 0x00000000
17#define CONFIG_SYS_SDRAM_SIZE 0x02000000
18
19#define CONFIG_SYS_CACHELINE_SIZE 16
20
21#define CONFIG_SYS_UART_BASE 0x90000000
22#define CONFIG_SYS_UART_FREQ CONFIG_SYS_CLK_FREQ
23#define CONFIG_SYS_UART_BAUD 115200
24
25#define CONFIG_BOARD_NAME "OpenRISC Generic"
26
27#define CONFIG_SYS_NO_FLASH
28#define CONFIG_SYS_MAX_FLASH_SECT 0
29
30/*
31 * SERIAL
32 */
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +000033# define CONFIG_SYS_NS16550_SERIAL
34# define CONFIG_SYS_NS16550_REG_SIZE 1
35# define CONFIG_CONS_INDEX 1
36# define CONFIG_SYS_NS16550_COM1 (0x90000000)
37# define CONFIG_SYS_NS16550_CLK CONFIG_SYS_CLK_FREQ
38
39#define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
40#define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
41#define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
42#define CONSOLE_ARG "console=console=ttyS0,115200\0"
43
44/*
45 * Ethernet
46 */
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +000047#define CONFIG_SYS_ETHOC_BASE 0x92000000
48
49#define CONFIG_BOOTFILE "boot.img"
50#define CONFIG_LOADADDR 0x100000 /* 1MB mark */
51
52/*
53 * TIMER
54 */
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +000055#define CONFIG_SYS_OPENRISC_TMR_HZ 100
56
57/*
58 * Memory organisation:
59 *
60 * RAM start ---------------------------
61 * | ... |
62 * ---------------------------
63 * | Stack |
64 * ---------------------------
65 * | Global data |
66 * ---------------------------
67 * | Environment |
68 * ---------------------------
69 * | Monitor |
70 * RAM end ---------------------------
71 */
72/* We're running in RAM */
73#define CONFIG_MONITOR_IS_IN_RAM
74#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
75#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
76 CONFIG_SYS_SDRAM_SIZE - \
77 CONFIG_SYS_MONITOR_LEN)
78
79#define CONFIG_ENV_IS_NOWHERE
80#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment, 128KB */
81#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE)
82
83/*
84 * Global data object and stack pointer
85 */
86#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_ENV_ADDR \
87 - GENERATED_GBL_DATA_SIZE)
88#define CONFIG_SYS_GBL_DATA_ADDR CONFIG_SYS_GBL_DATA_OFFSET
89#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
90#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
91#define CONFIG_SYS_STACK_LENGTH 0x10000 /* 64KB */
92#define CONFIG_SYS_MALLOC_LEN 0x400000 /* 4MB */
93#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_INIT_SP_OFFSET \
94 - CONFIG_SYS_STACK_LENGTH \
95 - CONFIG_SYS_MALLOC_LEN)
96/*
97 * MISC
98 */
99#define CONFIG_SYS_LONGHELP /* Provide extended help */
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +0000100#define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
101#define CONFIG_SYS_MAXARGS 16 /* Max command args */
102#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
103#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
104 sizeof(CONFIG_SYS_PROMPT) + \
105 16) /* Print buf size */
106#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
107#define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x2000)
108#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP_ADDR - 0x20000)
109#define CONFIG_CMDLINE_EDITING
110
111/*
112 * Command line configuration.
113 */
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +0000114#define CONFIG_CMD_IRQ
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +0000115#define CONFIG_CMD_BSP
116
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +0000117#define CONFIG_LMB
118
119/*
120 * BOOTP options
121 */
122#define CONFIG_BOOTP_BOOTFILESIZE
123#define CONFIG_BOOTP_BOOTPATH
124#define CONFIG_BOOTP_GATEWAY
125#define CONFIG_BOOTP_HOSTNAME
126
Stefan Kristiansson0e65f1a2011-11-26 19:04:55 +0000127#endif /* __CONFIG_H */