summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlison Wang <b18965@freescale.com>2012-10-08 13:45:50 +0800
committerAndy Voltz <andy.voltz@timesys.com>2012-10-17 14:37:25 -0400
commit22a4d5c27e8b90264637dcec6bfd02766daa3dd5 (patch)
tree6a9f60bd6d139fa0a72e422c21fde67318256ca1
parent56c3a9d88448dfdd858f69b8733cc91a505766cb (diff)
ENGR00212250-1: watchdog: Add platform support for watchdog driver
Add platform support for watchdog driver. Signed-off-by: Wang Xiaojun <b41435@freescale.com>
-rw-r--r--arch/arm/mach-mvf/board-twr-vf700.c2
-rw-r--r--arch/arm/mach-mvf/clock.c14
-rw-r--r--arch/arm/mach-mvf/devices-mvf.h4
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx2-wdt.c8
4 files changed, 27 insertions, 1 deletions
diff --git a/arch/arm/mach-mvf/board-twr-vf700.c b/arch/arm/mach-mvf/board-twr-vf700.c
index a796fde9a562..f725b8c25bef 100644
--- a/arch/arm/mach-mvf/board-twr-vf700.c
+++ b/arch/arm/mach-mvf/board-twr-vf700.c
@@ -472,6 +472,8 @@ static void __init mvf_board_init(void)
mxc_register_device(&mvf_twr_audio_device, &mvf_twr_audio_data);
mvfa5_add_sai(2, &mvf_sai_pdata);
+ mvf_add_wdt(0);
+
mvf_twr_init_usb();
mvf_add_nand(&mvf_data);
diff --git a/arch/arm/mach-mvf/clock.c b/arch/arm/mach-mvf/clock.c
index 0541ee92ac9c..4e0451aff8c4 100644
--- a/arch/arm/mach-mvf/clock.c
+++ b/arch/arm/mach-mvf/clock.c
@@ -1638,6 +1638,18 @@ static struct clk i2c_clk[] = {
},
};
+static struct clk wdt_clk[] = {
+ {
+ __INIT_CLK_DEBUG(wdt_clk)
+ .id = 0,
+ .parent = &ipg_clk,
+ .enable_reg = MXC_CCM_CCGR1,
+ .enable_shift = MXC_CCM_CCGRx_CG7_OFFSET,
+ .enable = _clk_enable,
+ .disable = _clk_disable,
+ },
+};
+
static int ftm_pwm_clk_enable(struct clk *pwm_clk)
{
u32 reg;
@@ -1850,7 +1862,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("mvf-dspi.0", NULL, dspi_clk[0]),
_REGISTER_CLOCK("pit", NULL, pit_clk),
_REGISTER_CLOCK("fec.0", NULL, enet_clk[0]),
- _REGISTER_CLOCK("mvf-wdt.0", NULL, dummy_clk),
+ _REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk),
_REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc1_clk),
_REGISTER_CLOCK("mvf-dcu.0", NULL, dcu0_clk),
_REGISTER_CLOCK("mvf-sai.0", NULL, sai2_clk),
diff --git a/arch/arm/mach-mvf/devices-mvf.h b/arch/arm/mach-mvf/devices-mvf.h
index d34b72ba89c9..c79cddd7a496 100644
--- a/arch/arm/mach-mvf/devices-mvf.h
+++ b/arch/arm/mach-mvf/devices-mvf.h
@@ -142,6 +142,10 @@ extern const struct imx_imx2_wdt_data mvf_imx2_wdt_data[] __initconst;
#define mvf_add_imx2_wdt(id, pdata) \
imx_add_imx2_wdt(&mvf_imx2_wdt_data[id])
+extern const struct imx_imx2_wdt_data fsl_imx2_wdt_data[] __initconst;
+#define mvf_add_wdt(id) \
+ imx_add_imx2_wdt(&fsl_imx2_wdt_data[id])
+
extern const struct imx_pm_imx_data mvf_pm_imx_data __initconst;
#define mvf_add_pm_imx(id, pdata) \
imx_add_pm_imx(&mvf_pm_imx_data, pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
index 872515a04099..764e5bb7b771 100644
--- a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
+++ b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
@@ -71,6 +71,14 @@ const struct imx_imx2_wdt_data imx6q_imx2_wdt_data[] __initconst = {
};
#endif
+#ifdef CONFIG_SOC_MVFA5
+const struct imx_imx2_wdt_data fsl_imx2_wdt_data[] __initconst = {
+#define fsl_imx2_wdt_data_entry(_id, _hwid) \
+ imx_imx2_wdt_data_entry(MVF, _id, _hwid, SZ_16K)
+ fsl_imx2_wdt_data_entry(0, 1),
+};
+#endif /* ifdef CONFIG_SOC_MVFA5 */
+
struct platform_device *__init imx_add_imx2_wdt(
const struct imx_imx2_wdt_data *data)
{