]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/openrisc-generic.h
openrisc: Add openrisc-generic example board
[people/ms/u-boot.git] / include / configs / openrisc-generic.h
1 /*
2 * (C) Copyright 2011, Stefan Kristiansson, stefan.kristianssons@saunalahti.fi
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 #ifndef __CONFIG_H
24 #define __CONFIG_H
25
26 /*
27 * BOARD/CPU
28 */
29
30 #define CONFIG_SYS_CLK_FREQ 50000000
31 #define CONFIG_SYS_RESET_ADDR 0x00000100
32
33 #define CONFIG_SYS_SDRAM_BASE 0x00000000
34 #define CONFIG_SYS_SDRAM_SIZE 0x02000000
35
36 #define CONFIG_SYS_CACHELINE_SIZE 16
37
38 #define CONFIG_SYS_UART_BASE 0x90000000
39 #define CONFIG_SYS_UART_FREQ CONFIG_SYS_CLK_FREQ
40 #define CONFIG_SYS_UART_BAUD 115200
41
42 #define CONFIG_BOARD_NAME "OpenRISC Generic"
43
44 #define CONFIG_SYS_NO_FLASH
45 #define CONFIG_SYS_MAX_FLASH_SECT 0
46
47 /*
48 * SERIAL
49 */
50 # define CONFIG_SYS_NS16550
51 # define CONFIG_SYS_NS16550_SERIAL
52 # define CONFIG_SYS_NS16550_REG_SIZE 1
53 # define CONFIG_CONS_INDEX 1
54 # define CONFIG_SYS_NS16550_COM1 (0x90000000)
55 # define CONFIG_SYS_NS16550_CLK CONFIG_SYS_CLK_FREQ
56
57 #define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
58 #define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
59 #define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
60 #define CONSOLE_ARG "console=console=ttyS0,115200\0"
61
62 /*
63 * Ethernet
64 */
65 #define CONFIG_ETHOC
66 #define CONFIG_SYS_ETHOC_BASE 0x92000000
67
68 #define CONFIG_BOOTFILE "boot.img"
69 #define CONFIG_LOADADDR 0x100000 /* 1MB mark */
70
71 /*
72 * TIMER
73 */
74 #define CONFIG_SYS_HZ 1000
75 #define CONFIG_SYS_OPENRISC_TMR_HZ 100
76
77 /*
78 * Memory organisation:
79 *
80 * RAM start ---------------------------
81 * | ... |
82 * ---------------------------
83 * | Stack |
84 * ---------------------------
85 * | Global data |
86 * ---------------------------
87 * | Environment |
88 * ---------------------------
89 * | Monitor |
90 * RAM end ---------------------------
91 */
92 /* We're running in RAM */
93 #define CONFIG_MONITOR_IS_IN_RAM
94 #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
95 #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
96 CONFIG_SYS_SDRAM_SIZE - \
97 CONFIG_SYS_MONITOR_LEN)
98
99 #define CONFIG_ENV_IS_NOWHERE
100 #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment, 128KB */
101 #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE)
102
103 /*
104 * Global data object and stack pointer
105 */
106 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_ENV_ADDR \
107 - GENERATED_GBL_DATA_SIZE)
108 #define CONFIG_SYS_GBL_DATA_ADDR CONFIG_SYS_GBL_DATA_OFFSET
109 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
110 #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
111 #define CONFIG_SYS_STACK_LENGTH 0x10000 /* 64KB */
112 #define CONFIG_SYS_MALLOC_LEN 0x400000 /* 4MB */
113 #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_INIT_SP_OFFSET \
114 - CONFIG_SYS_STACK_LENGTH \
115 - CONFIG_SYS_MALLOC_LEN)
116 /*
117 * MISC
118 */
119 #define CONFIG_SYS_LONGHELP /* Provide extended help */
120 #define CONFIG_SYS_PROMPT "==> " /* Command prompt */
121 #define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
122 #define CONFIG_SYS_MAXARGS 16 /* Max command args */
123 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
124 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
125 sizeof(CONFIG_SYS_PROMPT) + \
126 16) /* Print buf size */
127 #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
128 #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x2000)
129 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP_ADDR - 0x20000)
130 #define CONFIG_CMDLINE_EDITING
131
132 /*
133 * Command line configuration.
134 */
135 #include <config_cmd_default.h>
136
137
138 #define CONFIG_CMD_IRQ
139 #define CONFIG_CMD_ELF
140 #define CONFIG_CMD_BSP
141
142 #define CONFIG_CMD_MII
143 #define CONFIG_CMD_DHCP
144 #define CONFIG_CMD_PING
145
146 #define CONFIG_OF_LIBFDT
147 #define CONFIG_LMB
148
149 /*
150 * BOOTP options
151 */
152 #define CONFIG_BOOTP_BOOTFILESIZE
153 #define CONFIG_BOOTP_BOOTPATH
154 #define CONFIG_BOOTP_GATEWAY
155 #define CONFIG_BOOTP_HOSTNAME
156
157
158 #endif /* __CONFIG_H */