blob: b3d637e0a2349fca908b530d6630c292f1179703 [file] [log] [blame]
wdenk16f21702002-08-26 21:58:50 +00001/*
2 * (C) Copyright 2000
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk16f21702002-08-26 21:58:50 +00006 */
7
8#include <common.h>
Ben Warren8ca0b3f2008-08-31 10:45:44 -07009#include <netdev.h>
wdenk16f21702002-08-26 21:58:50 +000010#include "adciop.h"
11
12/* ------------------------------------------------------------------------- */
13
14#define _NOT_USED_ 0xFFFFFFFF
15
16/* ------------------------------------------------------------------------- */
17
18
wdenkc837dcb2004-01-20 23:12:12 +000019int board_early_init_f (void)
wdenk16f21702002-08-26 21:58:50 +000020{
21 /*
22 * Set port pin in escc2 to keep living, and configure user led output
23 */
24 *(unsigned char *) 0x2000033e = 0x77; /* ESCC2: PCR bit3=pwr on, bit7=led out */
25 *(unsigned char *) 0x2000033c = 0x88; /* ESCC2: PVR pwr on, led off */
26
27 /*
28 * Init pci regs
29 */
30 *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */
31 *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */
32 *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */
33 *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */
34 *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */
35 *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */
36 *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */
37
38 return 0;
39}
40
41
42/*
43 * Check Board Identity:
44 */
45
46int checkboard (void)
47{
Wolfgang Denk77ddac92005-10-13 16:45:02 +020048 char str[64];
Wolfgang Denkcdb74972010-07-24 21:55:43 +020049 int i = getenv_f("serial#", str, sizeof (str));
wdenk16f21702002-08-26 21:58:50 +000050
51 puts ("Board: ");
52
53 if (!i || strncmp (str, "ADCIOP", 6)) {
54 puts ("### No HW ID - assuming ADCIOP\n");
55 return (1);
56 }
57
58 puts (str);
59
60 putc ('\n');
61
62 return 0;
63}
64
65/* ------------------------------------------------------------------------- */
66
Becky Bruce9973e3c2008-06-09 16:03:40 -050067phys_size_t initdram (int board_type)
wdenk16f21702002-08-26 21:58:50 +000068{
69 return (16 * 1024 * 1024);
70}
71
72/* ------------------------------------------------------------------------- */
73
74int testdram (void)
75{
76 /* TODO: XXX XXX XXX */
77 printf ("test: 16 MB - ok\n");
78
79 return (0);
80}
81
82/* ------------------------------------------------------------------------- */
Ben Warren8ca0b3f2008-08-31 10:45:44 -070083
84int board_eth_init(bd_t *bis)
85{
86 return pci_eth_init(bis);
87}