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 | * |
| 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 Warren | 8ca0b3f | 2008-08-31 10:45:44 -0700 | [diff] [blame^] | 25 | #include <netdev.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 26 | #include "adciop.h" |
| 27 | |
| 28 | /* ------------------------------------------------------------------------- */ |
| 29 | |
| 30 | #define _NOT_USED_ 0xFFFFFFFF |
| 31 | |
| 32 | /* ------------------------------------------------------------------------- */ |
| 33 | |
| 34 | |
wdenk | c837dcb | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 35 | int board_early_init_f (void) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 36 | { |
| 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 | |
| 62 | int checkboard (void) |
| 63 | { |
Wolfgang Denk | 77ddac9 | 2005-10-13 16:45:02 +0200 | [diff] [blame] | 64 | char str[64]; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 65 | int i = getenv_r ("serial#", str, sizeof (str)); |
| 66 | |
| 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 Bruce | 9973e3c | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 83 | phys_size_t initdram (int board_type) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 84 | { |
| 85 | return (16 * 1024 * 1024); |
| 86 | } |
| 87 | |
| 88 | /* ------------------------------------------------------------------------- */ |
| 89 | |
| 90 | int testdram (void) |
| 91 | { |
| 92 | /* TODO: XXX XXX XXX */ |
| 93 | printf ("test: 16 MB - ok\n"); |
| 94 | |
| 95 | return (0); |
| 96 | } |
| 97 | |
| 98 | /* ------------------------------------------------------------------------- */ |
Ben Warren | 8ca0b3f | 2008-08-31 10:45:44 -0700 | [diff] [blame^] | 99 | |
| 100 | int board_eth_init(bd_t *bis) |
| 101 | { |
| 102 | return pci_eth_init(bis); |
| 103 | } |