blob: 81b3f00b56e8cfdb4e384cfe33a9cbd86733ffe2 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Timur Tabi2ad6b512006-10-31 18:44:42 -06002/*
Kumar Gala4c2e3da2009-07-28 21:49:52 -05003 * Copyright (C) Freescale Semiconductor, Inc. 2006.
Timur Tabi2ad6b512006-10-31 18:44:42 -06004 */
5
6#include <common.h>
7#include <ioports.h>
8#include <mpc83xx.h>
9#include <i2c.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -060010#include <miiphy.h>
Timur Tabi89c77842008-02-08 13:15:55 -060011#include <vsc7385.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -060012#ifdef CONFIG_PCI
13#include <asm/mpc8349_pci.h>
14#include <pci.h>
15#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -060016#include <spd_sdram.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -060017#include <asm/mmu.h>
Kim Phillipsb3458d22007-12-20 15:57:28 -060018#if defined(CONFIG_OF_LIBFDT)
Masahiro Yamadab08c8c42018-03-05 01:20:11 +090019#include <linux/libfdt.h>
Kim Phillipsbf0b5422006-11-01 00:10:40 -060020#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -060021
Mario Six21c15022019-01-21 09:17:54 +010022#include "../../../arch/powerpc/cpu/mpc83xx/hrcw/hrcw.h"
Mario Sixfe7d6542019-01-21 09:18:03 +010023#include "../../../arch/powerpc/cpu/mpc83xx/elbc/elbc.h"
Mario Six21c15022019-01-21 09:17:54 +010024
Simon Glass088454c2017-03-31 08:40:25 -060025DECLARE_GLOBAL_DATA_PTR;
26
Timur Tabi2ad6b512006-10-31 18:44:42 -060027#ifndef CONFIG_SPD_EEPROM
28/*************************************************************************
29 * fixed sdram init -- doesn't use serial presence detect.
30 ************************************************************************/
31int fixed_sdram(void)
32{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020033 volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
Joe Hershberger2e651b22011-10-11 23:57:31 -050034 /* The size of RAM, in bytes */
35 u32 ddr_size = CONFIG_SYS_DDR_SIZE << 20;
36 u32 ddr_size_log2 = __ilog2(ddr_size);
Timur Tabi2ad6b512006-10-31 18:44:42 -060037
38 im->sysconf.ddrlaw[0].ar =
39 LAWAR_EN | ((ddr_size_log2 - 1) & LAWAR_SIZE);
Mario Six133ec602019-01-21 09:18:16 +010040 im->sysconf.ddrlaw[0].bar = CONFIG_SYS_SDRAM_BASE & 0xfffff000;
Timur Tabi2ad6b512006-10-31 18:44:42 -060041
Mario Six133ec602019-01-21 09:18:16 +010042#if ((CONFIG_SYS_SDRAM_BASE & 0x00FFFFFF) != 0)
Joe Hershberger2e651b22011-10-11 23:57:31 -050043#warning Chip select bounds is only configurable in 16MB increments
44#endif
45 im->ddr.csbnds[0].csbnds =
Mario Six133ec602019-01-21 09:18:16 +010046 ((CONFIG_SYS_SDRAM_BASE >> CSBNDS_SA_SHIFT) & CSBNDS_SA) |
47 (((CONFIG_SYS_SDRAM_BASE + ddr_size - 1) >>
Joe Hershberger2e651b22011-10-11 23:57:31 -050048 CSBNDS_EA_SHIFT) & CSBNDS_EA);
49 im->ddr.cs_config[0] = CONFIG_SYS_DDR_CS0_CONFIG;
50
51 /* Only one CS for DDR */
52 im->ddr.cs_config[1] = 0;
53 im->ddr.cs_config[2] = 0;
54 im->ddr.cs_config[3] = 0;
Timur Tabi2ad6b512006-10-31 18:44:42 -060055
56 debug("cs0_bnds = 0x%08x\n", im->ddr.csbnds[0].csbnds);
57 debug("cs0_config = 0x%08x\n", im->ddr.cs_config[0]);
58
59 debug("DDR:bar=0x%08x\n", im->sysconf.ddrlaw[0].bar);
60 debug("DDR:ar=0x%08x\n", im->sysconf.ddrlaw[0].ar);
61
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020062 im->ddr.timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1;
63 im->ddr.timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2;/* Was "2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT" */
Kim Phillipsbbea46f2007-08-16 22:52:48 -050064 im->ddr.sdram_cfg = SDRAM_CFG_SREN | SDRAM_CFG_SDRAM_TYPE_DDR1;
Timur Tabi2ad6b512006-10-31 18:44:42 -060065 im->ddr.sdram_mode =
66 (0x0000 << SDRAM_MODE_ESD_SHIFT) | (0x0032 << SDRAM_MODE_SD_SHIFT);
67 im->ddr.sdram_interval =
68 (0x0410 << SDRAM_INTERVAL_REFINT_SHIFT) | (0x0100 <<
69 SDRAM_INTERVAL_BSTOPRE_SHIFT);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020070 im->ddr.sdram_clk_cntl = CONFIG_SYS_DDR_SDRAM_CLK_CNTL;
Timur Tabi2ad6b512006-10-31 18:44:42 -060071
72 udelay(200);
73
74 im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
75
76 debug("DDR:timing_cfg_1=0x%08x\n", im->ddr.timing_cfg_1);
77 debug("DDR:timing_cfg_2=0x%08x\n", im->ddr.timing_cfg_2);
78 debug("DDR:sdram_mode=0x%08x\n", im->ddr.sdram_mode);
79 debug("DDR:sdram_interval=0x%08x\n", im->ddr.sdram_interval);
80 debug("DDR:sdram_cfg=0x%08x\n", im->ddr.sdram_cfg);
81
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020082 return CONFIG_SYS_DDR_SIZE;
Timur Tabi2ad6b512006-10-31 18:44:42 -060083}
84#endif
85
86#ifdef CONFIG_PCI
87/*
88 * Initialize PCI Devices, report devices found
89 */
90#ifndef CONFIG_PCI_PNP
91static struct pci_config_table pci_mpc83xxmitx_config_table[] = {
92 {
93 PCI_ANY_ID,
94 PCI_ANY_ID,
95 PCI_ANY_ID,
96 PCI_ANY_ID,
97 0x0f,
98 PCI_ANY_ID,
99 pci_cfgfunc_config_device,
100 {
101 PCI_ENET0_IOADDR,
102 PCI_ENET0_MEMADDR,
103 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER}
104 },
105 {}
106}
107#endif
108
109volatile static struct pci_controller hose[] = {
110 {
111#ifndef CONFIG_PCI_PNP
112 config_table:pci_mpc83xxmitx_config_table,
113#endif
114 },
115 {
116#ifndef CONFIG_PCI_PNP
117 config_table:pci_mpc83xxmitx_config_table,
118#endif
119 }
120};
121#endif /* CONFIG_PCI */
122
Simon Glassf1683aa2017-04-06 12:47:05 -0600123int dram_init(void)
Timur Tabi2ad6b512006-10-31 18:44:42 -0600124{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200125 volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600126 u32 msize = 0;
127#ifdef CONFIG_DDR_ECC
128 volatile ddr83xx_t *ddr = &im->ddr;
129#endif
130
131 if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32) im)
Simon Glass088454c2017-03-31 08:40:25 -0600132 return -ENXIO;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600133
134 /* DDR SDRAM - Main SODIMM */
Mario Six8a81bfd2019-01-21 09:18:15 +0100135 im->sysconf.ddrlaw[0].bar = CONFIG_SYS_SDRAM_BASE & LAWBAR_BAR;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600136#ifdef CONFIG_SPD_EEPROM
137 msize = spd_sdram();
138#else
139 msize = fixed_sdram();
140#endif
141
142#ifdef CONFIG_DDR_ECC
143 if (ddr->sdram_cfg & SDRAM_CFG_ECC_EN)
144 /* Unlike every other board, on the 83xx spd_sdram() returns
145 megabytes instead of just bytes. That's why we need to
146 multiple by 1MB when calling ddr_enable_ecc(). */
147 ddr_enable_ecc(msize * 1048576);
148#endif
149
Timur Tabifab16802007-01-31 15:54:20 -0600150 /* return total bus RAM size(bytes) */
Simon Glass088454c2017-03-31 08:40:25 -0600151 gd->ram_size = msize * 1024 * 1024;
152
153 return 0;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600154}
155
156int checkboard(void)
157{
Mario Six4cb06d32019-01-21 09:17:44 +0100158#ifdef CONFIG_TARGET_MPC8349ITX
Timur Tabibe5e6182006-11-03 19:15:00 -0600159 puts("Board: Freescale MPC8349E-mITX\n");
Timur Tabi7a78f142007-01-31 15:54:29 -0600160#else
161 puts("Board: Freescale MPC8349E-mITX-GP\n");
162#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -0600163
164 return 0;
165}
166
Timur Tabibe5e6182006-11-03 19:15:00 -0600167/*
Timur Tabi2ad6b512006-10-31 18:44:42 -0600168 * Implement a work-around for a hardware problem with compact
169 * flash.
170 *
171 * Program the UPM if compact flash is enabled.
172 */
173int misc_init_f(void)
174{
Timur Tabi89c77842008-02-08 13:15:55 -0600175#ifdef CONFIG_VSC7385_ENET
Timur Tabi2ad6b512006-10-31 18:44:42 -0600176 volatile u32 *vsc7385_cpuctrl;
177
178 /* 0x1c0c0 is the VSC7385 CPU Control (CPUCTRL) Register. The power up
179 default of VSC7385 L1_IRQ and L2_IRQ requests are active high. That
180 means it is 0 when the IRQ is not active. This makes the wire-AND
181 logic always assert IRQ7 to CPU even if there is no request from the
182 switch. Since the compact flash and the switch share the same IRQ,
183 the Linux kernel will think that the compact flash is requesting irq
184 and get stuck when it tries to clear the IRQ. Thus we need to set
185 the L2_IRQ0 and L2_IRQ1 to active low.
186
187 The following code sets the L1_IRQ and L2_IRQ polarity to active low.
188 Without this code, compact flash will not work in Linux because
189 unlike U-Boot, Linux uses the IRQ, so this code is necessary if we
190 don't enable compact flash for U-Boot.
191 */
192
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200193 vsc7385_cpuctrl = (volatile u32 *)(CONFIG_SYS_VSC7385_BASE + 0x1c0c0);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600194 *vsc7385_cpuctrl |= 0x0c;
Timur Tabi7a78f142007-01-31 15:54:29 -0600195#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -0600196
197#ifdef CONFIG_COMPACT_FLASH
198 /* UPM Table Configuration Code */
199 static uint UPMATable[] = {
200 0xcffffc00, 0x0fffff00, 0x0fafff00, 0x0fafff00,
201 0x0faffd00, 0x0faffc04, 0x0ffffc00, 0x3ffffc01,
202 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
203 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
204 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfff7fc00,
205 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
206 0xcffffc00, 0x0fffff00, 0x0ff3ff00, 0x0ff3ff00,
207 0x0ff3fe00, 0x0ffffc00, 0x3ffffc05, 0xfffffc00,
208 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
209 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
210 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
211 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
212 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
213 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
214 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
215 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01
216 };
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200217 volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600218
Becky Brucef51cdaf2010-06-17 11:37:20 -0500219 set_lbc_br(3, CONFIG_SYS_BR3_PRELIM);
220 set_lbc_or(3, CONFIG_SYS_OR3_PRELIM);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600221
222 /* Program the MAMR. RFEN=0, OP=00, UWPL=1, AM=000, DS=01, G0CL=000,
223 GPL4=0, RLF=0001, WLF=0001, TLF=0001, MAD=000000
224 */
Becky Brucef51cdaf2010-06-17 11:37:20 -0500225 immap->im_lbc.mamr = 0x08404440;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600226
227 upmconfig(0, UPMATable, sizeof(UPMATable) / sizeof(UPMATable[0]));
228
229 puts("UPMA: Configured for compact flash\n");
230#endif
231
232 return 0;
233}
234
Timur Tabibe5e6182006-11-03 19:15:00 -0600235/*
Timur Tabi89c77842008-02-08 13:15:55 -0600236 * Miscellaneous late-boot configurations
237 *
Timur Tabi2ad6b512006-10-31 18:44:42 -0600238 * Make sure the EEPROM has the HRCW correctly programmed.
239 * Make sure the RTC is correctly programmed.
240 *
241 * The MPC8349E-mITX can be configured to load the HRCW from
242 * EEPROM instead of flash. This is controlled via jumpers
243 * LGPL0, 1, and 3. Normally, these jumpers are set to 000 (all
244 * jumpered), but if they're set to 001 or 010, then the HRCW is
245 * read from the "I2C EEPROM".
246 *
247 * This function makes sure that the I2C EEPROM is programmed
248 * correctly.
Timur Tabi89c77842008-02-08 13:15:55 -0600249 *
250 * If a VSC7385 microcode image is present, then upload it.
Timur Tabi2ad6b512006-10-31 18:44:42 -0600251 */
252int misc_init_r(void)
253{
254 int rc = 0;
255
Heiko Schocher00f792e2012-10-24 13:48:22 +0200256#if defined(CONFIG_SYS_I2C)
Sam Song05031db2006-12-14 19:03:21 +0800257 unsigned int orig_bus = i2c_get_bus_num();
Timur Tabibe5e6182006-11-03 19:15:00 -0600258 u8 i2c_data;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600259
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200260#ifdef CONFIG_SYS_I2C_RTC_ADDR
Timur Tabie857a5b2006-11-28 12:09:35 -0600261 u8 ds1339_data[17];
Timur Tabi2ad6b512006-10-31 18:44:42 -0600262#endif
263
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200264#ifdef CONFIG_SYS_I2C_EEPROM_ADDR
Timur Tabi2ad6b512006-10-31 18:44:42 -0600265 static u8 eeprom_data[] = /* HRCW data */
266 {
Timur Tabi7a78f142007-01-31 15:54:29 -0600267 0xAA, 0x55, 0xAA, /* Preamble */
Wolfgang Denk53677ef2008-05-20 16:00:29 +0200268 0x7C, /* ACS=0, BYTE_EN=1111, CONT=1 */
269 0x02, 0x40, /* RCWL ADDR=0x0_0900 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200270 (CONFIG_SYS_HRCW_LOW >> 24) & 0xFF,
271 (CONFIG_SYS_HRCW_LOW >> 16) & 0xFF,
272 (CONFIG_SYS_HRCW_LOW >> 8) & 0xFF,
273 CONFIG_SYS_HRCW_LOW & 0xFF,
Wolfgang Denk53677ef2008-05-20 16:00:29 +0200274 0x7C, /* ACS=0, BYTE_EN=1111, CONT=1 */
Timur Tabi7a78f142007-01-31 15:54:29 -0600275 0x02, 0x41, /* RCWH ADDR=0x0_0904 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200276 (CONFIG_SYS_HRCW_HIGH >> 24) & 0xFF,
277 (CONFIG_SYS_HRCW_HIGH >> 16) & 0xFF,
278 (CONFIG_SYS_HRCW_HIGH >> 8) & 0xFF,
279 CONFIG_SYS_HRCW_HIGH & 0xFF
Timur Tabi2ad6b512006-10-31 18:44:42 -0600280 };
281
282 u8 data[sizeof(eeprom_data)];
Timur Tabibe5e6182006-11-03 19:15:00 -0600283#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -0600284
Timur Tabibe5e6182006-11-03 19:15:00 -0600285 printf("Board revision: ");
Timur Tabi9ca880a2006-10-31 21:23:16 -0600286 i2c_set_bus_num(1);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200287 if (i2c_read(CONFIG_SYS_I2C_8574A_ADDR2, 0, 0, &i2c_data, sizeof(i2c_data)) == 0)
Timur Tabibe5e6182006-11-03 19:15:00 -0600288 printf("%u.%u (PCF8475A)\n", (i2c_data & 0x02) >> 1, i2c_data & 0x01);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200289 else if (i2c_read(CONFIG_SYS_I2C_8574_ADDR2, 0, 0, &i2c_data, sizeof(i2c_data)) == 0)
Timur Tabibe5e6182006-11-03 19:15:00 -0600290 printf("%u.%u (PCF8475)\n", (i2c_data & 0x02) >> 1, i2c_data & 0x01);
291 else {
292 printf("Unknown\n");
293 rc = 1;
294 }
295
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200296#ifdef CONFIG_SYS_I2C_EEPROM_ADDR
Timur Tabibe5e6182006-11-03 19:15:00 -0600297 i2c_set_bus_num(0);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600298
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200299 if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, data, sizeof(data)) == 0) {
Timur Tabi2ad6b512006-10-31 18:44:42 -0600300 if (memcmp(data, eeprom_data, sizeof(data)) != 0) {
301 if (i2c_write
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200302 (CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, eeprom_data,
Timur Tabi2ad6b512006-10-31 18:44:42 -0600303 sizeof(eeprom_data)) != 0) {
304 puts("Failure writing the HRCW to EEPROM via I2C.\n");
305 rc = 1;
306 }
307 }
308 } else {
309 puts("Failure reading the HRCW from EEPROM via I2C.\n");
310 rc = 1;
311 }
312#endif
313
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200314#ifdef CONFIG_SYS_I2C_RTC_ADDR
Timur Tabibe5e6182006-11-03 19:15:00 -0600315 i2c_set_bus_num(1);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600316
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200317 if (i2c_read(CONFIG_SYS_I2C_RTC_ADDR, 0, 1, ds1339_data, sizeof(ds1339_data))
Timur Tabi2ad6b512006-10-31 18:44:42 -0600318 == 0) {
319
320 /* Work-around for MPC8349E-mITX bug #13601.
321 If the RTC does not contain valid register values, the DS1339
322 Linux driver will not work.
323 */
324
325 /* Make sure status register bits 6-2 are zero */
326 ds1339_data[0x0f] &= ~0x7c;
327
328 /* Check for a valid day register value */
329 ds1339_data[0x03] &= ~0xf8;
330 if (ds1339_data[0x03] == 0) {
331 ds1339_data[0x03] = 1;
332 }
333
334 /* Check for a valid date register value */
335 ds1339_data[0x04] &= ~0xc0;
336 if ((ds1339_data[0x04] == 0) ||
337 ((ds1339_data[0x04] & 0x0f) > 9) ||
338 (ds1339_data[0x04] >= 0x32)) {
339 ds1339_data[0x04] = 1;
340 }
341
342 /* Check for a valid month register value */
343 ds1339_data[0x05] &= ~0x60;
344
345 if ((ds1339_data[0x05] == 0) ||
346 ((ds1339_data[0x05] & 0x0f) > 9) ||
347 ((ds1339_data[0x05] >= 0x13)
348 && (ds1339_data[0x05] <= 0x19))) {
349 ds1339_data[0x05] = 1;
350 }
351
352 /* Enable Oscillator and rate select */
353 ds1339_data[0x0e] = 0x1c;
354
355 /* Work-around for MPC8349E-mITX bug #13330.
356 Ensure that the RTC control register contains the value 0x1c.
357 This affects SATA performance.
358 */
359
360 if (i2c_write
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200361 (CONFIG_SYS_I2C_RTC_ADDR, 0, 1, ds1339_data,
Timur Tabi2ad6b512006-10-31 18:44:42 -0600362 sizeof(ds1339_data))) {
363 puts("Failure writing to the RTC via I2C.\n");
364 rc = 1;
365 }
366 } else {
367 puts("Failure reading from the RTC via I2C.\n");
368 rc = 1;
369 }
370#endif
371
372 i2c_set_bus_num(orig_bus);
373#endif
374
Timur Tabi89c77842008-02-08 13:15:55 -0600375#ifdef CONFIG_VSC7385_IMAGE
376 if (vsc7385_upload_firmware((void *) CONFIG_VSC7385_IMAGE,
377 CONFIG_VSC7385_IMAGE_SIZE)) {
378 puts("Failure uploading VSC7385 microcode.\n");
379 rc = 1;
380 }
381#endif
382
Timur Tabi2ad6b512006-10-31 18:44:42 -0600383 return rc;
384}
Kim Phillipsbf0b5422006-11-01 00:10:40 -0600385
Kim Phillips3fde9e82007-08-15 22:30:33 -0500386#if defined(CONFIG_OF_BOARD_SETUP)
Simon Glasse895a4b2014-10-23 18:58:47 -0600387int ft_board_setup(void *blob, bd_t *bd)
Kim Phillipsbf0b5422006-11-01 00:10:40 -0600388{
Kim Phillips3fde9e82007-08-15 22:30:33 -0500389 ft_cpu_setup(blob, bd);
390#ifdef CONFIG_PCI
391 ft_pci_setup(blob, bd);
392#endif
Simon Glasse895a4b2014-10-23 18:58:47 -0600393
394 return 0;
Kim Phillipsbf0b5422006-11-01 00:10:40 -0600395}
396#endif