Skip to content

Commit

Permalink
MIPS: ath79: add common watchdog device
Browse files Browse the repository at this point in the history
All supported SoCs have a built-in hardware watchdog driver. This patch
registers a platform_device for that to make it usable.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1955/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
juhosg authored and ralfbaechle committed Jan 18, 2011
1 parent d8fec1f commit 858f763
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/mips/ath79/dev-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ void __init ath79_register_uart(void)
ath79_uart_data[0].uartclk = clk_get_rate(clk);
platform_device_register(&ath79_uart_device);
}

static struct platform_device ath79_wdt_device = {
.name = "ath79-wdt",
.id = -1,
};

void __init ath79_register_wdt(void)
{
platform_device_register(&ath79_wdt_device);
}
1 change: 1 addition & 0 deletions arch/mips/ath79/dev-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
#define _ATH79_DEV_COMMON_H

void ath79_register_uart(void);
void ath79_register_wdt(void);

#endif /* _ATH79_DEV_COMMON_H */
1 change: 1 addition & 0 deletions arch/mips/ath79/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ static int __init ath79_setup(void)
{
ath79_gpio_init();
ath79_register_uart();
ath79_register_wdt();

mips_machine_setup();

Expand Down

0 comments on commit 858f763

Please sign in to comment.