watchdog: at91rm9200: add DT support
PATCH 1/1 watchdog: at91rm9200: add DT support
--- .../devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt | 9 +++++++++ drivers/watchdog/Kconfig | 2 +- drivers/watchdog/at91rm9200_wdt.c | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt
Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt new file +9 -0
@@ -0,0 +1,9 @@ +Atmel AT91RM9200 System Timer Watchdog + +Required properties: +- compatible: must be "atmel,at91sam9260-wdt". + +Example: + watchdog@fffffd00 { + compatible = "atmel,at91rm9200-wdt"; + };
drivers/watchdog/Kconfig +1 -1
@@ -116,7 +116,7 @@ config ARM_SP805_WATCHDOG config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" - depends on ARCH_AT91RM9200 + depends on ARCH_AT91 help Watchdog timer embedded into AT91RM9200 chips. This will reboot your system when the timeout is reached.
drivers/watchdog/at91rm9200_wdt.c +9 -0
@@ -24,6 +24,8 @@#include <linux/types.h> #include <linux/watchdog.h> #include <linux/uaccess.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <mach/at91_st.h> #define WDT_DEFAULT_TIME 5/* seconds */
@@ -252,6 +254,12 @@ static int at91wdt_resume(struct platform_device *pdev)#define at91wdt_resume NULL#endif +static const struct of_device_id at91_wdt_dt_ids[] = { + { .compatible ="atmel,at91rm9200-wdt" }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, at91_wdt_dt_ids); +static struct platform_driver at91wdt_driver = { .probe = at91wdt_probe, .remove = at91wdt_remove,
@@ -261,6 +269,7 @@ static struct platform_driver at91wdt_driver = { .driver = { .name = "at91_wdt", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(at91_wdt_dt_ids), }, };
Signature · 1 line
1.8.0
A message that is not in the archive (sent off-list or not yet received): 1360879349-17369-1-git-send-email-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Hi Joachim,
Quoted 1 line
Signed-off-by Joachim Eastwood <[email protected]>
Added to linux-watchdog-next.
Kind regards,
Wim.
Hi Joachim,
On 02/14/2013 11:02 PM, Joachim Eastwood :
Quoted 28 lines
Signed-off-by Joachim Eastwood <[email protected]>--- .../devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt | 9 +++++++++ drivers/watchdog/Kconfig | 2 +- drivers/watchdog/at91rm9200_wdt.c | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txtDocumentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt new file +9
-0@@ -0,0 +1,9 @@ +Atmel AT91RM9200 System Timer Watchdog + +Required properties: +- compatible: must be "atmel,at91sam9260-wdt". + +Example: + watchdog@fffffd00 { + compatible = "atmel,at91rm9200-wdt"; + };drivers/watchdog/Kconfig +0
-0
drivers/watchdog/Kconfig config ARM_SP805_WATCHDOG · line 119
Quoted 5 lines
drivers/watchdog/Kconfig +1
-1@@ -116,7 +116,7 @@ config ARM_SP805_WATCHDOG config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" - depends on ARCH_AT91RM9200 + depends on ARCH_AT91
This seems to trigger errors when compiling without AT91RM9200 selected:
drivers/built-in.o: In function `at91_wdt_close':
at91_adc.c:(.text+0xc9fe4): undefined reference to at91_st_base' drivers/built-in.o: In function at91_wdt_write':
at91_adc.c:(.text+0xca004): undefined reference to at91_st_base' drivers/built-in.o: In function at91wdt_shutdown':
at91_adc.c:(.text+0xca01c): undefined reference to at91_st_base' drivers/built-in.o: In function at91wdt_suspend':
at91_adc.c:(.text+0xca038): undefined reference to at91_st_base' drivers/built-in.o: In function at91_wdt_open':
at91_adc.c:(.text+0xca0cc): undefined reference to at91_st_base' drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references to at91_st_base' follow make[2]: *** [vmlinux] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
It seems thatthis driver is not written for non-rm9200-proof compilation... So, it can be a good idea to revert this *line* for 3.9-final: Wim, what do you think?
Best regards,
Quoted 38 lines
drivers/watchdog/Kconfig +0
-0help Watchdog timer embedded into AT91RM9200 chips. This will reboot your system when the timeout is reached.drivers/watchdog/at91rm9200_wdt.c +9
-0@@ -24,6 +24,8 @@#include <linux/types.h> #include <linux/watchdog.h> #include <linux/uaccess.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <mach/at91_st.h> #define WDT_DEFAULT_TIME 5/* seconds */ @@ -252,6 +254,12 @@ static int at91wdt_resume(struct platform_device *pdev)#define at91wdt_resume NULL#endif +static const struct of_device_id at91_wdt_dt_ids[] = { + { .compatible ="atmel,at91rm9200-wdt" }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, at91_wdt_dt_ids); +static struct platform_driver at91wdt_driver = { .probe = at91wdt_probe, .remove = at91wdt_remove,@@ -261,6 +269,7 @@ static struct platform_driver at91wdt_driver = { .driver = { .name = "at91_wdt", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(at91_wdt_dt_ids), }, };
Signature · 1 line
Nicolas Ferre
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi All,
Quoted 29 lines
drivers/watchdog/Kconfig config ARM_SP805_WATCHDOG · line 119
Quoted 10 lines
drivers/watchdog/Kconfig +1
-1@@ -116,7 +116,7 @@ config ARM_SP805_WATCHDOG config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" - depends on ARCH_AT91RM9200 + depends on ARCH_AT91This seems to trigger errors when compiling without AT91RM9200 selected:
drivers/built-in.o: In function `at91_wdt_close':
at91_adc.c:(.text+0xc9fe4): undefined reference toat91_st_base' drivers/built-in.o: In functionat91_wdt_write':
at91_adc.c:(.text+0xca004): undefined reference toat91_st_base' drivers/built-in.o: In functionat91wdt_shutdown':
at91_adc.c:(.text+0xca01c): undefined reference toat91_st_base' drivers/built-in.o: In functionat91wdt_suspend':
at91_adc.c:(.text+0xca038): undefined reference toat91_st_base' drivers/built-in.o: In functionat91_wdt_open':
at91_adc.c:(.text+0xca0cc): undefined reference toat91_st_base' drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references toat91_st_base' follow make[2]: *** [vmlinux] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
Quoted 2 lines
It seems thatthis driver is not written for non-rm9200-proof compilation... So, it can be a good idea to revert this *line* for 3.9-final: Wim, what do you think?
If this triggers compile error, then this indeed needs to get fixed. I'll do the necessary tomorrow.
Kind regards,
Wim.
PATCH 1/1 watchdog: Revert the AT91RM9200_WATCHDOG dependency
Compiling the at91rm9200_wdt.c driver without at91rm9200 support was leading to several errors:
drivers/built-in.o: In function `at91_wdt_close':
at91_adc.c:(.text+0xc9fe4): undefined reference to at91_st_base' drivers/built-in.o: In function at91_wdt_write':
at91_adc.c:(.text+0xca004): undefined reference to at91_st_base' drivers/built-in.o: In function at91wdt_shutdown':
at91_adc.c:(.text+0xca01c): undefined reference to at91_st_base' drivers/built-in.o: In function at91wdt_suspend':
at91_adc.c:(.text+0xca038): undefined reference to at91_st_base' drivers/built-in.o: In function at91_wdt_open':
at91_adc.c:(.text+0xca0cc): undefined reference to at91_st_base' drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references to at91_st_base' follow
So, reverting the modification of the "depends" Kconfig line introduced by patch a6a1bcd37 (watchdog: at91rm9200: add DT support) seems to be the good solution.
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
@@ -117,7 +117,7 @@ config ARM_SP805_WATCHDOG config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" - depends on ARCH_AT91 + depends on ARCH_AT91RM9200 help Watchdog timer embedded into AT91RM9200 chips. This will reboot your system when the timeout is reached.
Signature · 1 line
1.8.0
Guenter Roeck
maintainerPATCH 1/1 watchdog: Revert the AT91RM9200_WATCHDOG dependency
Quoted 16 lines · Nicolas Ferre
Compiling the
at91rm9200_wdt.cdriver without at91rm9200 support was leading to several errors:
drivers/built-in.o: In function `at91_wdt_close':
at91_adc.c:(.text+0xc9fe4): undefined reference toat91_st_base' drivers/built-in.o: In functionat91_wdt_write':
at91_adc.c:(.text+0xca004): undefined reference toat91_st_base' drivers/built-in.o: In functionat91wdt_shutdown':
at91_adc.c:(.text+0xca01c): undefined reference toat91_st_base' drivers/built-in.o: In functionat91wdt_suspend':
at91_adc.c:(.text+0xca038): undefined reference toat91_st_base' drivers/built-in.o: In functionat91_wdt_open':
at91_adc.c:(.text+0xca0cc): undefined reference toat91_st_base' drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references toat91_st_base' follow
Quoted 4 lines
So, reverting the modification of the "depends"
Kconfigline introduced by patcha6a1bcd37(watchdog: at91rm9200: add DT support) seems to be the good solution.
Really ? Why ? I mean, this was supposed to be for at91rm9200, wasn't it ? And why would want try to compile a watchdog for at91rm9200 without at91rm9200 support ?
I understand there is a problem, I just don't see how removing that line would solgve it.
Guenter
Quoted 26 lines
Signed-off-by Nicolas Ferre <[email protected]>--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +1
-1@@ -117,7 +117,7 @@ config ARM_SP805_WATCHDOG config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" - depends on ARCH_AT91 + depends on ARCH_AT91RM9200 help Watchdog timer embedded into AT91RM9200 chips. This will reboot your system when the timeout is reached.Signature · 6 lines
1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Guenter Roeck
maintainerPATCH 1/1 watchdog: Revert the AT91RM9200_WATCHDOG dependency
Quoted 21 lines · Guenter Roeck
Quoted 16 lines · Nicolas Ferre
Compiling the
at91rm9200_wdt.cdriver without at91rm9200 support was leading to several errors:
drivers/built-in.o: In function `at91_wdt_close':
at91_adc.c:(.text+0xc9fe4): undefined reference toat91_st_base' drivers/built-in.o: In functionat91_wdt_write':
at91_adc.c:(.text+0xca004): undefined reference toat91_st_base' drivers/built-in.o: In functionat91wdt_shutdown':
at91_adc.c:(.text+0xca01c): undefined reference toat91_st_base' drivers/built-in.o: In functionat91wdt_suspend':
at91_adc.c:(.text+0xca038): undefined reference toat91_st_base' drivers/built-in.o: In functionat91_wdt_open':
at91_adc.c:(.text+0xca0cc): undefined reference toat91_st_base' drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references toat91_st_base' followQuoted 4 lines
So, reverting the modification of the "depends"
Kconfigline introduced by patcha6a1bcd37(watchdog: at91rm9200: add DT support) seems to be the good solution.
Quoted 7 lines
Really ? Why ? I mean, this was supposed to be for at91rm9200, wasn't it ? And why would want try to compile a watchdog for at91rm9200 without at91rm9200 support ?
I understand there is a problem, I just don't see how removing that line would solve it.
Me confused, sorry. I somehow thought you were removing the ARCH_AT91RM9200 dependency, not adding it.
Guenter