]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/imx-common/cpu.c
arm/imx-common: Fix warning 'get_reset_cause' defined but not used
[u-boot] / arch / arm / imx-common / cpu.c
index b58df7da6fc1e3f992e2f5f5ad2e4b40afabb1ea..0cd08cb951b91fda82f19011a3f3ba5d5a313909 100644 (file)
 #include <fsl_esdhc.h>
 #endif
 
-char *get_reset_cause(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+static u32 reset_cause = -1;
+
+static char *get_reset_cause(void)
 {
        u32 cause;
        struct src *src_regs = (struct src *)SRC_BASE_ADDR;
 
        cause = readl(&src_regs->srsr);
        writel(cause, &src_regs->srsr);
+       reset_cause = cause;
 
        switch (cause) {
        case 0x00001:
@@ -53,6 +57,12 @@ char *get_reset_cause(void)
        }
 }
 
+u32 get_imx_reset_cause(void)
+{
+       return reset_cause;
+}
+#endif
+
 #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
 #if defined(CONFIG_MX53)
 #define MEMCTL_BASE    ESDCTL_BASE_ADDR
@@ -206,6 +216,9 @@ void arch_preboot_os(void)
 {
 #if defined(CONFIG_CMD_SATA)
        sata_stop();
+#if defined(CONFIG_MX6)
+       disable_sata_clock();
+#endif
 #endif
 #if defined(CONFIG_VIDEO_IPUV3)
        /* disable video before launching O/S */