diff options
author | Thomas Reitmayr <treitmayr@devbase.at> | 2009-06-01 07:38:34 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-06-08 13:04:59 -0400 |
commit | 054bd3f053de54c81b20df11f354476389826e61 (patch) | |
tree | 9e2a70dac9ee0619e32d95cd96b378e290167ce6 /arch/arm/mach-kirkwood | |
parent | 6462c6160af557c310d5941f4700ea2c7f6c67b2 (diff) |
[ARM] Kirkwood: Add the watchdog timer as a platform device.
The Kirkwood architecture uses the same watchdog device as the Orion
architecture. This patch adds orion5x_wdt as a platform device for
Kirkwood.
Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 3 |
2 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index d127731f47d..a053184bdee 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <plat/mvsdio.h> | 30 | #include <plat/mvsdio.h> |
31 | #include <plat/mv_xor.h> | 31 | #include <plat/mv_xor.h> |
32 | #include <plat/orion_nand.h> | 32 | #include <plat/orion_nand.h> |
33 | #include <plat/orion5x_wdt.h> | ||
33 | #include <plat/time.h> | 34 | #include <plat/time.h> |
34 | #include "common.h" | 35 | #include "common.h" |
35 | 36 | ||
@@ -768,6 +769,29 @@ static void __init kirkwood_xor1_init(void) | |||
768 | 769 | ||
769 | 770 | ||
770 | /***************************************************************************** | 771 | /***************************************************************************** |
772 | * Watchdog | ||
773 | ****************************************************************************/ | ||
774 | static struct orion5x_wdt_platform_data kirkwood_wdt_data = { | ||
775 | .tclk = 0, | ||
776 | }; | ||
777 | |||
778 | static struct platform_device kirkwood_wdt_device = { | ||
779 | .name = "orion5x_wdt", | ||
780 | .id = -1, | ||
781 | .dev = { | ||
782 | .platform_data = &kirkwood_wdt_data, | ||
783 | }, | ||
784 | .num_resources = 0, | ||
785 | }; | ||
786 | |||
787 | static void __init kirkwood_wdt_init(void) | ||
788 | { | ||
789 | kirkwood_wdt_data.tclk = kirkwood_tclk; | ||
790 | platform_device_register(&kirkwood_wdt_device); | ||
791 | } | ||
792 | |||
793 | |||
794 | /***************************************************************************** | ||
771 | * Time handling | 795 | * Time handling |
772 | ****************************************************************************/ | 796 | ****************************************************************************/ |
773 | int kirkwood_tclk; | 797 | int kirkwood_tclk; |
@@ -859,6 +883,7 @@ void __init kirkwood_init(void) | |||
859 | 883 | ||
860 | /* internal devices that every board has */ | 884 | /* internal devices that every board has */ |
861 | kirkwood_rtc_init(); | 885 | kirkwood_rtc_init(); |
886 | kirkwood_wdt_init(); | ||
862 | kirkwood_xor0_init(); | 887 | kirkwood_xor0_init(); |
863 | kirkwood_xor1_init(); | 888 | kirkwood_xor1_init(); |
864 | } | 889 | } |
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index 00d96abb718..9e80d9232c8 100644 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h | |||
@@ -17,12 +17,15 @@ | |||
17 | #define CPU_RESET 0x00000002 | 17 | #define CPU_RESET 0x00000002 |
18 | 18 | ||
19 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | 19 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) |
20 | #define WDT_RESET_OUT_EN 0x00000002 | ||
20 | #define SOFT_RESET_OUT_EN 0x00000004 | 21 | #define SOFT_RESET_OUT_EN 0x00000004 |
21 | 22 | ||
22 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 23 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) |
23 | #define SOFT_RESET 0x00000001 | 24 | #define SOFT_RESET 0x00000001 |
24 | 25 | ||
25 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | 26 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) |
27 | #define WDT_INT_REQ 0x0008 | ||
28 | |||
26 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | 29 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) |
27 | #define BRIDGE_INT_TIMER0 0x0002 | 30 | #define BRIDGE_INT_TIMER0 0x0002 |
28 | #define BRIDGE_INT_TIMER1 0x0004 | 31 | #define BRIDGE_INT_TIMER1 0x0004 |