diff options
author | Frank Li <Frank.Li@freescale.com> | 2011-07-15 14:33:10 +0800 |
---|---|---|
committer | Frank Li <Frank.Li@freescale.com> | 2011-07-15 14:35:54 +0800 |
commit | f59a4fb0ffa762f640d6ec79f2d27b74f261900b (patch) | |
tree | 154dad62143a9d626c5d1b96ae1541705ed7adde /arch | |
parent | ca5681393678ba9857cd8aea2a6d67938b443bb2 (diff) |
ENGR00139234-2 MX6: add watchdog device
Add watchdog device
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx6/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabreauto.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx6/clock.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-mx6/devices-imx6q.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx2-wdt.c | 9 |
5 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/Kconfig b/arch/arm/mach-mx6/Kconfig index 2ff2d19a0c43..77eae0a0f84f 100644 --- a/arch/arm/mach-mx6/Kconfig +++ b/arch/arm/mach-mx6/Kconfig @@ -37,6 +37,7 @@ config MACH_MX6Q_SABREAUTO select IMX_HAVE_PLATFORM_FSL_USB_WAKEUP select IMX_HAVE_PLATFORM_AHCI select IMX_HAVE_PLATFORM_IMX_OCOTP + select IMX_HAVE_PLATFORM_IMX2_WDT help Include support for i.MX 6Quad SABRE Automotive Infotainment platform. This includes specific configurations for the board and its peripherals. diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c index e61463db65d7..b45081a885c2 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c +++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c @@ -510,6 +510,7 @@ static void __init mx6_board_init(void) gpio_request(MX6Q_SABREAUTO_LDB_BACKLIGHT, "ldb-backlight"); gpio_direction_output(MX6Q_SABREAUTO_LDB_BACKLIGHT, 1); imx6q_add_otp(); + imx6q_add_imx2_wdt(0, NULL); } extern void __iomem *twd_base; diff --git a/arch/arm/mach-mx6/clock.c b/arch/arm/mach-mx6/clock.c index 1fc5c940b61d..61cb23567525 100644 --- a/arch/arm/mach-mx6/clock.c +++ b/arch/arm/mach-mx6/clock.c @@ -3858,6 +3858,10 @@ static struct clk usboh3_clk = { .disable = _clk_disable, }; +static struct clk dummy_clk = { + .id = 0, +}; + #define _REGISTER_CLOCK(d, n, c) \ { \ .dev_id = d, \ @@ -3963,6 +3967,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "usboh3_clk", usboh3_clk), _REGISTER_CLOCK(NULL, "usb_phy1_clk", usb_phy1_clk), _REGISTER_CLOCK(NULL, "video_27M_clk", video_27M_clk), + _REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk), + _REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk), }; diff --git a/arch/arm/mach-mx6/devices-imx6q.h b/arch/arm/mach-mx6/devices-imx6q.h index 7f993c05b8db..1a304a059074 100644 --- a/arch/arm/mach-mx6/devices-imx6q.h +++ b/arch/arm/mach-mx6/devices-imx6q.h @@ -104,3 +104,6 @@ extern const struct imx_otp_data imx6q_otp_data __initconst; #define imx6q_add_otp() \ imx_add_otp(&imx6q_otp_data); +extern const struct imx_imx2_wdt_data imx6q_imx2_wdt_data[] __initconst; +#define imx6q_add_imx2_wdt(id, pdata) \ + imx_add_imx2_wdt(&imx6q_imx2_wdt_data[id]) diff --git a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c index 5e07ef2bf1c4..872515a04099 100644 --- a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c +++ b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c @@ -62,6 +62,15 @@ const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = { }; #endif /* ifdef CONFIG_SOC_IMX53 */ +#ifdef CONFIG_SOC_IMX6Q +const struct imx_imx2_wdt_data imx6q_imx2_wdt_data[] __initconst = { +#define imx6q_imx2_wdt_data_entry(_id, _hwid) \ + imx_imx2_wdt_data_entry(MX6Q, _id, _hwid, SZ_16K) + imx6q_imx2_wdt_data_entry(0, 1), + imx6q_imx2_wdt_data_entry(1, 2), +}; +#endif + struct platform_device *__init imx_add_imx2_wdt( const struct imx_imx2_wdt_data *data) { |