#include <init.h>
#include <pci.h>
#include <uuid.h>
+#include <asm/global_data.h>
#include <asm/processor.h>
#include <asm/immap_85xx.h>
#include <ioports.h>
#include <fdt_support.h>
#include <asm/io.h>
#include <i2c.h>
-#include <mb862xx.h>
-#include <video_fb.h>
#include "upm_table.h"
DECLARE_GLOBAL_DATA_PTR;
-extern flash_info_t flash_info[]; /* FLASH chips info */
-extern GraphicDevice mb862xx;
-
void local_bus_init (void);
ulong flash_get_size (ulong base, int banknum);
}
putc('\n');
-#if defined(CONFIG_PCI) || defined(CONFIG_DM_PCI)
+#if defined(CONFIG_PCI)
/* Check the PCI_clk sel bit */
if (in_be32(&gur->porpllsr) & (1<<15)) {
src = "SYSCLK";
- f = CONFIG_SYS_CLK_FREQ;
+ f = get_board_sys_clk();
} else {
src = "PCI_CLK";
- f = CONFIG_PCI_CLK_FREQ;
+ /* PCI is clocked by the external source at 33 MHz */
+ f = 33000000;
}
printf ("PCI1: 32 bit, %d MHz (%s)\n", f/1000000, src);
#else
&flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
}
-#if defined(CONFIG_DM_PCI)
pci_init();
-#endif
return 0;
}
#endif /* CONFIG_BOARD_EARLY_INIT_R */
#ifdef CONFIG_OF_BOARD_SETUP
-int ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, struct bd_info *bd)
{
u32 val[12];
int rc, i = 0;
val[i++] = gd->bd->bi_flashstart;
val[i++] = gd->bd->bi_flashsize;
-#if defined(CONFIG_VIDEO_MB862xx)
- if (mb862xx.frameAdrs == CONFIG_SYS_LIME_BASE) {
- /* Fixup LIME mapping */
- val[i++] = 2; /* chip select number */
- val[i++] = 0; /* always 0 */
- val[i++] = CONFIG_SYS_LIME_BASE;
- val[i++] = CONFIG_SYS_LIME_SIZE;
- }
-#endif
-
/* Fixup FPGA mapping */
val[i++] = 3; /* chip select number */
val[i++] = 0; /* always 0 */
#endif /* CONFIG_OF_BOARD_SETUP */
#if defined(CONFIG_OF_SEPARATE)
-void *board_fdt_blob_setup(void)
+void *board_fdt_blob_setup(int *err)
{
void *fw_dtb;
+ *err = 0;
fw_dtb = (void *)(CONFIG_SYS_TEXT_BASE - CONFIG_ENV_SECT_SIZE);
if (fdt_magic(fw_dtb) != FDT_MAGIC) {
printf("DTB is not passed via %x\n", (u32)fw_dtb);
+ *err = -ENXIO;
return NULL;
}