ARM: mx5: Add watchdog support for MX53
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 17 Feb 2011 20:09:52 +0000 (18:09 -0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Fri, 18 Feb 2011 09:57:56 +0000 (10:57 +0100)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx5/clock-mx51-mx53.c
arch/arm/mach-mx5/devices-imx53.h
arch/arm/mach-mx5/mm.c
arch/arm/plat-mxc/devices/platform-imx2-wdt.c
arch/arm/plat-mxc/include/mach/mx53.h

index c66be0ee40c9abfb9b41aa3998a62d57d87d0874..8164b1dd952084e1985c324c6767f03f368bc1cb 100644 (file)
@@ -1336,6 +1336,8 @@ static struct clk_lookup mx53_lookups[] = {
        _REGISTER_CLOCK("imx53-ecspi.0", NULL, ecspi1_clk)
        _REGISTER_CLOCK("imx53-ecspi.1", NULL, ecspi2_clk)
        _REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
+       _REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk)
 };
 
 static void clk_tree_init(void)
index 8639735a117b6bec1898d50dd357fe46ede48ed4..9251008dad1f666d3f9eacb3c6d7c7fb8fa9eda5 100644 (file)
@@ -29,3 +29,7 @@ imx53_sdhci_esdhc_imx_data[] __initconst;
 extern const struct imx_spi_imx_data imx53_ecspi_data[] __initconst;
 #define imx53_add_ecspi(id, pdata)     \
        imx_add_spi_imx(&imx53_ecspi_data[id], pdata)
+
+extern const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst;
+#define imx53_add_imx2_wdt(id, pdata)  \
+       imx_add_imx2_wdt(&imx53_imx2_wdt_data[id])
index 8730cd1b94b1affeb9f6a2123a54b343244d014b..ff557301b42bc90ecdf49a0a15e5c17949e449f9 100644 (file)
@@ -66,7 +66,7 @@ void __init imx53_init_early(void)
 {
        mxc_set_cpu_type(MXC_CPU_MX53);
        mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR));
-       mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG_BASE_ADDR));
+       mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR));
 }
 
 int imx51_register_gpios(void);
index e0aec61177f4401240ded1960dd3ffb3bfec888f..5e07ef2bf1c42510e59d384a9e0ea6c55f7d72a6 100644 (file)
@@ -53,6 +53,15 @@ const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX51 */
 
+#ifdef CONFIG_SOC_IMX53
+const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = {
+#define imx53_imx2_wdt_data_entry(_id, _hwid)                          \
+       imx_imx2_wdt_data_entry(MX53, _id, _hwid, SZ_16K)
+       imx53_imx2_wdt_data_entry(0, 1),
+       imx53_imx2_wdt_data_entry(1, 2),
+};
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
 struct platform_device *__init imx_add_imx2_wdt(
                const struct imx_imx2_wdt_data *data)
 {
index d7a8e52181ea7c767d731bb6993486b7cfe488d3..ace17864575e2ad199305fd06a72b7af1b631486 100644 (file)
@@ -79,7 +79,7 @@
 #define MX53_GPIO3_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x0008C000)
 #define MX53_GPIO4_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x00090000)
 #define MX53_KPP_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x00094000)
-#define MX53_WDOG_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x00098000)
+#define MX53_WDOG1_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x00098000)
 #define MX53_WDOG2_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x0009C000)
 #define MX53_GPT1_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000A0000)
 #define MX53_SRTC_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000A4000)