3 * Stefan Herbrechtsmeier <stefan@code.herbrechtsmeier.net>
5 * Based on Kirkwood support:
7 * Marvell Semiconductor <www.marvell.com>
8 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
10 * See file CREDITS for list of people who contributed to this
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of
16 * the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
29 #ifndef _CONFIG_DNS325_H
30 #define _CONFIG_DNS325_H
33 * Machine number definition
35 #define MACH_TYPE_DNS325 3800
36 #define CONFIG_MACH_TYPE MACH_TYPE_DNS325
37 #define CONFIG_IDENT_STRING "\nD-Link DNS-325"
40 * High Level Configuration Options (easy to change)
42 #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
43 #define CONFIG_KIRKWOOD /* SOC Family Name */
44 #define CONFIG_KW88F6281 /* SOC Name */
45 #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
48 * Commands configuration
50 #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
51 #include <config_cmd_default.h>
52 #define CONFIG_CMD_DHCP
53 #define CONFIG_CMD_ENV
54 #define CONFIG_CMD_NAND
55 #define CONFIG_CMD_PING
56 #define CONFIG_CMD_USB
57 #define CONFIG_CMD_IDE
58 #define CONFIG_CMD_DATE
59 #define CONFIG_SYS_MVFS
61 #define CONFIG_NR_DRAM_BANKS 1
64 * mv-common.h should be defined after CMD configs since it used them
65 * to enable certain macros
67 #include "mv-common.h"
69 /* Remove or override few declarations from mv-common.h */
70 #undef CONFIG_SYS_PROMPT
71 #define CONFIG_SYS_PROMPT "=> "
74 * Ethernet Driver configuration
77 #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
78 #define CONFIG_NETCONSOLE
82 * SATA Driver configuration
84 #ifdef CONFIG_MVSATA_IDE
85 #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
86 #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
90 * RTC driver configuration
92 #ifdef CONFIG_CMD_DATE
99 #define CONFIG_KIRKWOOD_GPIO
102 * Use the HUSH parser
104 #define CONFIG_SYS_HUSH_PARSER
107 * Console configuration
109 #define CONFIG_CONSOLE_MUX
110 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
113 * Enable device tree support
115 #define CONFIG_OF_LIBFDT
118 * Display cpu info at boot
120 #define CONFIG_DISPLAY_CPUINFO
123 * Environment variables configurations
125 #ifdef CONFIG_CMD_NAND
126 #define CONFIG_ENV_IS_IN_NAND
127 #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128KB */
129 #define CONFIG_ENV_IS_NOWHERE
132 #define CONFIG_ENV_SIZE 0x20000 /* 128KB */
133 #define CONFIG_ENV_ADDR 0xe0000
134 #define CONFIG_ENV_OFFSET 0xe0000 /* env starts here */
137 * Default environment variables
139 #define MTDIDS_DEFAULT "nand0=orion_nand"
141 #define MTDPARTS_DEFAULT "mtdparts=orion_nand:" \
142 "896k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)\0"
144 #define CONFIG_EXTRA_ENV_SETTINGS \
148 "loadaddr=0x800000\0" \
150 "console=ttyS0,115200\0" \
151 "mtdparts="MTDPARTS_DEFAULT \
153 "bootenv=uEnv.txt\0" \
154 "importbootenv=echo Importing environment ...; " \
155 "env import -t ${loadaddr} ${filesize}\0" \
156 "loadbootenv=fatload usb 0 ${loadaddr} ${bootenv}\0" \
157 "setbootargs=setenv bootargs console=${console} " \
160 "root=${bootenvroot} " \
161 "rootfstype=${bootenvrootfstype}\0" \
162 "subbootcmd=run setbootargs; " \
163 "if run bootenvloadimage; then " \
164 "bootm ${loadaddr};" \
166 "nandroot=ubi0:rootfs ubi.mtd=rootfs\0" \
167 "nandrootfstype=ubifs\0" \
168 "nandloadimage=nand read ${loadaddr} kernel\0" \
169 "setnandbootenv=echo Booting from nand ...; " \
170 "setenv bootenvroot ${nandroot}; " \
171 "setenv bootenvrootfstype ${nandrootfstype}; " \
172 "setenv bootenvloadimage ${nandloadimage}\0"
174 #define CONFIG_BOOTCOMMAND \
175 "if test -n ${bootenv} && usb start; then " \
176 "if run loadbootenv; then " \
177 "echo Loaded environment ${bootenv} from usb;" \
178 "run importbootenv;" \
180 "if test -n ${bootenvcmd}; then " \
181 "echo Running bootenvcmd ...;" \
185 "run setnandbootenv subbootcmd;"
187 #endif /* _CONFIG_DNS325_H */