Commit 5ae233fb authored by Eugen Hristev's avatar Eugen Hristev Committed by Wim Van Sebroeck
Browse files

watchdog: sama5d4_wdt: add support for sama7g5-wdt



Add support for compatible sama7g5-wdt.
The sama7g5 wdt is the same hardware block as on sam9x60.
Adapt the driver to use the sam9x60/sama7g5 variant if either
of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).

Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210527100120.266796-2-eugen.hristev@microchip.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 13b19169
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
	wdd->min_timeout = MIN_WDT_TIMEOUT;
	wdd->max_timeout = MAX_WDT_TIMEOUT;
	wdt->last_ping = jiffies;
	wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
						       "microchip,sam9x60-wdt");

	if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
	    of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
		wdt->sam9x60_support = true;

	watchdog_set_drvdata(wdd, wdt);

@@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
	{
		.compatible = "microchip,sam9x60-wdt",
	},
	{
		.compatible = "microchip,sama7g5-wdt",
	},

	{ }
};
MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);