diff options
author | Vladimir Zapolskiy <vzapolskiy@gmail.com> | 2010-03-19 11:16:37 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-03-30 08:21:12 -0400 |
commit | a7dc12ba756021a95866730b482c6e34b13f84ee (patch) | |
tree | c1a3ceb86ca92278fbb94008487ed38349763647 | |
parent | 0491fcbb76339cecbe4b6b1e862fb0c166bacf2d (diff) |
imx3: Add watchdog platform device support
This patch adds support for build-in watchdog device found on
Freescale imx31 and imx35 SoCs.
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 3 |
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 6adb586515ea..f8911154a9fa 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -575,11 +575,26 @@ struct platform_device imx_ssi_device1 = { | |||
575 | .resource = imx_ssi_resources1, | 575 | .resource = imx_ssi_resources1, |
576 | }; | 576 | }; |
577 | 577 | ||
578 | static int mx3_devices_init(void) | 578 | static struct resource imx_wdt_resources[] = { |
579 | { | ||
580 | .flags = IORESOURCE_MEM, | ||
581 | }, | ||
582 | }; | ||
583 | |||
584 | struct platform_device imx_wdt_device0 = { | ||
585 | .name = "imx-wdt", | ||
586 | .id = 0, | ||
587 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
588 | .resource = imx_wdt_resources, | ||
589 | }; | ||
590 | |||
591 | static int __init mx3_devices_init(void) | ||
579 | { | 592 | { |
580 | if (cpu_is_mx31()) { | 593 | if (cpu_is_mx31()) { |
581 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | 594 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; |
582 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | 595 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; |
596 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; | ||
597 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; | ||
583 | mxc_register_device(&mxc_rnga_device, NULL); | 598 | mxc_register_device(&mxc_rnga_device, NULL); |
584 | } | 599 | } |
585 | if (cpu_is_mx35()) { | 600 | if (cpu_is_mx35()) { |
@@ -597,6 +612,8 @@ static int mx3_devices_init(void) | |||
597 | imx_ssi_resources0[1].end = MX35_INT_SSI1; | 612 | imx_ssi_resources0[1].end = MX35_INT_SSI1; |
598 | imx_ssi_resources1[1].start = MX35_INT_SSI2; | 613 | imx_ssi_resources1[1].start = MX35_INT_SSI2; |
599 | imx_ssi_resources1[1].end = MX35_INT_SSI2; | 614 | imx_ssi_resources1[1].end = MX35_INT_SSI2; |
615 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | ||
616 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | ||
600 | } | 617 | } |
601 | 618 | ||
602 | return 0; | 619 | return 0; |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 42cf175eac6b..4f77eb501274 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1; | |||
25 | extern struct platform_device mxc_spi_device2; | 25 | extern struct platform_device mxc_spi_device2; |
26 | extern struct platform_device imx_ssi_device0; | 26 | extern struct platform_device imx_ssi_device0; |
27 | extern struct platform_device imx_ssi_device1; | 27 | extern struct platform_device imx_ssi_device1; |
28 | 28 | extern struct platform_device imx_ssi_device1; | |
29 | extern struct platform_device imx_wdt_device0; | ||