summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorThomas Reitmayr <treitmayr@devbase.at>2009-02-24 14:59:22 -0800
committerWim Van Sebroeck <wim@iguana.be>2009-03-25 09:02:50 +0000
commit9e058d4f57751daa008b764735f97fdfccfeab6c (patch)
treed9e194a94ab6b1dd30400570c8796ab017185cdc /arch/arm
parentf296b14355a2d0cb170a85236ec391bb0a3fdb3a (diff)
downloadlinux-9e058d4f57751daa008b764735f97fdfccfeab6c.tar.bz2
[WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data
The orion5x-wdt driver is now registered as a platform device and receives the tclk value as platform data. This fixes a compile issue cause by a previously removed define "ORION5X_TCLK". Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Kristof Provost <kristof@sigsegv.be> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Martin Michlmayr <tbm@cyrius.com> Cc: Sylver Bruneau <sylver.bruneau@googlemail.com> Cc: Kunihiko IMAI <bak@d2.dion.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-orion5x/common.c29
-rw-r--r--arch/arm/plat-orion/include/plat/orion5x_wdt.h18
2 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 8a0e49d84256..1a1df24f419e 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -31,6 +31,7 @@
#include <plat/ehci-orion.h>
#include <plat/mv_xor.h>
#include <plat/orion_nand.h>
+#include <plat/orion5x_wdt.h>
#include <plat/time.h>
#include "common.h"
@@ -533,6 +534,29 @@ void __init orion5x_xor_init(void)
/*****************************************************************************
+ * Watchdog
+ ****************************************************************************/
+static struct orion5x_wdt_platform_data orion5x_wdt_data = {
+ .tclk = 0,
+};
+
+static struct platform_device orion5x_wdt_device = {
+ .name = "orion5x_wdt",
+ .id = -1,
+ .dev = {
+ .platform_data = &orion5x_wdt_data,
+ },
+ .num_resources = 0,
+};
+
+void __init orion5x_wdt_init(void)
+{
+ orion5x_wdt_data.tclk = orion5x_tclk;
+ platform_device_register(&orion5x_wdt_device);
+}
+
+
+/*****************************************************************************
* Time handling
****************************************************************************/
int orion5x_tclk;
@@ -631,6 +655,11 @@ void __init orion5x_init(void)
printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
disable_hlt();
}
+
+ /*
+ * Register watchdog driver
+ */
+ orion5x_wdt_init();
}
/*
diff --git a/arch/arm/plat-orion/include/plat/orion5x_wdt.h b/arch/arm/plat-orion/include/plat/orion5x_wdt.h
new file mode 100644
index 000000000000..3c9cf6a305ef
--- /dev/null
+++ b/arch/arm/plat-orion/include/plat/orion5x_wdt.h
@@ -0,0 +1,18 @@
+/*
+ * arch/arm/plat-orion/include/plat/orion5x_wdt.h
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __PLAT_ORION5X_WDT_H
+#define __PLAT_ORION5X_WDT_H
+
+struct orion5x_wdt_platform_data {
+ u32 tclk; /* no <linux/clk.h> support yet */
+};
+
+
+#endif
+