blob: 5790602d9376b6ab47a86a46d3966d781fa8c719 [file] [log] [blame]
Simon Guinot16311a22011-06-17 19:41:33 +05301/*
2 * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com>
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
18#ifndef _CONFIG_NETSPACE_V2_H
19#define _CONFIG_NETSPACE_V2_H
20
21/*
22 * Machine number definition
23 */
24#if defined(CONFIG_INETSPACE_V2)
25#define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2
26#define CONFIG_IDENT_STRING " IS v2"
27#elif defined(CONFIG_NETSPACE_V2)
28#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2
29#define CONFIG_IDENT_STRING " NS v2"
30#elif defined(CONFIG_NETSPACE_MAX_V2)
31#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2
32#define CONFIG_IDENT_STRING " NS Max v2"
33#else
34#error "Unknown board"
35#endif
36
37/*
38 * High Level Configuration Options (easy to change)
39 */
40#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
41#define CONFIG_KIRKWOOD /* SOC Family Name */
42#define CONFIG_KW88F6281 /* SOC Name */
43#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
44
45/*
46 * Commands configuration
47 */
48#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
49#include <config_cmd_default.h>
50#define CONFIG_CMD_ENV
51#define CONFIG_CMD_DHCP
52#define CONFIG_CMD_PING
53#define CONFIG_CMD_SF
54#define CONFIG_CMD_I2C
55#define CONFIG_CMD_IDE
56#define CONFIG_CMD_USB
57
58/*
59 * Core clock definition.
60 */
61#define CONFIG_SYS_TCLK 166000000 /* 166MHz */
62
Simon Guinot65e05172011-11-01 16:44:12 +053063#define CONFIG_NR_DRAM_BANKS 1
64#ifdef CONFIG_INETSPACE_V2
65/* Different SDRAM configuration and size for Internet Space v2 */
66#define CONFIG_SYS_KWD_CONFIG ($(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-is2.cfg)
67#endif
68
Simon Guinot16311a22011-06-17 19:41:33 +053069/*
70 * mv-common.h should be defined after CMD configs since it used them
71 * to enable certain macros
72 */
Simon Guinot16311a22011-06-17 19:41:33 +053073#include "mv-common.h"
74
75/* Remove or override few declarations from mv-common.h */
76#undef CONFIG_RBTREE
77#undef CONFIG_ENV_SPI_MAX_HZ
78#undef CONFIG_SYS_IDE_MAXBUS
79#undef CONFIG_SYS_IDE_MAXDEVICE
80#undef CONFIG_SYS_PROMPT
81#define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */
82#define CONFIG_SYS_IDE_MAXBUS 1
83#define CONFIG_SYS_IDE_MAXDEVICE 1
84#define CONFIG_SYS_PROMPT "ns2> "
85
86/*
87 * Ethernet Driver configuration
88 */
89#ifdef CONFIG_CMD_NET
90#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
91#define CONFIG_NETCONSOLE
92#endif
93
94/*
95 * SATA Driver configuration
96 */
97#ifdef CONFIG_MVSATA_IDE
98#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
99/* Network Space Max v2 use 2 SATA ports */
100#ifdef CONFIG_NETSPACE_MAX_V2
101#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
102#endif
103#endif
104
105/*
106 * Enable GPI0 support
107 */
108#define CONFIG_KIRKWOOD_GPIO
109
110/*
111 * File systems support
112 */
113#define CONFIG_CMD_EXT2
114#define CONFIG_CMD_FAT
115
116/*
117 * Use the HUSH parser
118 */
119#define CONFIG_SYS_HUSH_PARSER
120#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
121
122/*
123 * Console configuration
124 */
125#define CONFIG_CONSOLE_MUX
126#define CONFIG_SYS_CONSOLE_IS_IN_ENV
127
128/*
129 * Enable device tree support
130 */
131#define CONFIG_OF_LIBFDT
132
133/*
134 * Environment variables configurations
135 */
136#define CONFIG_ENV_IS_IN_SPI_FLASH
137#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */
138#define CONFIG_ENV_SIZE 0x1000 /* 4KB */
139#define CONFIG_ENV_ADDR 0x70000
140#define CONFIG_ENV_OFFSET 0x70000 /* env starts here */
141
142/*
143 * Default environment variables
144 */
145#define CONFIG_BOOTARGS "console=ttyS0,115200"
146
147#define CONFIG_BOOTCOMMAND \
148 "dhcp && run netconsole; " \
149 "if run usbload || run diskload; then bootm; fi"
150
151#define CONFIG_EXTRA_ENV_SETTINGS \
152 "stdin=serial\0" \
153 "stdout=serial\0" \
154 "stderr=serial\0" \
155 "bootfile=uImage\0" \
156 "loadaddr=0x800000\0" \
157 "autoload=no\0" \
158 "netconsole=" \
159 "set stdin $stdin,nc; " \
160 "set stdout $stdout,nc; " \
161 "set stderr $stderr,nc;\0" \
162 "diskload=ide reset && " \
163 "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \
164 "usbload=usb start && " \
165 "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
166
167#endif /* _CONFIG_NETSPACE_V2_H */