]> git.sur5r.net Git - u-boot/commitdiff
imx6: disable clock command and print_cpuinfo code in SPL
authorAnatolij Gustschin <agust@denx.de>
Mon, 28 Aug 2017 19:46:26 +0000 (21:46 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 12 Oct 2017 15:30:32 +0000 (17:30 +0200)
We do not use print_cpuinfo and clock command code in SPL,
disable it when building SPL image.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/mx6/clock.c

index 1017eb84f95ad028acd7bab274ec226ae7452267..18205dc98497bbe55af424414f4156e68e60bcde 100644 (file)
@@ -25,7 +25,7 @@
 #include <fsl_esdhc.h>
 #endif
 
-#if defined(CONFIG_DISPLAY_CPUINFO)
+#if defined(CONFIG_DISPLAY_CPUINFO) && !defined(CONFIG_SPL_BUILD)
 static u32 reset_cause = -1;
 
 static char *get_reset_cause(void)
@@ -132,7 +132,7 @@ unsigned imx_ddr_size(void)
 }
 #endif
 
-#if defined(CONFIG_DISPLAY_CPUINFO)
+#if defined(CONFIG_DISPLAY_CPUINFO) && !defined(CONFIG_SPL_BUILD)
 
 const char *get_imx_type(u32 imxtype)
 {
index 0e019c42622f8a4c2b7c0094cf0161646ab83c2b..71a9e6bca0fee4ca8af82e79d912ff02da6bd203 100644 (file)
@@ -1220,6 +1220,20 @@ void enable_thermal_clk(void)
        enable_pll3();
 }
 
+#ifdef CONFIG_MTD_NOR_FLASH
+void enable_eim_clk(unsigned char enable)
+{
+       u32 reg;
+
+       reg = __raw_readl(&imx_ccm->CCGR6);
+       if (enable)
+               reg |= MXC_CCM_CCGR6_EMI_SLOW_MASK;
+       else
+               reg &= ~MXC_CCM_CCGR6_EMI_SLOW_MASK;
+       __raw_writel(reg, &imx_ccm->CCGR6);
+}
+#endif
+
 unsigned int mxc_get_clock(enum mxc_clock clk)
 {
        switch (clk) {
@@ -1262,6 +1276,7 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
        return 0;
 }
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Dump some core clockes.
  */
@@ -1463,20 +1478,6 @@ void select_ldb_di_clock_source(enum ldb_di_clock clk)
 }
 #endif
 
-#ifdef CONFIG_MTD_NOR_FLASH
-void enable_eim_clk(unsigned char enable)
-{
-       u32 reg;
-
-       reg = __raw_readl(&imx_ccm->CCGR6);
-       if (enable)
-               reg |= MXC_CCM_CCGR6_EMI_SLOW_MASK;
-       else
-               reg &= ~MXC_CCM_CCGR6_EMI_SLOW_MASK;
-       __raw_writel(reg, &imx_ccm->CCGR6);
-}
-#endif
-
 /***************************************************/
 
 U_BOOT_CMD(
@@ -1484,3 +1485,4 @@ U_BOOT_CMD(
        "display clocks",
        ""
 );
+#endif