Commit b844f918 authored by Florian Fainelli's avatar Florian Fainelli Committed by Wim Van Sebroeck

MIPS: BCM63XX: Provide platform data to watchdog device

In order to utilize the bcm7038_wdt.c driver which needs to know the
clock name to obtain, pass it via platform data using the
bcm7038_wdt_platform_data structure.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Acked-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20211112224636.395101-7-f.fainelli@gmail.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent e764faef
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/bcm7038_wdt.h>
#include <bcm63xx_cpu.h> #include <bcm63xx_cpu.h>
static struct resource wdt_resources[] = { static struct resource wdt_resources[] = {
...@@ -19,11 +20,18 @@ static struct resource wdt_resources[] = { ...@@ -19,11 +20,18 @@ static struct resource wdt_resources[] = {
}, },
}; };
static struct bcm7038_wdt_platform_data bcm63xx_wdt_pdata = {
.clk_name = "periph",
};
static struct platform_device bcm63xx_wdt_device = { static struct platform_device bcm63xx_wdt_device = {
.name = "bcm63xx-wdt", .name = "bcm63xx-wdt",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(wdt_resources), .num_resources = ARRAY_SIZE(wdt_resources),
.resource = wdt_resources, .resource = wdt_resources,
.dev = {
.platform_data = &bcm63xx_wdt_pdata,
},
}; };
int __init bcm63xx_wdt_register(void) int __init bcm63xx_wdt_register(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment