ARM: socfpga: Adding clock frequency info for U-Boot
authorTien Fong Chee <tien.fong.chee@intel.com>
Tue, 5 Dec 2017 07:58:07 +0000 (15:58 +0800)
committerMarek Vasut <marex@denx.de>
Fri, 18 May 2018 08:30:47 +0000 (10:30 +0200)
Clock frequency info is required in U-Boot because info would be erased
when transition from SPL to U-Boot.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
arch/arm/mach-socfpga/board.c

index 38e12a41a305cc7d956c3980b3cab0bece0c946c..6e0b4b3c4e6c4834f8019ff8c3841a9b371cded4 100644 (file)
@@ -7,7 +7,9 @@
 
 #include <common.h>
 #include <errno.h>
+#include <fdtdec.h>
 #include <asm/arch/reset_manager.h>
+#include <asm/arch/clock_manager.h>
 #include <asm/io.h>
 
 #include <usb.h>
@@ -25,6 +27,11 @@ int board_init(void)
        /* Address of boot parameters for ATAG (if ATAG is used) */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
+#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
+       /* configuring the clock based on handoff */
+       cm_basic_init(gd->fdt_blob);
+#endif
+
        return 0;
 }