blob: a2e284f1a229a8696fd25c981af130448bc70d41 [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>
Simon Glass807765b2019-12-28 10:44:54 -07007#include <fdt_support.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -06008#include <ioports.h>
9#include <mpc83xx.h>
10#include <i2c.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -060011#include <miiphy.h>
Timur Tabi89c77842008-02-08 13:15:55 -060012#include <vsc7385.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -060013#ifdef CONFIG_PCI
14#include <asm/mpc8349_pci.h>
15#include <pci.h>
16#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -060017#include <spd_sdram.h>
Timur Tabi2ad6b512006-10-31 18:44:42 -060018#include <asm/mmu.h>
Kim Phillipsb3458d22007-12-20 15:57:28 -060019#if defined(CONFIG_OF_LIBFDT)
Masahiro Yamadab08c8c42018-03-05 01:20:11 +090020#include <linux/libfdt.h>
Kim Phillipsbf0b5422006-11-01 00:10:40 -060021#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -060022
Mario Six21c15022019-01-21 09:17:54 +010023#include "../../../arch/powerpc/cpu/mpc83xx/hrcw/hrcw.h"
Mario Sixfe7d6542019-01-21 09:18:03 +010024#include "../../../arch/powerpc/cpu/mpc83xx/elbc/elbc.h"
Mario Six21c15022019-01-21 09:17:54 +010025
Simon Glass088454c2017-03-31 08:40:25 -060026DECLARE_GLOBAL_DATA_PTR;
27
Timur Tabi2ad6b512006-10-31 18:44:42 -060028#ifndef CONFIG_SPD_EEPROM
29/*************************************************************************
30 * fixed sdram init -- doesn't use serial presence detect.
31 ************************************************************************/
32int fixed_sdram(void)
33{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020034 volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
Joe Hershberger2e651b22011-10-11 23:57:31 -050035 /* The size of RAM, in bytes */
36 u32 ddr_size = CONFIG_SYS_DDR_SIZE << 20;
37 u32 ddr_size_log2 = __ilog2(ddr_size);
Timur Tabi2ad6b512006-10-31 18:44:42 -060038
39 im->sysconf.ddrlaw[0].ar =
40 LAWAR_EN | ((ddr_size_log2 - 1) & LAWAR_SIZE);
Mario Six133ec602019-01-21 09:18:16 +010041 im->sysconf.ddrlaw[0].bar = CONFIG_SYS_SDRAM_BASE & 0xfffff000;
Timur Tabi2ad6b512006-10-31 18:44:42 -060042
Mario Six133ec602019-01-21 09:18:16 +010043#if ((CONFIG_SYS_SDRAM_BASE & 0x00FFFFFF) != 0)
Joe Hershberger2e651b22011-10-11 23:57:31 -050044#warning Chip select bounds is only configurable in 16MB increments
45#endif
46 im->ddr.csbnds[0].csbnds =
Mario Six133ec602019-01-21 09:18:16 +010047 ((CONFIG_SYS_SDRAM_BASE >> CSBNDS_SA_SHIFT) & CSBNDS_SA) |
48 (((CONFIG_SYS_SDRAM_BASE + ddr_size - 1) >>
Joe Hershberger2e651b22011-10-11 23:57:31 -050049 CSBNDS_EA_SHIFT) & CSBNDS_EA);
50 im->ddr.cs_config[0] = CONFIG_SYS_DDR_CS0_CONFIG;
51
52 /* Only one CS for DDR */
53 im->ddr.cs_config[1] = 0;
54 im->ddr.cs_config[2] = 0;
55 im->ddr.cs_config[3] = 0;
Timur Tabi2ad6b512006-10-31 18:44:42 -060056
57 debug("cs0_bnds = 0x%08x\n", im->ddr.csbnds[0].csbnds);
58 debug("cs0_config = 0x%08x\n", im->ddr.cs_config[0]);
59
60 debug("DDR:bar=0x%08x\n", im->sysconf.ddrlaw[0].bar);
61 debug("DDR:ar=0x%08x\n", im->sysconf.ddrlaw[0].ar);
62
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020063 im->ddr.timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1;
64 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 -050065 im->ddr.sdram_cfg = SDRAM_CFG_SREN | SDRAM_CFG_SDRAM_TYPE_DDR1;
Timur Tabi2ad6b512006-10-31 18:44:42 -060066 im->ddr.sdram_mode =
67 (0x0000 << SDRAM_MODE_ESD_SHIFT) | (0x0032 << SDRAM_MODE_SD_SHIFT);
68 im->ddr.sdram_interval =
69 (0x0410 << SDRAM_INTERVAL_REFINT_SHIFT) | (0x0100 <<
70 SDRAM_INTERVAL_BSTOPRE_SHIFT);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020071 im->ddr.sdram_clk_cntl = CONFIG_SYS_DDR_SDRAM_CLK_CNTL;
Timur Tabi2ad6b512006-10-31 18:44:42 -060072
73 udelay(200);
74
75 im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
76
77 debug("DDR:timing_cfg_1=0x%08x\n", im->ddr.timing_cfg_1);
78 debug("DDR:timing_cfg_2=0x%08x\n", im->ddr.timing_cfg_2);
79 debug("DDR:sdram_mode=0x%08x\n", im->ddr.sdram_mode);
80 debug("DDR:sdram_interval=0x%08x\n", im->ddr.sdram_interval);
81 debug("DDR:sdram_cfg=0x%08x\n", im->ddr.sdram_cfg);
82
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020083 return CONFIG_SYS_DDR_SIZE;
Timur Tabi2ad6b512006-10-31 18:44:42 -060084}
85#endif
86
87#ifdef CONFIG_PCI
88/*
89 * Initialize PCI Devices, report devices found
90 */
91#ifndef CONFIG_PCI_PNP
92static struct pci_config_table pci_mpc83xxmitx_config_table[] = {
93 {
94 PCI_ANY_ID,
95 PCI_ANY_ID,
96 PCI_ANY_ID,
97 PCI_ANY_ID,
98 0x0f,
99 PCI_ANY_ID,
100 pci_cfgfunc_config_device,
101 {
102 PCI_ENET0_IOADDR,
103 PCI_ENET0_MEMADDR,
104 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER}
105 },
106 {}
107}
108#endif
109
110volatile static struct pci_controller hose[] = {
111 {
112#ifndef CONFIG_PCI_PNP
113 config_table:pci_mpc83xxmitx_config_table,
114#endif
115 },
116 {
117#ifndef CONFIG_PCI_PNP
118 config_table:pci_mpc83xxmitx_config_table,
119#endif
120 }
121};
122#endif /* CONFIG_PCI */
123
Simon Glassf1683aa2017-04-06 12:47:05 -0600124int dram_init(void)
Timur Tabi2ad6b512006-10-31 18:44:42 -0600125{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200126 volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600127 u32 msize = 0;
128#ifdef CONFIG_DDR_ECC
129 volatile ddr83xx_t *ddr = &im->ddr;
130#endif
131
132 if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32) im)
Simon Glass088454c2017-03-31 08:40:25 -0600133 return -ENXIO;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600134
135 /* DDR SDRAM - Main SODIMM */
Mario Six8a81bfd2019-01-21 09:18:15 +0100136 im->sysconf.ddrlaw[0].bar = CONFIG_SYS_SDRAM_BASE & LAWBAR_BAR;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600137#ifdef CONFIG_SPD_EEPROM
138 msize = spd_sdram();
139#else
140 msize = fixed_sdram();
141#endif
142
143#ifdef CONFIG_DDR_ECC
144 if (ddr->sdram_cfg & SDRAM_CFG_ECC_EN)
145 /* Unlike every other board, on the 83xx spd_sdram() returns
146 megabytes instead of just bytes. That's why we need to
147 multiple by 1MB when calling ddr_enable_ecc(). */
148 ddr_enable_ecc(msize * 1048576);
149#endif
150
Timur Tabifab16802007-01-31 15:54:20 -0600151 /* return total bus RAM size(bytes) */
Simon Glass088454c2017-03-31 08:40:25 -0600152 gd->ram_size = msize * 1024 * 1024;
153
154 return 0;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600155}
156
157int checkboard(void)
158{
Mario Six4cb06d32019-01-21 09:17:44 +0100159#ifdef CONFIG_TARGET_MPC8349ITX
Timur Tabibe5e6182006-11-03 19:15:00 -0600160 puts("Board: Freescale MPC8349E-mITX\n");
Timur Tabi7a78f142007-01-31 15:54:29 -0600161#else
162 puts("Board: Freescale MPC8349E-mITX-GP\n");
163#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -0600164
165 return 0;
166}
167
Timur Tabibe5e6182006-11-03 19:15:00 -0600168/*
Timur Tabi2ad6b512006-10-31 18:44:42 -0600169 * Implement a work-around for a hardware problem with compact
170 * flash.
171 *
172 * Program the UPM if compact flash is enabled.
173 */
174int misc_init_f(void)
175{
Timur Tabi89c77842008-02-08 13:15:55 -0600176#ifdef CONFIG_VSC7385_ENET
Timur Tabi2ad6b512006-10-31 18:44:42 -0600177 volatile u32 *vsc7385_cpuctrl;
178
179 /* 0x1c0c0 is the VSC7385 CPU Control (CPUCTRL) Register. The power up
180 default of VSC7385 L1_IRQ and L2_IRQ requests are active high. That
181 means it is 0 when the IRQ is not active. This makes the wire-AND
182 logic always assert IRQ7 to CPU even if there is no request from the
183 switch. Since the compact flash and the switch share the same IRQ,
184 the Linux kernel will think that the compact flash is requesting irq
185 and get stuck when it tries to clear the IRQ. Thus we need to set
186 the L2_IRQ0 and L2_IRQ1 to active low.
187
188 The following code sets the L1_IRQ and L2_IRQ polarity to active low.
189 Without this code, compact flash will not work in Linux because
190 unlike U-Boot, Linux uses the IRQ, so this code is necessary if we
191 don't enable compact flash for U-Boot.
192 */
193
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200194 vsc7385_cpuctrl = (volatile u32 *)(CONFIG_SYS_VSC7385_BASE + 0x1c0c0);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600195 *vsc7385_cpuctrl |= 0x0c;
Timur Tabi7a78f142007-01-31 15:54:29 -0600196#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -0600197
198#ifdef CONFIG_COMPACT_FLASH
199 /* UPM Table Configuration Code */
200 static uint UPMATable[] = {
201 0xcffffc00, 0x0fffff00, 0x0fafff00, 0x0fafff00,
202 0x0faffd00, 0x0faffc04, 0x0ffffc00, 0x3ffffc01,
203 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
204 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
205 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfff7fc00,
206 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
207 0xcffffc00, 0x0fffff00, 0x0ff3ff00, 0x0ff3ff00,
208 0x0ff3fe00, 0x0ffffc00, 0x3ffffc05, 0xfffffc00,
209 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
210 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
211 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
212 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
213 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
214 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
215 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
216 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01
217 };
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200218 volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600219
Becky Brucef51cdaf2010-06-17 11:37:20 -0500220 set_lbc_br(3, CONFIG_SYS_BR3_PRELIM);
221 set_lbc_or(3, CONFIG_SYS_OR3_PRELIM);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600222
223 /* Program the MAMR. RFEN=0, OP=00, UWPL=1, AM=000, DS=01, G0CL=000,
224 GPL4=0, RLF=0001, WLF=0001, TLF=0001, MAD=000000
225 */
Becky Brucef51cdaf2010-06-17 11:37:20 -0500226 immap->im_lbc.mamr = 0x08404440;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600227
228 upmconfig(0, UPMATable, sizeof(UPMATable) / sizeof(UPMATable[0]));
229
230 puts("UPMA: Configured for compact flash\n");
231#endif
232
233 return 0;
234}
235
Timur Tabibe5e6182006-11-03 19:15:00 -0600236/*
Timur Tabi89c77842008-02-08 13:15:55 -0600237 * Miscellaneous late-boot configurations
238 *
Timur Tabi2ad6b512006-10-31 18:44:42 -0600239 * Make sure the EEPROM has the HRCW correctly programmed.
240 * Make sure the RTC is correctly programmed.
241 *
242 * The MPC8349E-mITX can be configured to load the HRCW from
243 * EEPROM instead of flash. This is controlled via jumpers
244 * LGPL0, 1, and 3. Normally, these jumpers are set to 000 (all
245 * jumpered), but if they're set to 001 or 010, then the HRCW is
246 * read from the "I2C EEPROM".
247 *
248 * This function makes sure that the I2C EEPROM is programmed
249 * correctly.
Timur Tabi89c77842008-02-08 13:15:55 -0600250 *
251 * If a VSC7385 microcode image is present, then upload it.
Timur Tabi2ad6b512006-10-31 18:44:42 -0600252 */
253int misc_init_r(void)
254{
255 int rc = 0;
256
Heiko Schocher00f792e2012-10-24 13:48:22 +0200257#if defined(CONFIG_SYS_I2C)
Sam Song05031db2006-12-14 19:03:21 +0800258 unsigned int orig_bus = i2c_get_bus_num();
Timur Tabibe5e6182006-11-03 19:15:00 -0600259 u8 i2c_data;
Timur Tabi2ad6b512006-10-31 18:44:42 -0600260
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200261#ifdef CONFIG_SYS_I2C_RTC_ADDR
Timur Tabie857a5b2006-11-28 12:09:35 -0600262 u8 ds1339_data[17];
Timur Tabi2ad6b512006-10-31 18:44:42 -0600263#endif
264
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200265#ifdef CONFIG_SYS_I2C_EEPROM_ADDR
Timur Tabi2ad6b512006-10-31 18:44:42 -0600266 static u8 eeprom_data[] = /* HRCW data */
267 {
Timur Tabi7a78f142007-01-31 15:54:29 -0600268 0xAA, 0x55, 0xAA, /* Preamble */
Wolfgang Denk53677ef2008-05-20 16:00:29 +0200269 0x7C, /* ACS=0, BYTE_EN=1111, CONT=1 */
270 0x02, 0x40, /* RCWL ADDR=0x0_0900 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200271 (CONFIG_SYS_HRCW_LOW >> 24) & 0xFF,
272 (CONFIG_SYS_HRCW_LOW >> 16) & 0xFF,
273 (CONFIG_SYS_HRCW_LOW >> 8) & 0xFF,
274 CONFIG_SYS_HRCW_LOW & 0xFF,
Wolfgang Denk53677ef2008-05-20 16:00:29 +0200275 0x7C, /* ACS=0, BYTE_EN=1111, CONT=1 */
Timur Tabi7a78f142007-01-31 15:54:29 -0600276 0x02, 0x41, /* RCWH ADDR=0x0_0904 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200277 (CONFIG_SYS_HRCW_HIGH >> 24) & 0xFF,
278 (CONFIG_SYS_HRCW_HIGH >> 16) & 0xFF,
279 (CONFIG_SYS_HRCW_HIGH >> 8) & 0xFF,
280 CONFIG_SYS_HRCW_HIGH & 0xFF
Timur Tabi2ad6b512006-10-31 18:44:42 -0600281 };
282
283 u8 data[sizeof(eeprom_data)];
Timur Tabibe5e6182006-11-03 19:15:00 -0600284#endif
Timur Tabi2ad6b512006-10-31 18:44:42 -0600285
Timur Tabibe5e6182006-11-03 19:15:00 -0600286 printf("Board revision: ");
Timur Tabi9ca880a2006-10-31 21:23:16 -0600287 i2c_set_bus_num(1);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200288 if (i2c_read(CONFIG_SYS_I2C_8574A_ADDR2, 0, 0, &i2c_data, sizeof(i2c_data)) == 0)
Timur Tabibe5e6182006-11-03 19:15:00 -0600289 printf("%u.%u (PCF8475A)\n", (i2c_data & 0x02) >> 1, i2c_data & 0x01);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200290 else if (i2c_read(CONFIG_SYS_I2C_8574_ADDR2, 0, 0, &i2c_data, sizeof(i2c_data)) == 0)
Timur Tabibe5e6182006-11-03 19:15:00 -0600291 printf("%u.%u (PCF8475)\n", (i2c_data & 0x02) >> 1, i2c_data & 0x01);
292 else {
293 printf("Unknown\n");
294 rc = 1;
295 }
296
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200297#ifdef CONFIG_SYS_I2C_EEPROM_ADDR
Timur Tabibe5e6182006-11-03 19:15:00 -0600298 i2c_set_bus_num(0);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600299
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200300 if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, data, sizeof(data)) == 0) {
Timur Tabi2ad6b512006-10-31 18:44:42 -0600301 if (memcmp(data, eeprom_data, sizeof(data)) != 0) {
302 if (i2c_write
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200303 (CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, eeprom_data,
Timur Tabi2ad6b512006-10-31 18:44:42 -0600304 sizeof(eeprom_data)) != 0) {
305 puts("Failure writing the HRCW to EEPROM via I2C.\n");
306 rc = 1;
307 }
308 }
309 } else {
310 puts("Failure reading the HRCW from EEPROM via I2C.\n");
311 rc = 1;
312 }
313#endif
314
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200315#ifdef CONFIG_SYS_I2C_RTC_ADDR
Timur Tabibe5e6182006-11-03 19:15:00 -0600316 i2c_set_bus_num(1);
Timur Tabi2ad6b512006-10-31 18:44:42 -0600317
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200318 if (i2c_read(CONFIG_SYS_I2C_RTC_ADDR, 0, 1, ds1339_data, sizeof(ds1339_data))
Timur Tabi2ad6b512006-10-31 18:44:42 -0600319 == 0) {
320
321 /* Work-around for MPC8349E-mITX bug #13601.
322 If the RTC does not contain valid register values, the DS1339
323 Linux driver will not work.
324 */
325
326 /* Make sure status register bits 6-2 are zero */
327 ds1339_data[0x0f] &= ~0x7c;
328
329 /* Check for a valid day register value */
330 ds1339_data[0x03] &= ~0xf8;
331 if (ds1339_data[0x03] == 0) {
332 ds1339_data[0x03] = 1;
333 }
334
335 /* Check for a valid date register value */
336 ds1339_data[0x04] &= ~0xc0;
337 if ((ds1339_data[0x04] == 0) ||
338 ((ds1339_data[0x04] & 0x0f) > 9) ||
339 (ds1339_data[0x04] >= 0x32)) {
340 ds1339_data[0x04] = 1;
341 }
342
343 /* Check for a valid month register value */
344 ds1339_data[0x05] &= ~0x60;
345
346 if ((ds1339_data[0x05] == 0) ||
347 ((ds1339_data[0x05] & 0x0f) > 9) ||
348 ((ds1339_data[0x05] >= 0x13)
349 && (ds1339_data[0x05] <= 0x19))) {
350 ds1339_data[0x05] = 1;
351 }
352
353 /* Enable Oscillator and rate select */
354 ds1339_data[0x0e] = 0x1c;
355
356 /* Work-around for MPC8349E-mITX bug #13330.
357 Ensure that the RTC control register contains the value 0x1c.
358 This affects SATA performance.
359 */
360
361 if (i2c_write
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200362 (CONFIG_SYS_I2C_RTC_ADDR, 0, 1, ds1339_data,
Timur Tabi2ad6b512006-10-31 18:44:42 -0600363 sizeof(ds1339_data))) {
364 puts("Failure writing to the RTC via I2C.\n");
365 rc = 1;
366 }
367 } else {
368 puts("Failure reading from the RTC via I2C.\n");
369 rc = 1;
370 }
371#endif
372
373 i2c_set_bus_num(orig_bus);
374#endif
375
Timur Tabi89c77842008-02-08 13:15:55 -0600376#ifdef CONFIG_VSC7385_IMAGE
377 if (vsc7385_upload_firmware((void *) CONFIG_VSC7385_IMAGE,
378 CONFIG_VSC7385_IMAGE_SIZE)) {
379 puts("Failure uploading VSC7385 microcode.\n");
380 rc = 1;
381 }
382#endif
383
Timur Tabi2ad6b512006-10-31 18:44:42 -0600384 return rc;
385}
Kim Phillipsbf0b5422006-11-01 00:10:40 -0600386
Kim Phillips3fde9e82007-08-15 22:30:33 -0500387#if defined(CONFIG_OF_BOARD_SETUP)
Simon Glasse895a4b2014-10-23 18:58:47 -0600388int ft_board_setup(void *blob, bd_t *bd)
Kim Phillipsbf0b5422006-11-01 00:10:40 -0600389{
Kim Phillips3fde9e82007-08-15 22:30:33 -0500390 ft_cpu_setup(blob, bd);
391#ifdef CONFIG_PCI
392 ft_pci_setup(blob, bd);
393#endif
Simon Glasse895a4b2014-10-23 18:58:47 -0600394
395 return 0;
Kim Phillipsbf0b5422006-11-01 00:10:40 -0600396}
397#endif