summaryrefslogtreecommitdiff
path: root/cleopatre/u-boot-1.1.6/include/configs/spc300_arch.h
blob: 0014a0b4c82d90f5abce435e7088ce84c7145523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
/*
 * include/configs/spc300_arch.h
 *
 * Copyright (C) 2009 SPiDCOM Technologies
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */

#ifndef __CONFIG_SPC300_ARCH_H
#define __CONFIG_SPC300_ARCH_H

#define CONFIG_ARCH_SPC300 1

#if defined (CONFIG_CHIP_SPC300)
#  define CONFIG_CHIP_FEATURE_INT_MAP_V1 1
#  define CONFIG_CHIP_FEATURE_SDRAM_CTRL 1
#  define CONFIG_CHIP_FEATURE_SYNOP3504 1
#  define CONFIG_CHIP_FEATURE_SYNC_DSP_CLOCK 1
#  define CONFIG_CHIP_MAX_MASTER_CLOCK 147000000
#  define CONFIG_CHIP_FEATURE_SPCPLL 1
#  define CONFIG_CHIP_FEATURE_SPCPIO 1
#  define CONFIG_CHIP_FEATURE_SPCETH 1
#  define CONFIG_CHIP_TYPE "SPC300"
#elif defined (CONFIG_CHIP_MSE500DINI_300)
#  define CONFIG_CHIP_FEATURE_INT_MAP_V2 1
#  define CONFIG_CHIP_FEATURE_MIU_CTRL 1
#  define CONFIG_CHIP_FEATURE_SYNOP3504 1
#  define CONFIG_CHIP_FEATURE_SYNOP3504_NO_GIGABIT 1
#  define CONFIG_CHIP_FEATURE_SYNOP3504_PHY_DINI 1
#  define CONFIG_CHIP_FEATURE_DINI_UART_SELECT 1
#  define CONFIG_CHIP_FEATURE_FIXED_MASTER_CLOCK 1
#  define CONFIG_CHIP_MAX_MASTER_CLOCK 47000000
#  define CONFIG_CHIP_FEATURE_FIXED_ARM_CLOCK 1
#  define CONFIG_CHIP_FEATURE_SPCPIO 1
#  define CONFIG_CHIP_TYPE "MSE500DINI"
#elif defined (CONFIG_CHIP_MSE500)
#  define CONFIG_CHIP_FEATURE_INT_MAP_V2 1
#  define CONFIG_CHIP_FEATURE_MIU_CTRL 1
#  define CONFIG_CHIP_FEATURE_SYNOP3504 1
#  define CONFIG_CHIP_FEATURE_FIXED_ARM_CLOCK 1
#  define CONFIG_CHIP_MAX_MASTER_CLOCK 246000000
#  define CONFIG_CHIP_FEATURE_MSEPLL 1
#  define CONFIG_CHIP_FEATURE_IOMUX 1
#  define CONFIG_CHIP_FEATURE_MSEETH 1
#  define CONFIG_AFE_MSEAFE 1
#  define CONFIG_CHIP_TYPE "MSE500"
#else
#  error "undefined chip"
#endif


#include <asm/hardware.h>
/*
 * U-BOOT PARAMETERS
 */

/*
 * If we are developing, we might want to start armboot from ram
 * so we MUST NOT initialize critical regs like mem-timing ...
 * use only if CONFIG_EXEC_FROM_SDRAM = false
 */
#undef CONFIG_SKIP_LOWLEVEL_INIT
/* Allow u-boot to start directly from SDRAM (no init) */
#define CONFIG_EXEC_FROM_SDRAM          1

/* Define U-Boot max size for flash protect */
#define CFG_BOOT_SIZE                   0x30000
#undef CFG_U_BOOT_BASE
#undef CFG_U_BOOT_SIZE

/* Allow verbose help for commands */
#define CFG_LONGHELP                    1

/* Monitor command prompt */
#define CFG_PROMPT                      CONFIG_CHIP_TYPE "-Boot> "

/* Console I/O Buffer Size */
#define CFG_CBSIZE                      256

/* Max number of command args */
#define CFG_MAXARGS                     16

/* Print Buffer Size */
#define CFG_PBSIZE                      (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)

/* Regular stack */
#define CONFIG_STACKSIZE                (64*1024)

/* Disable IRQ using */
#undef CONFIG_USE_IRQ
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif

/* Use TAGs to start Linux with correct parameters */
#define CONFIG_CMDLINE_TAG              1
#define CONFIG_SETUP_MEMORY_TAGS        1
#define CONFIG_SPC300_TAG               1

