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#ifndef __CONFIG_H
50#define __CONFIG_H
51
52
53
54
55
56#include <mpc8xx_irq.h>
57
58#define CONFIG_SXNI855T 1
59
60
61
62
63#define CONFIG_MPC860 1
64#define CONFIG_MPC860T 1
65#define CONFIG_MPC855T 1
66
67#define CONFIG_8xx_CONS_SMC1 1
68#undef CONFIG_8xx_CONS_SMC2
69#undef CONFIG_8xx_CONS_SCC1
70#undef CONFIG_8xx_CONS_NONE
71#define CONFIG_BAUDRATE 9600
72#define CONFIG_LOADS_ECHO 1
73
74#define MPC8XX_FACT 10
75
76#define CONFIG_CLOCKS_IN_MHZ 1
77
78#if 0
79#define CONFIG_BOOTDELAY -1
80#else
81#define CONFIG_BOOTDELAY 5
82#endif
83
84#define CONFIG_HAS_ETH1
85
86
87
88
89#define CONFIG_STATUS_LED 1
90
91# define STATUS_LED_PAR im_ioport.iop_papar
92# define STATUS_LED_DIR im_ioport.iop_padir
93# define STATUS_LED_ODR im_ioport.iop_paodr
94# define STATUS_LED_DAT im_ioport.iop_padat
95
96# define STATUS_LED_BIT 0x8000
97# define STATUS_LED_PERIOD ((CONFIG_SYS_HZ / 2) / 5)
98# define STATUS_LED_STATE STATUS_LED_BLINKING
99
100# define STATUS_LED_ACTIVE 0
101
102# define STATUS_LED_BOOT 0
103
104#ifdef DEV
105#define CONFIG_BOOT_LED_STATE STATUS_LED_OFF
106#else
107#define CONFIG_BOOT_LED_STATE STATUS_LED_ON
108#endif
109
110#define CONFIG_SHOW_BOOT_PROGRESS 1
111
112#define CONFIG_BOOTCOMMAND "bootm f8040000 f8100000"
113#define CONFIG_BOOTARGS "root=/dev/ram ip=off"
114
115#define CONFIG_MISC_INIT_R
116#define CONFIG_BOARD_POSTCLK_INIT
117
118#undef CONFIG_WATCHDOG
119
120#define CONFIG_RTC_DS1306
121
122#define CONFIG_SOFT_I2C
123
124
125
126#define PB_SCL 0x00000020
127#define PB_SDA 0x00000010
128
129#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
130#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
131#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
132#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
133#define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
134 else immr->im_cpm.cp_pbdat &= ~PB_SDA
135#define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
136 else immr->im_cpm.cp_pbdat &= ~PB_SCL
137#define I2C_DELAY udelay(5)
138
139# define CONFIG_SYS_I2C_SPEED 50000
140# define CONFIG_SYS_I2C_SLAVE 0xFE
141# define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
142# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
143
144#define CONFIG_FEC_ENET 1
145#define CONFIG_MII 1
146
147#define CONFIG_SYS_DISCOVER_PHY
148
149
150
151
152
153#define CONFIG_BOOTP_BOOTFILESIZE
154#define CONFIG_BOOTP_BOOTPATH
155#define CONFIG_BOOTP_GATEWAY
156#define CONFIG_BOOTP_HOSTNAME
157
158
159
160
161
162#include <config_cmd_default.h>
163
164#define CONFIG_CMD_EEPROM
165#define CONFIG_CMD_JFFS2
166#define CONFIG_CMD_NAND
167#define CONFIG_CMD_DATE
168
169
170#define CONFIG_SYS_JFFS2_SORT_FRAGMENTS
171
172
173
174
175
176
177#undef CONFIG_CMD_MTDPARTS
178
179
180
181
182
183
184
185#define CONFIG_JFFS2_DEV "nand0"
186#define CONFIG_JFFS2_PART_SIZE 0x00200000
187#define CONFIG_JFFS2_PART_OFFSET 0x00000000
188
189
190
191
192
193
194
195
196
197
198#define CONFIG_NAND_LEGACY
199#define CONFIG_MTD_NAND_ECC_JFFS2
200#define CONFIG_SYS_MAX_NAND_DEVICE 1
201#define SECTORSIZE 512
202
203#define ADDR_COLUMN 1
204#define ADDR_PAGE 2
205#define ADDR_COLUMN_PAGE 3
206
207#define NAND_ChipID_UNKNOWN 0x00
208#define NAND_MAX_FLOORS 1
209
210
211#define NAND_WAIT_READY(nand) \
212 while (!(((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pcdat & 0x0008));
213#define WRITE_NAND_COMMAND(d, adr) WRITE_NAND((d), (adr))
214#define WRITE_NAND_ADDRESS(d, adr) WRITE_NAND((d), (adr))
215#define WRITE_NAND(d, adr) \
216 do { (*(volatile uint8_t *)(adr) = (uint8_t)(d)); } while (0)
217#define READ_NAND(adr) (*(volatile uint8_t *)(adr))
218#define CLE_LO 0x01
219#define ALE_LO 0x02
220#define CE_LO 0x04
221#define nand_setcr(cr, val) do {*(volatile uint8_t*)(cr) = (val);} while (0)
222#define NAND_DISABLE_CE(nand) \
223 nand_setcr((nand)->IO_ADDR + 1, ALE_LO | CLE_LO)
224#define NAND_ENABLE_CE(nand) \
225 nand_setcr((nand)->IO_ADDR + 1, CE_LO | ALE_LO | CLE_LO)
226#define NAND_CTL_CLRALE(nandptr) \
227 nand_setcr((nandptr) + 1, CE_LO | ALE_LO | CLE_LO)
228#define NAND_CTL_SETALE(nandptr) \
229 nand_setcr((nandptr) + 1, CE_LO | CLE_LO)
230#define NAND_CTL_CLRCLE(nandptr) \
231 nand_setcr((nandptr) + 1, CE_LO | ALE_LO | CLE_LO)
232#define NAND_CTL_SETCLE(nandptr) \
233 nand_setcr((nandptr) + 1, CE_LO | ALE_LO)
234
235
236
237
238#define CONFIG_SYS_LONGHELP
239#define CONFIG_SYS_PROMPT "=>"
240#if defined(CONFIG_CMD_KGDB)
241#define CONFIG_SYS_CBSIZE 1024
242#else
243#define CONFIG_SYS_CBSIZE 256
244#endif
245#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
246#define CONFIG_SYS_MAXARGS 16
247#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
248
249#define CONFIG_SYS_MEMTEST_START 0x0100000
250#define CONFIG_SYS_MEMTEST_END 0x0400000
251
252#define CONFIG_SYS_LOAD_ADDR 0x00100000
253
254#define CONFIG_SYS_HZ 1000
255
256#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
257
258
259
260
261
262
263
264
265
266#define CONFIG_SYS_IMMR 0xFF000000
267#define CONFIG_SYS_IMMR_SIZE ((uint)(64 * 1024))
268
269
270
271
272#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
273#define CONFIG_SYS_INIT_RAM_END 0x2F00
274#define CONFIG_SYS_GBL_DATA_SIZE 64
275#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
276#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
277
278
279
280
281
282
283#define CONFIG_SYS_SDRAM_BASE 0x00000000
284#define CONFIG_SYS_SRAM_BASE 0xF4000000
285#define CONFIG_SYS_SRAM_SIZE 0x04000000
286
287#define CONFIG_SYS_FLASH_BASE 0xF8000000
288#define CONFIG_SYS_FLASH_SIZE ((uint)(8 * 1024 * 1024))
289
290#define CONFIG_SYS_DFLASH_BASE 0xff020000
291#define CONFIG_SYS_DFLASH_SIZE 0x00010000
292
293#define CONFIG_SYS_FPGA_BASE 0xFF100000
294#define CONFIG_SYS_FPGA_PROG 0xFF130000
295#define CONFIG_SYS_FPGA_SIZE 0x00040000
296
297#define CONFIG_SYS_MONITOR_LEN (256 << 10)
298#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
299#define CONFIG_SYS_MALLOC_LEN (128 << 10)
300
301
302
303
304
305
306#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
307
308
309
310#define CONFIG_SYS_MAX_FLASH_BANKS 1
311
312
313
314#define CONFIG_SYS_MAX_FLASH_SECT 135
315
316#define CONFIG_SYS_FLASH_ERASE_TOUT 120000
317#define CONFIG_SYS_FLASH_WRITE_TOUT 500
318
319
320
321
322#define CONFIG_SYS_CACHELINE_SIZE 16
323#if defined(CONFIG_CMD_KGDB)
324#define CONFIG_SYS_CACHELINE_SHIFT 4
325#endif
326
327
328
329
330
331
332
333#if defined(CONFIG_WATCHDOG)
334#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
335 SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
336#else
337#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
338#endif
339
340
341
342
343
344
345#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
346
347
348
349
350
351
352#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
353
354
355
356
357
358
359#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
360
361
362
363
364
365
366#define CONFIG_SYS_PLPRCR (((MPC8XX_FACT-1) << PLPRCR_MF_SHIFT) | \
367 PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
368
369
370
371
372
373
374
375#define SCCR_MASK SCCR_EBDF11
376#define CONFIG_SYS_SCCR (SCCR_TBS|SCCR_COM00|SCCR_DFSYNC00|SCCR_DFBRG00|SCCR_DFNL000|SCCR_DFNH000|SCCR_DFLCD000|SCCR_DFALCD00)
377
378
379
380
381
382
383#define CONFIG_SYS_DER 0
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400#define CONFIG_SYS_PRELIM_OR0_AM 0xFC000000
401
402
403#define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX)
404
405#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR0_AM | CONFIG_SYS_OR_TIMING_FLASH)
406
407#define CONFIG_FLASH_16BIT
408#define CONFIG_SYS_BR0_PRELIM ((CONFIG_SYS_FLASH_BASE & BR_BA_MSK) | BR_PS_16 | BR_V )
409#define CONFIG_SYS_FLASH_PROTECTION
410
411
412
413
414
415#define CONFIG_SYS_OR_TIMING_FPGA \
416 (OR_CSNT_SAM | OR_ACS_DIV2 | OR_BI | OR_SCY_4_CLK | OR_EHTR | OR_TRLX)
417#define CONFIG_SYS_BR1_PRELIM ((CONFIG_SYS_FPGA_BASE & BR_BA_MSK) | BR_PS_8 | BR_V )
418#define CONFIG_SYS_OR1_PRELIM (((-CONFIG_SYS_FPGA_SIZE) & OR_AM_MSK) | CONFIG_SYS_OR_TIMING_FPGA)
419
420
421
422
423
424#define CONFIG_SYS_OR_TIMING_DFLASH \
425 (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_2_CLK | OR_EHTR | OR_TRLX)
426#define CONFIG_SYS_BR4_PRELIM ((CONFIG_SYS_DFLASH_BASE & BR_BA_MSK) | BR_PS_8 | BR_V )
427#define CONFIG_SYS_OR4_PRELIM (((-CONFIG_SYS_DFLASH_SIZE) & OR_AM_MSK) | CONFIG_SYS_OR_TIMING_DFLASH)
428
429
430
431
432#define CONFIG_SYS_DUART_SIZE 0x8000
433#define CONFIG_SYS_DUARTA_BASE 0xff010000
434#define CONFIG_SYS_DUARTB_BASE 0xff018000
435
436#define DUART_MBMR 0
437#define DUART_OR_VALUE (ORMASK(CONFIG_SYS_DUART_SIZE) | OR_G5LS| OR_BI)
438#define DUART_BR_VALUE (BR_MS_UPMB | BR_PS_8 | BR_V)
439#define DUART_BR5_VALUE ((CONFIG_SYS_DUARTA_BASE & BR_BA_MSK ) | DUART_BR_VALUE)
440#define DUART_BR6_VALUE ((CONFIG_SYS_DUARTB_BASE & BR_BA_MSK ) | DUART_BR_VALUE)
441
442
443
444
445
446#define BOOTFLAG_COLD 0x01
447#define BOOTFLAG_WARM 0x02
448
449#define CONFIG_RESET_ON_PANIC
450
451#define CONFIG_ENV_IS_IN_FLASH
452#ifdef CONFIG_ENV_IS_IN_FLASH
453
454 #define CONFIG_ENV_ADDR 0xF8040000
455 #define CONFIG_ENV_ADDR_REDUND 0xF8050000
456 #define CONFIG_ENV_SECT_SIZE 0x00010000
457 #define CONFIG_ENV_SIZE 0x00002000
458#else
459
460 #define CONFIG_ENV_IS_IN_EEPROM 1
461 #define CONFIG_ENV_OFFSET 0
462 #define CONFIG_ENV_SIZE 1024
463#endif
464
465#if 1
466#define CONFIG_AUTOBOOT_KEYED
467#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n", bootdelay
468#define CONFIG_AUTOBOOT_DELAY_STR "delayabit"
469#define CONFIG_AUTOBOOT_STOP_STR " "
470#endif
471
472#endif
473