2 * Copyright 2009 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/immap_85xx.h>
13 #include <fsl_ddr_sdram.h>
14 #include <asm/fsl_law.h>
16 #define SYSCLK_66 66666666
18 DECLARE_GLOBAL_DATA_PTR;
20 void board_init_f(ulong bootflag)
22 uint plat_ratio, bus_clk, sys_clk;
23 volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
27 plat_ratio = gur->porpllsr & 0x0000003e;
29 bus_clk = plat_ratio * sys_clk;
30 NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1,
31 bus_clk / 16 / CONFIG_BAUDRATE);
33 puts("\nNAND boot... ");
35 /* copy code to DDR and jump to it - this should not return */
36 /* NOTE - code has to be copied out of NAND buffer before
37 * other blocks can be read.
39 relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC_SP, 0,
40 CONFIG_SYS_NAND_U_BOOT_RELOC);
43 void board_init_r(gd_t *gd, ulong dest_addr)
51 NS16550_putc((NS16550_t)CONFIG_SYS_NS16550_COM1, '\r');
53 NS16550_putc((NS16550_t)CONFIG_SYS_NS16550_COM1, c);
56 void puts(const char *str)