aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 07:32:47 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 15:10:03 -0400
commit5e00d3783dd362a34c9816bb582103c9833e4643 (patch)
treefae2485cc6ab26c1f1138b473488111e4b7f5af1 /arch/arm
parent980f9f601ad456dc5a699bf526b6bd894957bad3 (diff)
ARM: orion: Consolidate the platform data setup for the watchdog.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-kirkwood/common.c17
-rw-r--r--arch/arm/mach-orion5x/common.c17
-rw-r--r--arch/arm/plat-orion/common.c21
-rw-r--r--arch/arm/plat-orion/include/plat/common.h2
4 files changed, 25 insertions, 32 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index af864fc7883b..08847a6f7d10 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -29,7 +29,6 @@
29#include <plat/mvsdio.h> 29#include <plat/mvsdio.h>
30#include <plat/mv_xor.h> 30#include <plat/mv_xor.h>
31#include <plat/orion_nand.h> 31#include <plat/orion_nand.h>
32#include <plat/orion_wdt.h>
33#include <plat/common.h> 32#include <plat/common.h>
34#include <plat/time.h> 33#include <plat/time.h>
35#include "common.h" 34#include "common.h"
@@ -575,23 +574,9 @@ static void __init kirkwood_xor1_init(void)
575/***************************************************************************** 574/*****************************************************************************
576 * Watchdog 575 * Watchdog
577 ****************************************************************************/ 576 ****************************************************************************/
578static struct orion_wdt_platform_data kirkwood_wdt_data = {
579 .tclk = 0,
580};
581
582static struct platform_device kirkwood_wdt_device = {
583 .name = "orion_wdt",
584 .id = -1,
585 .dev = {
586 .platform_data = &kirkwood_wdt_data,
587 },
588 .num_resources = 0,
589};
590
591static void __init kirkwood_wdt_init(void) 577static void __init kirkwood_wdt_init(void)
592{ 578{
593 kirkwood_wdt_data.tclk = kirkwood_tclk; 579 orion_wdt_init(kirkwood_tclk);
594 platform_device_register(&kirkwood_wdt_device);
595} 580}
596 581
597 582
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index d2dee431635a..c26e6dbe489b 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -30,7 +30,6 @@
30#include <plat/ehci-orion.h> 30#include <plat/ehci-orion.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/orion_wdt.h>
34#include <plat/time.h> 33#include <plat/time.h>
35#include <plat/common.h> 34#include <plat/common.h>
36#include "common.h" 35#include "common.h"
@@ -380,23 +379,9 @@ static int __init orion5x_crypto_init(void)
380/***************************************************************************** 379/*****************************************************************************
381 * Watchdog 380 * Watchdog
382 ****************************************************************************/ 381 ****************************************************************************/
383static struct orion_wdt_platform_data orion5x_wdt_data = {
384 .tclk = 0,
385};
386
387static struct platform_device orion5x_wdt_device = {
388 .name = "orion_wdt",
389 .id = -1,
390 .dev = {
391 .platform_data = &orion5x_wdt_data,
392 },
393 .num_resources = 0,
394};
395
396void __init orion5x_wdt_init(void) 382void __init orion5x_wdt_init(void)
397{ 383{
398 orion5x_wdt_data.tclk = orion5x_tclk; 384 orion_wdt_init(orion5x_tclk);
399 platform_device_register(&orion5x_wdt_device);
400} 385}
401 386
402 387
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 2afe79d1a273..65022094747a 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -18,6 +18,7 @@
18#include <linux/mv643xx_i2c.h> 18#include <linux/mv643xx_i2c.h>
19#include <net/dsa.h> 19#include <net/dsa.h>
20#include <linux/spi/orion_spi.h> 20#include <linux/spi/orion_spi.h>
21#include <plat/orion_wdt.h>
21 22
22/* Fill in the resources structure and link it into the platform 23/* Fill in the resources structure and link it into the platform
23 device structure. There is always a memory region, and nearly 24 device structure. There is always a memory region, and nearly
@@ -564,3 +565,23 @@ void __init orion_spi_1_init(unsigned long mapbase,
564 mapbase, SZ_512 - 1, NO_IRQ); 565 mapbase, SZ_512 - 1, NO_IRQ);
565 platform_device_register(&orion_spi_1); 566 platform_device_register(&orion_spi_1);
566} 567}
568
569/*****************************************************************************
570 * Watchdog
571 ****************************************************************************/
572static struct orion_wdt_platform_data orion_wdt_data;
573
574static struct platform_device orion_wdt_device = {
575 .name = "orion_wdt",
576 .id = -1,
577 .dev = {
578 .platform_data = &orion_wdt_data,
579 },
580 .num_resources = 0,
581};
582
583void __init orion_wdt_init(unsigned long tclk)
584{
585 orion_wdt_data.tclk = tclk;
586 platform_device_register(&orion_wdt_device);
587}
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h
index e72c1466d6ce..38ae4bfd22a4 100644
--- a/arch/arm/plat-orion/include/plat/common.h
+++ b/arch/arm/plat-orion/include/plat/common.h
@@ -79,4 +79,6 @@ void __init orion_spi_init(unsigned long mapbase,
79 79
80void __init orion_spi_1_init(unsigned long mapbase, 80void __init orion_spi_1_init(unsigned long mapbase,
81 unsigned long tclk); 81 unsigned long tclk);
82
83void __init orion_wdt_init(unsigned long tclk);
82#endif 84#endif