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