blob: 8e007856be0485d2ddbf264d93f6709f95c0c4b5 [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>
Ben Warren8ca0b3f2008-08-31 10:45:44 -070025#include <netdev.h>
wdenk16f21702002-08-26 21:58:50 +000026#include "adciop.h"
27
28/* ------------------------------------------------------------------------- */
29
30#define _NOT_USED_ 0xFFFFFFFF
31
32/* ------------------------------------------------------------------------- */
33
34
wdenkc837dcb2004-01-20 23:12:12 +000035int board_early_init_f (void)
wdenk16f21702002-08-26 21:58:50 +000036{
37 /*
38 * Set port pin in escc2 to keep living, and configure user led output
39 */
40 *(unsigned char *) 0x2000033e = 0x77; /* ESCC2: PCR bit3=pwr on, bit7=led out */
41 *(unsigned char *) 0x2000033c = 0x88; /* ESCC2: PVR pwr on, led off */
42
43 /*
44 * Init pci regs
45 */
46 *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */
47 *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */
48 *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */
49 *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */
50 *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */
51 *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */
52 *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */
53
54 return 0;
55}
56
57
58/*
59 * Check Board Identity:
60 */
61
62int checkboard (void)
63{
Wolfgang Denk77ddac92005-10-13 16:45:02 +020064 char str[64];
Wolfgang Denkcdb74972010-07-24 21:55:43 +020065 int i = getenv_f("serial#", str, sizeof (str));
wdenk16f21702002-08-26 21:58:50 +000066
67 puts ("Board: ");
68
69 if (!i || strncmp (str, "ADCIOP", 6)) {
70 puts ("### No HW ID - assuming ADCIOP\n");
71 return (1);
72 }
73
74 puts (str);
75
76 putc ('\n');
77
78 return 0;
79}
80
81/* ------------------------------------------------------------------------- */
82
Becky Bruce9973e3c2008-06-09 16:03:40 -050083phys_size_t initdram (int board_type)
wdenk16f21702002-08-26 21:58:50 +000084{
85 return (16 * 1024 * 1024);
86}
87
88/* ------------------------------------------------------------------------- */
89
90int testdram (void)
91{
92 /* TODO: XXX XXX XXX */
93 printf ("test: 16 MB - ok\n");
94
95 return (0);
96}
97
98/* ------------------------------------------------------------------------- */
Ben Warren8ca0b3f2008-08-31 10:45:44 -070099
100int board_eth_init(bd_t *bis)
101{
102 return pci_eth_init(bis);
103}