Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2003 |
| 4 | * Josef Baumgartner <josef.baumgartner@telex.de> |
| 5 | * |
Heiko Schocher | ac1956e | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 6 | * MCF5282 additionals |
| 7 | * (C) Copyright 2005 |
| 8 | * BuS Elektronik GmbH & Co. KG <esw@bus-elektronik.de> |
| 9 | * |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 10 | * MCF5275 additions |
| 11 | * Copyright (C) 2008 Arthur Shipkowski (art@videon-central.com) |
| 12 | * |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 13 | * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 14 | */ |
| 15 | |
Simon Glass | 9758973 | 2020-05-10 11:40:02 -0600 | [diff] [blame] | 16 | #include <init.h> |
Simon Glass | 274e0b0 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 17 | #include <net.h> |
Simon Glass | f5c208d | 2019-11-14 12:57:20 -0700 | [diff] [blame] | 18 | #include <vsprintf.h> |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 19 | #include <command.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 20 | #include <asm/global_data.h> |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 21 | #include <asm/immap.h> |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 22 | #include <asm/io.h> |
Ben Warren | 2f2b6b6 | 2008-08-31 22:22:04 -0700 | [diff] [blame] | 23 | #include <netdev.h> |
Simon Glass | dbd7954 | 2020-05-10 11:40:11 -0600 | [diff] [blame] | 24 | #include <linux/delay.h> |
Richard Retanubun | 5ffa65b | 2009-10-26 14:19:17 -0400 | [diff] [blame] | 25 | #include "cpu.h" |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 26 | |
TsiChung Liew | b354aef | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 27 | DECLARE_GLOBAL_DATA_PTR; |
| 28 | |
| 29 | #ifdef CONFIG_M5208 |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 30 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
TsiChung Liew | b354aef | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 31 | { |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 32 | rcm_t *rcm = (rcm_t *)(MMAP_RCM); |
TsiChung Liew | b354aef | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 33 | |
| 34 | udelay(1000); |
| 35 | |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 36 | out_8(&rcm->rcr, RCM_RCR_SOFTRST); |
TsiChung Liew | b354aef | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 37 | |
| 38 | /* we don't return! */ |
| 39 | return 0; |
| 40 | }; |
| 41 | |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 42 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 43 | int print_cpuinfo(void) |
TsiChung Liew | b354aef | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 44 | { |
| 45 | char buf1[32], buf2[32]; |
| 46 | |
| 47 | printf("CPU: Freescale Coldfire MCF5208\n" |
| 48 | " CPU CLK %s MHz BUS CLK %s MHz\n", |
| 49 | strmhz(buf1, gd->cpu_clk), |
| 50 | strmhz(buf2, gd->bus_clk)); |
| 51 | return 0; |
| 52 | }; |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 53 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
Angelo Dureghello | 4a7039f | 2023-06-24 23:22:23 +0200 | [diff] [blame] | 54 | #endif /* #ifdef CONFIG_M5208 */ |
TsiChung Liew | b354aef | 2009-06-12 11:29:00 +0000 | [diff] [blame] | 55 | |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 56 | #ifdef CONFIG_M5271 |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 57 | #if defined(CONFIG_DISPLAY_CPUINFO) |
Bartlomiej Sieka | ad87026 | 2007-01-23 13:25:22 +0100 | [diff] [blame] | 58 | /* |
| 59 | * Both MCF5270 and MCF5271 are members of the MPC5271 family. Try to |
| 60 | * determine which one we are running on, based on the Chip Identification |
| 61 | * Register (CIR). |
| 62 | */ |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 63 | int print_cpuinfo(void) |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 64 | { |
Marian Balakowicz | ecb6d0b | 2006-05-09 11:45:31 +0200 | [diff] [blame] | 65 | char buf[32]; |
Bartlomiej Sieka | ad87026 | 2007-01-23 13:25:22 +0100 | [diff] [blame] | 66 | unsigned short cir; /* Chip Identification Register */ |
| 67 | unsigned short pin; /* Part identification number */ |
| 68 | unsigned char prn; /* Part revision number */ |
| 69 | char *cpu_model; |
| 70 | |
| 71 | cir = mbar_readShort(MCF_CCM_CIR); |
| 72 | pin = cir >> MCF_CCM_CIR_PIN_LEN; |
| 73 | prn = cir & MCF_CCM_CIR_PRN_MASK; |
| 74 | |
| 75 | switch (pin) { |
| 76 | case MCF_CCM_CIR_PIN_MCF5270: |
| 77 | cpu_model = "5270"; |
| 78 | break; |
| 79 | case MCF_CCM_CIR_PIN_MCF5271: |
| 80 | cpu_model = "5271"; |
| 81 | break; |
| 82 | default: |
| 83 | cpu_model = NULL; |
| 84 | break; |
| 85 | } |
| 86 | |
| 87 | if (cpu_model) |
| 88 | printf("CPU: Freescale ColdFire MCF%s rev. %hu, at %s MHz\n", |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 89 | cpu_model, prn, strmhz(buf, CFG_SYS_CLK)); |
Bartlomiej Sieka | ad87026 | 2007-01-23 13:25:22 +0100 | [diff] [blame] | 90 | else |
| 91 | printf("CPU: Unknown - Freescale ColdFire MCF5271 family" |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 92 | " (PIN: 0x%x) rev. %hu, at %s MHz\n", |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 93 | pin, prn, strmhz(buf, CFG_SYS_CLK)); |
Marian Balakowicz | ecb6d0b | 2006-05-09 11:45:31 +0200 | [diff] [blame] | 94 | |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 95 | return 0; |
| 96 | } |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 97 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 98 | |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 99 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 100 | { |
Richard Retanubun | 5ffa65b | 2009-10-26 14:19:17 -0400 | [diff] [blame] | 101 | /* Call the board specific reset actions first. */ |
| 102 | if(board_reset) { |
| 103 | board_reset(); |
| 104 | } |
| 105 | |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 106 | mbar_writeByte(MCF_RCM_RCR, |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 107 | MCF_RCM_RCR_SOFTRST | MCF_RCM_RCR_FRCRSTOUT); |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 108 | return 0; |
| 109 | }; |
| 110 | |
Zachary P. Landau | 0bba862 | 2006-01-26 17:35:56 -0500 | [diff] [blame] | 111 | #endif |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 112 | |
| 113 | #ifdef CONFIG_M5272 |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 114 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 115 | { |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 116 | wdog_t *wdp = (wdog_t *) (MMAP_WDOG); |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 117 | |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 118 | out_be16(&wdp->wdog_wrrr, 0); |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 119 | udelay(1000); |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 120 | |
| 121 | /* enable watchdog, set timeout to 0 and wait */ |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 122 | out_be16(&wdp->wdog_wrrr, 1); |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 123 | while (1) ; |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 124 | |
| 125 | /* we don't return! */ |
| 126 | return 0; |
| 127 | }; |
| 128 | |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 129 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 130 | int print_cpuinfo(void) |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 131 | { |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 132 | sysctrl_t *sysctrl = (sysctrl_t *) (MMAP_CFG); |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 133 | uchar msk; |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 134 | char *suf; |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 135 | |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 136 | puts("CPU: "); |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 137 | msk = (in_be32(&sysctrl->sc_dir) > 28) & 0xf; |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 138 | switch (msk) { |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 139 | case 0x2: |
| 140 | suf = "1K75N"; |
| 141 | break; |
| 142 | case 0x4: |
| 143 | suf = "3K75N"; |
| 144 | break; |
| 145 | default: |
| 146 | suf = NULL; |
| 147 | printf("Freescale MCF5272 (Mask:%01x)\n", msk); |
| 148 | break; |
| 149 | } |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 150 | |
| 151 | if (suf) |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 152 | printf("Freescale MCF5272 %s\n", suf); |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 153 | return 0; |
| 154 | }; |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 155 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 156 | |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 157 | #endif /* #ifdef CONFIG_M5272 */ |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 158 | |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 159 | #ifdef CONFIG_M5275 |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 160 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 161 | { |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 162 | rcm_t *rcm = (rcm_t *)(MMAP_RCM); |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 163 | |
| 164 | udelay(1000); |
| 165 | |
Alison Wang | 95bed1f | 2012-03-26 21:49:04 +0000 | [diff] [blame] | 166 | out_8(&rcm->rcr, RCM_RCR_SOFTRST); |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 167 | |
| 168 | /* we don't return! */ |
| 169 | return 0; |
| 170 | }; |
| 171 | |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 172 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 173 | int print_cpuinfo(void) |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 174 | { |
| 175 | char buf[32]; |
| 176 | |
| 177 | printf("CPU: Freescale Coldfire MCF5275 at %s MHz\n", |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 178 | strmhz(buf, CFG_SYS_CLK)); |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 179 | return 0; |
| 180 | }; |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 181 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 182 | |
Matthew Fettke | 761e2e9 | 2008-02-04 15:38:20 -0600 | [diff] [blame] | 183 | #endif /* #ifdef CONFIG_M5275 */ |
| 184 | |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 185 | #ifdef CONFIG_M5282 |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 186 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 187 | int print_cpuinfo(void) |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 188 | { |
Wolfgang Denk | b4b1c46 | 2006-06-10 19:27:47 +0200 | [diff] [blame] | 189 | unsigned char resetsource = MCFRESET_RSR; |
Heiko Schocher | ac1956e | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 190 | |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 191 | printf("CPU: Freescale Coldfire MCF5282 (PIN: %2.2x REV: %2.2x)\n", |
| 192 | MCFCCM_CIR >> 8, MCFCCM_CIR & MCFCCM_CIR_PRN_MASK); |
| 193 | printf("Reset:%s%s%s%s%s%s%s\n", |
| 194 | (resetsource & MCFRESET_RSR_LOL) ? " Loss of Lock" : "", |
| 195 | (resetsource & MCFRESET_RSR_LOC) ? " Loss of Clock" : "", |
| 196 | (resetsource & MCFRESET_RSR_EXT) ? " External" : "", |
| 197 | (resetsource & MCFRESET_RSR_POR) ? " Power On" : "", |
| 198 | (resetsource & MCFRESET_RSR_WDR) ? " Watchdog" : "", |
| 199 | (resetsource & MCFRESET_RSR_SOFT) ? " Software" : "", |
| 200 | (resetsource & MCFRESET_RSR_LVD) ? " Low Voltage" : ""); |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 201 | return 0; |
| 202 | } |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 203 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 204 | |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 205 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
Heiko Schocher | ac1956e | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 206 | { |
| 207 | MCFRESET_RCR = MCFRESET_RCR_SOFTRST; |
wdenk | e65527f | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 208 | return 0; |
| 209 | }; |
| 210 | #endif |
stroese | 53395a2 | 2004-12-16 18:09:49 +0000 | [diff] [blame] | 211 | |
TsiChungLiew | 3467469 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 212 | #ifdef CONFIG_M5249 |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 213 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 214 | int print_cpuinfo(void) |
stroese | 53395a2 | 2004-12-16 18:09:49 +0000 | [diff] [blame] | 215 | { |
| 216 | char buf[32]; |
| 217 | |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 218 | printf("CPU: Freescale Coldfire MCF5249 at %s MHz\n", |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 219 | strmhz(buf, CFG_SYS_CLK)); |
stroese | 53395a2 | 2004-12-16 18:09:49 +0000 | [diff] [blame] | 220 | return 0; |
| 221 | } |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 222 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
stroese | 53395a2 | 2004-12-16 18:09:49 +0000 | [diff] [blame] | 223 | |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 224 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 225 | { |
stroese | 53395a2 | 2004-12-16 18:09:49 +0000 | [diff] [blame] | 226 | /* enable watchdog, set timeout to 0 and wait */ |
| 227 | mbar_writeByte(MCFSIM_SYPCR, 0xc0); |
TsiChungLiew | 8cd73be | 2007-08-15 19:21:21 -0500 | [diff] [blame] | 228 | while (1) ; |
stroese | 53395a2 | 2004-12-16 18:09:49 +0000 | [diff] [blame] | 229 | |
| 230 | /* we don't return! */ |
| 231 | return 0; |
| 232 | }; |
| 233 | #endif |
TsiChungLiew | 3467469 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 234 | |
| 235 | #ifdef CONFIG_M5253 |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 236 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 237 | int print_cpuinfo(void) |
TsiChungLiew | 3467469 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 238 | { |
| 239 | char buf[32]; |
| 240 | |
| 241 | unsigned char resetsource = mbar_readLong(SIM_RSR); |
| 242 | printf("CPU: Freescale Coldfire MCF5253 at %s MHz\n", |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 243 | strmhz(buf, CFG_SYS_CLK)); |
TsiChungLiew | 3467469 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 244 | |
| 245 | if ((resetsource & SIM_RSR_HRST) || (resetsource & SIM_RSR_SWTR)) { |
| 246 | printf("Reset:%s%s\n", |
| 247 | (resetsource & SIM_RSR_HRST) ? " Hardware/ System Reset" |
| 248 | : "", |
| 249 | (resetsource & SIM_RSR_SWTR) ? " Software Watchdog" : |
| 250 | ""); |
| 251 | } |
| 252 | return 0; |
| 253 | } |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 254 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
TsiChungLiew | 3467469 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 255 | |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 256 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
TsiChungLiew | 3467469 | 2007-08-16 13:20:50 -0500 | [diff] [blame] | 257 | { |
| 258 | /* enable watchdog, set timeout to 0 and wait */ |
| 259 | mbar_writeByte(SIM_SYPCR, 0xc0); |
| 260 | while (1) ; |
| 261 | |
| 262 | /* we don't return! */ |
| 263 | return 0; |
| 264 | }; |
| 265 | #endif |
Ben Warren | 90c96db | 2008-08-26 22:16:25 -0700 | [diff] [blame] | 266 | |
| 267 | #if defined(CONFIG_MCFFEC) |
| 268 | /* Default initializations for MCFFEC controllers. To override, |
| 269 | * create a board-specific function called: |
Wolfgang Denk | 62fb2b4 | 2021-09-27 17:42:39 +0200 | [diff] [blame] | 270 | * int board_eth_init(struct bd_info *bis) |
Ben Warren | 90c96db | 2008-08-26 22:16:25 -0700 | [diff] [blame] | 271 | */ |
| 272 | |
Masahiro Yamada | f7ed78b | 2020-06-26 15:13:33 +0900 | [diff] [blame] | 273 | int cpu_eth_init(struct bd_info *bis) |
Ben Warren | 90c96db | 2008-08-26 22:16:25 -0700 | [diff] [blame] | 274 | { |
| 275 | return mcffec_initialize(bis); |
| 276 | } |
| 277 | #endif |