From e86bd43bcfc579cf8935c1913e92cb76b4ba81c2 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 8 Sep 2019 22:33:51 +0200 Subject: watchdog: sa1100: use platform device registration Rather than relying on machine specific headers to pass down the reboot status and the register locations, use resources and platform_data. Aside from this, keep the changes to a minimum. Cc: Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org Acked-by: Guenter Roeck Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/devices.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-pxa/devices.c') diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 454523237c97..12f78636045f 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -24,6 +24,8 @@ #include #include +#include +#include #include "devices.h" #include "generic.h" @@ -1118,3 +1120,12 @@ void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata) { pxa_register_device(&pxa2xx_pxa_dma, dma_pdata); } + +void __init pxa_register_wdt(unsigned int reset_status) +{ + struct resource res = DEFINE_RES_MEM(OST_PHYS, OST_LEN); + + reset_status &= RESET_STATUS_WATCHDOG; + platform_device_register_resndata(NULL, "sa1100_wdt", -1, &res, 1, + &reset_status, sizeof(reset_status)); +} -- cgit