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