Date: Wed, 13 Jan 2021 17:44:05 GMT From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6003bf9290cd - main - dwwdt: Add PNP info for the driver Message-ID: <202101131744.10DHi5MA033587@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=6003bf9290cd6f5b2fd9adcd45ac82144e6cb789 commit 6003bf9290cd6f5b2fd9adcd45ac82144e6cb789 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2021-01-13 17:41:34 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2021-01-13 17:43:51 +0000 dwwdt: Add PNP info for the driver --- sys/dev/dwwdt/dwwdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/dwwdt/dwwdt.c b/sys/dev/dwwdt/dwwdt.c index c08927f44c60..4eab26ef2915 100644 --- a/sys/dev/dwwdt/dwwdt.c +++ b/sys/dev/dwwdt/dwwdt.c @@ -86,6 +86,11 @@ struct dwwdt_softc { static devclass_t dwwdt_devclass; +static struct ofw_compat_data compat_data[] = { + { "snps,dw-wdt", 1 }, + { NULL, 0 } +}; + SYSCTL_NODE(_dev, OID_AUTO, dwwdt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Synopsys Designware watchdog timer"); /* Setting this to 0 enables full restart mode. */ @@ -219,7 +224,7 @@ dwwdt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "snps,dw-wdt")) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); device_set_desc(dev, "Synopsys Designware watchdog timer"); @@ -358,3 +363,4 @@ static driver_t dwwdt_driver = { DRIVER_MODULE(dwwdt, simplebus, dwwdt_driver, dwwdt_devclass, NULL, NULL); MODULE_VERSION(dwwdt, 1); +OFWBUS_PNP_INFO(compat_data);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101131744.10DHi5MA033587>