wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
Ben Warren | 8ca0b3f | 2008-08-31 10:45:44 -0700 | [diff] [blame] | 9 | #include <netdev.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 10 | #include "adciop.h" |
| 11 | |
| 12 | /* ------------------------------------------------------------------------- */ |
| 13 | |
| 14 | #define _NOT_USED_ 0xFFFFFFFF |
| 15 | |
| 16 | /* ------------------------------------------------------------------------- */ |
| 17 | |
| 18 | |
wdenk | c837dcb | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 19 | int board_early_init_f (void) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 20 | { |
| 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 | |
| 46 | int checkboard (void) |
| 47 | { |
Wolfgang Denk | 77ddac9 | 2005-10-13 16:45:02 +0200 | [diff] [blame] | 48 | char str[64]; |
Wolfgang Denk | cdb7497 | 2010-07-24 21:55:43 +0200 | [diff] [blame] | 49 | int i = getenv_f("serial#", str, sizeof (str)); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 50 | |
| 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 Bruce | 9973e3c | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 67 | phys_size_t initdram (int board_type) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 68 | { |
| 69 | return (16 * 1024 * 1024); |
| 70 | } |
| 71 | |
| 72 | /* ------------------------------------------------------------------------- */ |
| 73 | |
| 74 | int testdram (void) |
| 75 | { |
| 76 | /* TODO: XXX XXX XXX */ |
| 77 | printf ("test: 16 MB - ok\n"); |
| 78 | |
| 79 | return (0); |
| 80 | } |
| 81 | |
| 82 | /* ------------------------------------------------------------------------- */ |
Ben Warren | 8ca0b3f | 2008-08-31 10:45:44 -0700 | [diff] [blame] | 83 | |
| 84 | int board_eth_init(bd_t *bis) |
| 85 | { |
| 86 | return pci_eth_init(bis); |
| 87 | } |