blob: 0f655b78a5f0e79d99df92f216d842855df67e02 [file] [log] [blame]
wdenk16f21702002-08-26 21:58:50 +00001/*
2 * (C) Copyright 2000
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#include <common.h>
25#include "adciop.h"
26
27/* ------------------------------------------------------------------------- */
28
29#define _NOT_USED_ 0xFFFFFFFF
30
31/* ------------------------------------------------------------------------- */
32
33
wdenkda55c6e2004-01-20 23:12:12 +000034int board_early_init_f (void)
wdenk16f21702002-08-26 21:58:50 +000035{
36 /*
37 * Set port pin in escc2 to keep living, and configure user led output
38 */
39 *(unsigned char *) 0x2000033e = 0x77; /* ESCC2: PCR bit3=pwr on, bit7=led out */
40 *(unsigned char *) 0x2000033c = 0x88; /* ESCC2: PVR pwr on, led off */
41
42 /*
43 * Init pci regs
44 */
45 *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */
46 *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */
47 *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */
48 *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */
49 *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */
50 *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */
51 *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */
52
53 return 0;
54}
55
56
57/*
58 * Check Board Identity:
59 */
60
61int checkboard (void)
62{
Wolfgang Denk7fb52662005-10-13 16:45:02 +020063 char str[64];
wdenk16f21702002-08-26 21:58:50 +000064 int i = getenv_r ("serial#", str, sizeof (str));
65
66 puts ("Board: ");
67
68 if (!i || strncmp (str, "ADCIOP", 6)) {
69 puts ("### No HW ID - assuming ADCIOP\n");
70 return (1);
71 }
72
73 puts (str);
74
75 putc ('\n');
76
77 return 0;
78}
79
80/* ------------------------------------------------------------------------- */
81
Becky Brucebd99ae72008-06-09 16:03:40 -050082phys_size_t initdram (int board_type)
wdenk16f21702002-08-26 21:58:50 +000083{
84 return (16 * 1024 * 1024);
85}
86
87/* ------------------------------------------------------------------------- */
88
89int testdram (void)
90{
91 /* TODO: XXX XXX XXX */
92 printf ("test: 16 MB - ok\n");
93
94 return (0);
95}
96
97/* ------------------------------------------------------------------------- */