wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 1 | /* |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 2 | * (C) Copyright 2000-2006 |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 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 | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /* |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 9 | * CPU specific code for the MPC825x / MPC826x / MPC827x / MPC828x |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 10 | * |
| 11 | * written or collected and sometimes rewritten by |
| 12 | * Magnus Damm <damm@bitsmart.com> |
| 13 | * |
wdenk | 4532cb6 | 2003-04-27 22:52:51 +0000 | [diff] [blame] | 14 | * modified by |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 15 | * Wolfgang Denk <wd@denx.de> |
| 16 | * |
| 17 | * modified for 8260 by |
| 18 | * Murray Jensen <Murray.Jensen@cmst.csiro.au> |
| 19 | * |
| 20 | * added 8260 masks by |
| 21 | * Marius Groeger <mag@sysgo.de> |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 22 | * |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 23 | * added HiP7 (824x/827x/8280) processors support by |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 24 | * Yuli Barcohen <yuli@arabellasw.com> |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 25 | */ |
| 26 | |
| 27 | #include <common.h> |
| 28 | #include <watchdog.h> |
| 29 | #include <command.h> |
| 30 | #include <mpc8260.h> |
Ben Warren | 3456a14 | 2008-10-22 23:20:29 -0700 | [diff] [blame] | 31 | #include <netdev.h> |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 32 | #include <asm/processor.h> |
| 33 | #include <asm/cpm_8260.h> |
| 34 | |
Sergej Stepanov | c9e7b9b | 2007-10-17 11:13:51 +0200 | [diff] [blame] | 35 | #if defined(CONFIG_OF_LIBFDT) |
| 36 | #include <libfdt.h> |
Kumar Gala | e93becf | 2007-11-03 19:46:28 -0500 | [diff] [blame] | 37 | #include <fdt_support.h> |
Sergej Stepanov | c9e7b9b | 2007-10-17 11:13:51 +0200 | [diff] [blame] | 38 | #endif |
| 39 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 40 | DECLARE_GLOBAL_DATA_PTR; |
| 41 | |
Heiko Schocher | fa23044 | 2006-12-21 17:17:02 +0100 | [diff] [blame] | 42 | #if defined(CONFIG_GET_CPU_STR_F) |
| 43 | extern int get_cpu_str_f (char *buf); |
| 44 | #endif |
| 45 | |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 46 | int checkcpu (void) |
| 47 | { |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 48 | volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 49 | ulong clock = gd->cpu_clk; |
| 50 | uint pvr = get_pvr (); |
| 51 | uint immr, rev, m, k; |
| 52 | char buf[32]; |
| 53 | |
| 54 | puts ("CPU: "); |
| 55 | |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 56 | switch (pvr) { |
| 57 | case PVR_8260: |
| 58 | case PVR_8260_HIP3: |
| 59 | k = 3; |
| 60 | break; |
| 61 | case PVR_8260_HIP4: |
| 62 | k = 4; |
| 63 | break; |
wdenk | 5779d8d | 2003-12-06 23:55:10 +0000 | [diff] [blame] | 64 | case PVR_8260_HIP7R1: |
wdenk | e1599e8 | 2004-10-10 23:27:33 +0000 | [diff] [blame] | 65 | case PVR_8260_HIP7RA: |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 66 | case PVR_8260_HIP7: |
| 67 | k = 7; |
| 68 | break; |
| 69 | default: |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 70 | return -1; /* whoops! not an MPC8260 */ |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 71 | } |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 72 | rev = pvr & 0xff; |
| 73 | |
| 74 | immr = immap->im_memctl.memc_immr; |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 75 | if ((immr & IMMR_ISB_MSK) != CONFIG_SYS_IMMR) |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 76 | return -1; /* whoops! someone moved the IMMR */ |
| 77 | |
Heiko Schocher | fa23044 | 2006-12-21 17:17:02 +0100 | [diff] [blame] | 78 | #if defined(CONFIG_GET_CPU_STR_F) |
| 79 | get_cpu_str_f (buf); |
| 80 | printf ("%s (HiP%d Rev %02x, Mask ", buf, k, rev); |
| 81 | #else |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 82 | printf (CPU_ID_STR " (HiP%d Rev %02x, Mask ", k, rev); |
Heiko Schocher | fa23044 | 2006-12-21 17:17:02 +0100 | [diff] [blame] | 83 | #endif |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 84 | |
| 85 | /* |
| 86 | * the bottom 16 bits of the immr are the Part Number and Mask Number |
| 87 | * (4-34); the 16 bits at PROFF_REVNUM (0x8af0) in dual port ram is the |
| 88 | * RISC Microcode Revision Number (13-10). |
| 89 | * For the 8260, Motorola doesn't include the Microcode Revision |
| 90 | * in the mask. |
| 91 | */ |
| 92 | m = immr & (IMMR_PARTNUM_MSK | IMMR_MASKNUM_MSK); |
Scott Wood | a166fbc | 2013-05-17 20:01:54 -0500 | [diff] [blame] | 93 | k = immap->im_dprambase16[PROFF_REVNUM / sizeof(u16)]; |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 94 | |
| 95 | switch (m) { |
| 96 | case 0x0000: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 97 | puts ("0.2 2J24M"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 98 | break; |
| 99 | case 0x0010: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 100 | puts ("A.0 K22A"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 101 | break; |
| 102 | case 0x0011: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 103 | puts ("A.1 1K22A-XC"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 104 | break; |
| 105 | case 0x0001: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 106 | puts ("B.1 1K23A"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 107 | break; |
| 108 | case 0x0021: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 109 | puts ("B.2 2K23A-XC"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 110 | break; |
| 111 | case 0x0023: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 112 | puts ("B.3 3K23A"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 113 | break; |
| 114 | case 0x0024: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 115 | puts ("C.2 6K23A"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 116 | break; |
| 117 | case 0x0060: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 118 | puts ("A.0(A) 2K25A"); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 119 | break; |
wdenk | 4532cb6 | 2003-04-27 22:52:51 +0000 | [diff] [blame] | 120 | case 0x0062: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 121 | puts ("B.1 4K25A"); |
wdenk | 4532cb6 | 2003-04-27 22:52:51 +0000 | [diff] [blame] | 122 | break; |
wdenk | 54387ac | 2003-10-08 22:45:44 +0000 | [diff] [blame] | 123 | case 0x0064: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 124 | puts ("C.0 5K25A"); |
wdenk | 54387ac | 2003-10-08 22:45:44 +0000 | [diff] [blame] | 125 | break; |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 126 | case 0x0A00: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 127 | puts ("0.0 0K49M"); |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 128 | break; |
| 129 | case 0x0A01: |
wdenk | 4b9206e | 2004-03-23 22:14:11 +0000 | [diff] [blame] | 130 | puts ("0.1 1K49M"); |
wdenk | 8564acf | 2003-07-14 22:13:32 +0000 | [diff] [blame] | 131 | break; |
wdenk | e1599e8 | 2004-10-10 23:27:33 +0000 | [diff] [blame] | 132 | case 0x0A10: |
| 133 | puts ("1.0 1K49M"); |
| 134 | break; |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 135 | case 0x0C00: |
wdenk | e1599e8 | 2004-10-10 23:27:33 +0000 | [diff] [blame] | 136 | puts ("0.0 0K50M"); |
| 137 | break; |
| 138 | case 0x0C10: |
Wolfgang Denk | d980a16 | 2005-08-06 02:03:03 +0200 | [diff] [blame] | 139 | puts ("1.0 1K50M"); |
wdenk | e1599e8 | 2004-10-10 23:27:33 +0000 | [diff] [blame] | 140 | break; |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 141 | case 0x0D00: |
wdenk | e1599e8 | 2004-10-10 23:27:33 +0000 | [diff] [blame] | 142 | puts ("0.0 0K50M"); |
| 143 | break; |
| 144 | case 0x0D10: |
Wolfgang Denk | d980a16 | 2005-08-06 02:03:03 +0200 | [diff] [blame] | 145 | puts ("1.0 1K50M"); |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 146 | break; |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 147 | default: |
| 148 | printf ("unknown [immr=0x%04x,k=0x%04x]", m, k); |
| 149 | break; |
| 150 | } |
| 151 | |
| 152 | printf (") at %s MHz\n", strmhz (buf, clock)); |
| 153 | |
| 154 | return 0; |
| 155 | } |
| 156 | |
| 157 | /* ------------------------------------------------------------------------- */ |
| 158 | /* configures a UPM by writing into the UPM RAM array */ |
| 159 | /* uses bank 11 and a dummy physical address (=BRx_BA_MSK) */ |
| 160 | /* NOTE: the physical address chosen must not overlap into any other area */ |
| 161 | /* mapped by the memory controller because bank 11 has the lowest priority */ |
| 162 | |
| 163 | void upmconfig (uint upm, uint * table, uint size) |
| 164 | { |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 165 | volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 166 | volatile memctl8260_t *memctl = &immap->im_memctl; |
| 167 | volatile uchar *dummy = (uchar *) BRx_BA_MSK; /* set all BA bits */ |
| 168 | uint i; |
| 169 | |
| 170 | /* first set up bank 11 to reference the correct UPM at a dummy address */ |
| 171 | |
| 172 | memctl->memc_or11 = ORxU_AM_MSK; /* set all AM bits */ |
| 173 | |
| 174 | switch (upm) { |
| 175 | |
| 176 | case UPMA: |
| 177 | memctl->memc_br11 = |
| 178 | ((uint)dummy & BRx_BA_MSK) | BRx_PS_32 | BRx_MS_UPMA | |
| 179 | BRx_V; |
| 180 | memctl->memc_mamr = MxMR_OP_WARR; |
| 181 | break; |
| 182 | |
| 183 | case UPMB: |
| 184 | memctl->memc_br11 = |
| 185 | ((uint)dummy & BRx_BA_MSK) | BRx_PS_32 | BRx_MS_UPMB | |
| 186 | BRx_V; |
| 187 | memctl->memc_mbmr = MxMR_OP_WARR; |
| 188 | break; |
| 189 | |
| 190 | case UPMC: |
| 191 | memctl->memc_br11 = |
| 192 | ((uint)dummy & BRx_BA_MSK) | BRx_PS_32 | BRx_MS_UPMC | |
| 193 | BRx_V; |
| 194 | memctl->memc_mcmr = MxMR_OP_WARR; |
| 195 | break; |
| 196 | |
| 197 | default: |
| 198 | panic ("upmconfig passed invalid UPM number (%u)\n", upm); |
| 199 | break; |
| 200 | |
| 201 | } |
| 202 | |
| 203 | /* |
| 204 | * at this point, the dummy address is set up to access the selected UPM, |
| 205 | * the MAD pointer is zero, and the MxMR OP is set for writing to RAM |
| 206 | * |
| 207 | * now we simply load the mdr with each word and poke the dummy address. |
| 208 | * the MAD is incremented on each access. |
| 209 | */ |
| 210 | |
| 211 | for (i = 0; i < size; i++) { |
| 212 | memctl->memc_mdr = table[i]; |
| 213 | *dummy = 0; |
| 214 | } |
| 215 | |
| 216 | /* now kill bank 11 */ |
| 217 | memctl->memc_br11 = 0; |
| 218 | } |
| 219 | |
| 220 | /* ------------------------------------------------------------------------- */ |
| 221 | |
wdenk | ba91e26 | 2005-05-30 23:55:42 +0000 | [diff] [blame] | 222 | #if !defined(CONFIG_HAVE_OWN_RESET) |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 223 | int |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 224 | do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 225 | { |
| 226 | ulong msr, addr; |
| 227 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 228 | volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 229 | |
| 230 | immap->im_clkrst.car_rmr = RMR_CSRE; /* Checkstop Reset enable */ |
| 231 | |
| 232 | /* Interrupts and MMU off */ |
| 233 | __asm__ __volatile__ ("mfmsr %0":"=r" (msr):); |
| 234 | |
| 235 | msr &= ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR); |
| 236 | __asm__ __volatile__ ("mtmsr %0"::"r" (msr)); |
| 237 | |
| 238 | /* |
| 239 | * Trying to execute the next instruction at a non-existing address |
| 240 | * should cause a machine check, resulting in reset |
| 241 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 242 | #ifdef CONFIG_SYS_RESET_ADDRESS |
| 243 | addr = CONFIG_SYS_RESET_ADDRESS; |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 244 | #else |
| 245 | /* |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 246 | * note: when CONFIG_SYS_MONITOR_BASE points to a RAM address, CONFIG_SYS_MONITOR_BASE |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 247 | * - sizeof (ulong) is usually a valid address. Better pick an address |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 248 | * known to be invalid on your system and assign it to CONFIG_SYS_RESET_ADDRESS. |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 249 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 250 | addr = CONFIG_SYS_MONITOR_BASE - sizeof (ulong); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 251 | #endif |
| 252 | ((void (*)(void)) addr) (); |
| 253 | return 1; |
| 254 | |
| 255 | } |
wdenk | ba91e26 | 2005-05-30 23:55:42 +0000 | [diff] [blame] | 256 | #endif /* CONFIG_HAVE_OWN_RESET */ |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 257 | |
| 258 | /* ------------------------------------------------------------------------- */ |
| 259 | |
| 260 | /* |
| 261 | * Get timebase clock frequency (like cpu_clk in Hz) |
| 262 | * |
| 263 | */ |
| 264 | unsigned long get_tbclk (void) |
| 265 | { |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 266 | ulong tbclk; |
| 267 | |
| 268 | tbclk = (gd->bus_clk + 3L) / 4L; |
| 269 | |
| 270 | return (tbclk); |
| 271 | } |
| 272 | |
| 273 | /* ------------------------------------------------------------------------- */ |
| 274 | |
| 275 | #if defined(CONFIG_WATCHDOG) |
| 276 | void watchdog_reset (void) |
| 277 | { |
| 278 | int re_enable = disable_interrupts (); |
| 279 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 280 | reset_8260_watchdog ((immap_t *) CONFIG_SYS_IMMR); |
wdenk | 4a9cbbe | 2002-08-27 09:48:53 +0000 | [diff] [blame] | 281 | if (re_enable) |
| 282 | enable_interrupts (); |
| 283 | } |
| 284 | #endif /* CONFIG_WATCHDOG */ |
| 285 | |
| 286 | /* ------------------------------------------------------------------------- */ |
Marian Balakowicz | 75d3e8f | 2008-02-21 17:20:18 +0100 | [diff] [blame] | 287 | #if defined(CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP) |
Sergej Stepanov | c9e7b9b | 2007-10-17 11:13:51 +0200 | [diff] [blame] | 288 | void ft_cpu_setup (void *blob, bd_t *bd) |
| 289 | { |
Esben Haabendal | ee4ae38 | 2008-06-18 11:03:57 +0200 | [diff] [blame] | 290 | #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\ |
| 291 | defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) |
Kumar Gala | ba37aa0 | 2008-08-19 15:41:18 -0500 | [diff] [blame] | 292 | fdt_fixup_ethernet(blob); |
Esben Haabendal | ee4ae38 | 2008-06-18 11:03:57 +0200 | [diff] [blame] | 293 | #endif |
| 294 | |
Scott Wood | 3a671fc | 2009-04-02 16:10:36 -0500 | [diff] [blame] | 295 | do_fixup_by_compat_u32(blob, "fsl,cpm2-brg", |
| 296 | "clock-frequency", bd->bi_brgfreq, 1); |
| 297 | |
Wolfgang Denk | fe6da48 | 2009-05-12 15:17:35 +0200 | [diff] [blame] | 298 | do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, |
| 299 | "bus-frequency", bd->bi_busfreq, 1); |
| 300 | do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, |
| 301 | "timebase-frequency", OF_TBCLK, 1); |
| 302 | do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, |
| 303 | "clock-frequency", bd->bi_intfreq, 1); |
Marcel Ziswiler | cada315 | 2009-10-01 23:55:17 +0200 | [diff] [blame] | 304 | fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); |
Sergej Stepanov | c9e7b9b | 2007-10-17 11:13:51 +0200 | [diff] [blame] | 305 | } |
| 306 | #endif /* CONFIG_OF_LIBFDT */ |
Ben Warren | 3456a14 | 2008-10-22 23:20:29 -0700 | [diff] [blame] | 307 | |
| 308 | /* |
| 309 | * Initializes on-chip ethernet controllers. |
| 310 | * to override, implement board_eth_init() |
| 311 | */ |
| 312 | int cpu_eth_init(bd_t *bis) |
| 313 | { |
| 314 | #if defined(CONFIG_ETHER_ON_FCC) |
| 315 | fec_initialize(bis); |
| 316 | #endif |
Gary Jennejohn | ba705b5 | 2008-11-20 12:28:38 +0100 | [diff] [blame] | 317 | #if defined(CONFIG_ETHER_ON_SCC) |
ksi@koi8.net | 2bc2a8f | 2009-02-06 16:27:55 -0800 | [diff] [blame] | 318 | mpc82xx_scc_enet_initialize(bis); |
Gary Jennejohn | ba705b5 | 2008-11-20 12:28:38 +0100 | [diff] [blame] | 319 | #endif |
Ben Warren | 3456a14 | 2008-10-22 23:20:29 -0700 | [diff] [blame] | 320 | return 0; |
| 321 | } |