Merge branch 'master' of git://git.denx.de/u-boot-blackfin
[oweals/u-boot.git] / board / davedenx / qong / qong.c
index 8a81cfc68615617b63c55ef1de496d3a1d9c9c0c..ec226276803fc234dd3f73eea123a65ec6184af2 100644 (file)
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include <nand.h>
 #include <fsl_pmic.h>
 #include <mxc_gpio.h>
 #include "qong_fpga.h"
+#include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_HW_WATCHDOG
+void hw_watchdog_reset(void)
+{
+       mxc_hw_watchdog_reset();
+}
+#endif
+
 int dram_init (void)
 {
        /* dram_init must store complete ramsize in gd->ram_size */
-       gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
+       gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
                                PHYS_SDRAM_1_SIZE);
        return 0;
 }
@@ -202,6 +210,10 @@ int board_late_init(void)
        pmic_reg_write(REG_POWER_CTL0, val | COINCHEN);
        pmic_reg_write(REG_INT_STATUS1, RTCRSTI);
 
+#ifdef CONFIG_HW_WATCHDOG
+       mxc_hw_watchdog_enable();
+#endif
+
        return 0;
 }