summaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm63xx
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2021-11-12 23:46:35 +0100
committerWim Van Sebroeck <wim@linux-watchdog.org>2021-12-28 14:03:02 +0100
commitb844f9181b4a1014d501a26dc25b39f363626b8c (patch)
treec23238d6b518fa018e00aff6a5c5119e9f557686 /arch/mips/bcm63xx
parentwatchdog: bcm7038_wdt: Add platform device id for bcm63xx-wdt (diff)
downloadlinux-b844f9181b4a1014d501a26dc25b39f363626b8c.tar.xz
linux-b844f9181b4a1014d501a26dc25b39f363626b8c.zip
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: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20211112224636.395101-7-f.fainelli@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'arch/mips/bcm63xx')
-rw-r--r--arch/mips/bcm63xx/dev-wdt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/dev-wdt.c b/arch/mips/bcm63xx/dev-wdt.c
index 2a2346a99bcb..42130914a3c2 100644
--- a/arch/mips/bcm63xx/dev-wdt.c
+++ b/arch/mips/bcm63xx/dev-wdt.c
@@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
+#include <linux/platform_data/bcm7038_wdt.h>
#include <bcm63xx_cpu.h>
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 = {
.name = "bcm63xx-wdt",
.id = -1,
.num_resources = ARRAY_SIZE(wdt_resources),
.resource = wdt_resources,
+ .dev = {
+ .platform_data = &bcm63xx_wdt_pdata,
+ },
};
int __init bcm63xx_wdt_register(void)