diff mbox series

[6/7] MIPS: BCM63XX: Provide platform data to watchdog device

Message ID 20211028172322.4021440-7-f.fainelli@gmail.com (mailing list archive)
State Superseded
Headers show
Series Removal of bcm63xx-wdt | expand

Commit Message

Florian Fainelli Oct. 28, 2021, 5:23 p.m. UTC
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>
---
 arch/mips/bcm63xx/dev-wdt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Guenter Roeck Oct. 28, 2021, 6:19 p.m. UTC | #1
On Thu, Oct 28, 2021 at 10:23:21AM -0700, Florian Fainelli wrote:
> 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>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

We'd need an Ack from a mips maintainer to apply this patch through
the watchdog tree.

Guenter

> ---
>  arch/mips/bcm63xx/dev-wdt.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> 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)
> -- 
> 2.25.1
>
Thomas Bogendoerfer Nov. 2, 2021, 10:19 a.m. UTC | #2
On Thu, Oct 28, 2021 at 10:23:21AM -0700, Florian Fainelli wrote:
> 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>
> ---
>  arch/mips/bcm63xx/dev-wdt.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> 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)
> -- 
> 2.25.1

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
diff mbox series

Patch

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)