/* Disable overwriting serial and ethaddr */
#undef CONFIG_ENV_OVERWRITE
#define CONFIG_OVERWRITE_ETHADDR_ONCE   1
/* Environnement parameters are embedded */
#undef CFG_ENV_IS_IN_FLASH
#define CFG_ENV_IS_NOWHERE              1
#define CFG_ENV_IS_EMBEDDED             1
#define CFG_ENV_SIZE                    0x500

/* Size of malloc() pool */
#define CFG_MALLOC_LEN                  (128*1024)

/* Size in bytes reserved for initial data */
#define CFG_GBL_DATA_SIZE               128

/* Allow late init function */
#define BOARD_LATE_INIT                 1

/* Automatic boot command */
#define CONFIG_BOOTCOMMAND              "spidboot"

/* Time in second before starting automatic boot command */
#define CONFIG_BOOTDELAY                0
#define CONFIG_ZERO_BOOTDELAY_CHECK     1

/* Boot parameters given to Linux */
#define CONFIG_BOOTARGS                 "console=ttyS0,115200 panic=1 oops=panic"

/* Allow the following commands */
#define CONFIG_COMMANDS                 \
    ( (CONFIG_CMD_DFL    | \
       CFG_CMD_PING      | \
       CFG_CMD_MMUON     | \
       CFG_CMD_SPIDUPD   | \
       CFG_CMD_SPIDBOOT  | \
       CFG_CMD_CACHE     | \
       CFG_CMD_MII       | \
       CFG_CMD_NET)      & \
      ~( CFG_CMD_SETGETDCR | \
         CFG_CMD_FPGA      | \
         CFG_CMD_ENV       | \
         CFG_CMD_ITEST     | \
         CFG_CMD_XIMG ) )

/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>

/*
 * UARTS PARAMETERS
 */
/* Define one of these to choose the USART0  or USART1 as console */
#define CONFIG_USART0                   1
/* Set default baudrate */
#define CONFIG_BAUDRATE                 115200
#define CFG_BAUDRATE_TABLE              {115200 , 19200, 38400, 57600, 9600 }
/* Don't include RTS/CTS flow control support	*/
#undef	CONFIG_HWFLOW
/* Disable modem initialization stuff */
#undef	CONFIG_MODEM_SUPPORT
/* Eat the first char if it is a break (to avoid randomly generated
 * break) */
#define CONFIG_EAT_FIRST_BREAK


/*
 * SDRAM PARAMETERS
 */
/* Number of SDRAM chips (always 1) */
#define CONFIG_NR_DRAM_BANKS            1
/* SDRAM Base Address */
#define PHYS_SDRAM                      0x40000000
/* Memory tests configuration */
#define CFG_MEMTEST_START		(PHYS_SDRAM + 0x00000000)
#define CFG_MEMTEST_END			(PHYS_SDRAM + 0x005FFFFF)
#define CFG_MEMTEST_SCRATCH             (CFG_MEMTEST_START + 0x01000000 - 4) /*Assume that SDRAM size = 16M*/
#define CFG_ALT_MEMTEST			1
/* Default address to start a script */
#define CFG_LOAD_ADDR                   0x40100000



/*
 * FLASH PARAMETERS
 */
#undef CFG_NO_FLASH

/* SPI Flash configuration */
#define CFG_MAX_FLASH_BANKS             1
#define PHYS_FLASH_SPI_1                0x30000000
#define FLASH_SPI_AREA                  0x0FFFFFFF
#define CFG_MAX_FLASH_SECT              256
#define CFG_FLASH_PROTECTION            1
/* Timeout for Flash Erase */
#define CFG_FLASH_SPI_ERASE_TOUT        (20*CFG_HZ)
/* Timeout for Flash Write */
#define CFG_FLASH_SPI_WRITE_TOUT        (20*CFG_HZ)
/* SPI Controller Address */
#define CFG_FLASH_SPI_BASE              0xF0000000
/* Timeout for SPI controller */
#define SPI_CTL_TMO                     (30*CFG_HZ)



/*
 * ETHERNET PARAMETERS
 */
/* Enable SPC Ethernet MAC driver */
#define CONFIG_MII                      1
#define CONFIG_DRIVER_NETSPCMAC         1
#define CONFIG_SPCMAC_ADDRESS           ETHERNET_CTRL_BASE
/* IP layer configuration */
#define CONFIG_ETHADDR                  00:13:D7:00:10:01
#define CONFIG_SERVERIP                 010.003.000.211
#define CONFIG_IPADDR                   010.003.000.001
#define CONFIG_NETMASK                  255.255.000.000
#define CONFIG_GATEWAYIP                010.003.000.211
#define CONFIG_HOSTNAME                 spc300
#define CONFIG_BOOTFILE                 "linux-kernel-2.6.25.10-arm"



/*
 * OTHER IPs PARAMETERS
 */
#undef  CONFIG_LCD

#endif