aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r--arch/arm/mach-orion5x/common.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 8a0e49d84256..68cc3efae567 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -31,6 +31,7 @@
31#include <plat/ehci-orion.h> 31#include <plat/ehci-orion.h>
32#include <plat/mv_xor.h> 32#include <plat/mv_xor.h>
33#include <plat/orion_nand.h> 33#include <plat/orion_nand.h>
34#include <plat/orion5x_wdt.h>
34#include <plat/time.h> 35#include <plat/time.h>
35#include "common.h" 36#include "common.h"
36 37
@@ -219,14 +220,17 @@ static struct platform_device orion5x_switch_device = {
219 220
220void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) 221void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq)
221{ 222{
223 int i;
224
222 if (irq != NO_IRQ) { 225 if (irq != NO_IRQ) {
223 orion5x_switch_resources[0].start = irq; 226 orion5x_switch_resources[0].start = irq;
224 orion5x_switch_resources[0].end = irq; 227 orion5x_switch_resources[0].end = irq;
225 orion5x_switch_device.num_resources = 1; 228 orion5x_switch_device.num_resources = 1;
226 } 229 }
227 230
228 d->mii_bus = &orion5x_eth_shared.dev;
229 d->netdev = &orion5x_eth.dev; 231 d->netdev = &orion5x_eth.dev;
232 for (i = 0; i < d->nr_chips; i++)
233 d->chip[i].mii_bus = &orion5x_eth_shared.dev;
230 orion5x_switch_device.dev.platform_data = d; 234 orion5x_switch_device.dev.platform_data = d;
231 235
232 platform_device_register(&orion5x_switch_device); 236 platform_device_register(&orion5x_switch_device);
@@ -533,6 +537,29 @@ void __init orion5x_xor_init(void)
533 537
534 538
535/***************************************************************************** 539/*****************************************************************************
540 * Watchdog
541 ****************************************************************************/
542static struct orion5x_wdt_platform_data orion5x_wdt_data = {
543 .tclk = 0,
544};
545
546static struct platform_device orion5x_wdt_device = {
547 .name = "orion5x_wdt",
548 .id = -1,
549 .dev = {
550 .platform_data = &orion5x_wdt_data,
551 },
552 .num_resources = 0,
553};
554
555void __init orion5x_wdt_init(void)
556{
557 orion5x_wdt_data.tclk = orion5x_tclk;
558 platform_device_register(&orion5x_wdt_device);
559}
560
561
562/*****************************************************************************
536 * Time handling 563 * Time handling
537 ****************************************************************************/ 564 ****************************************************************************/
538int orion5x_tclk; 565int orion5x_tclk;
@@ -631,6 +658,11 @@ void __init orion5x_init(void)
631 printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n"); 658 printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
632 disable_hlt(); 659 disable_hlt();
633 } 660 }
661
662 /*
663 * Register watchdog driver
664 */
665 orion5x_wdt_init();
634} 666}
635 667
636/* 668/*