diff options
Diffstat (limited to 'drivers/watchdog/im28wd.c')
-rw-r--r-- | drivers/watchdog/im28wd.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/watchdog/im28wd.c b/drivers/watchdog/im28wd.c index 2b233ede20..b52e585175 100644 --- a/drivers/watchdog/im28wd.c +++ b/drivers/watchdog/im28wd.c @@ -1,16 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * (c) 2012 Juergen Beisert <kernel@pengutronix.de> * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * * Note: this driver works for the i.MX28 SoC. It might work for the * i.MX23 Soc as well, but is not tested yet. */ @@ -184,7 +175,7 @@ static void __maybe_unused imx28_detect_reset_source(const struct imx28_wd *p) reset_source_set(RESET_RST); } -static int imx28_wd_probe(struct device_d *dev) +static int imx28_wd_probe(struct device *dev) { struct resource *iores; struct imx28_wd *priv; @@ -196,7 +187,7 @@ static int imx28_wd_probe(struct device_d *dev) return PTR_ERR(iores); priv->regs = IOMEM(iores->start); priv->wd.set_timeout = imx28_watchdog_set_timeout; - priv->wd.timeout_max = ULONG_MAX / WDOG_TICK_RATE; + priv->wd.timeout_max = U32_MAX / WDOG_TICK_RATE; priv->wd.hwdev = dev; if (!(readl(priv->regs + MXS_RTC_STAT) & MXS_RTC_STAT_WD_PRESENT)) { @@ -222,16 +213,26 @@ on_error: return rc; } -static void imx28_wd_remove(struct device_d *dev) +static void imx28_wd_remove(struct device *dev) { struct imx28_wd *priv= dev->priv; watchdog_deregister(&priv->wd); free(priv); } -static struct driver_d imx28_wd_driver = { +static __maybe_unused struct of_device_id imx28_wdt_dt_ids[] = { + { + .compatible = "fsl,stmp3xxx-rtc", + }, { + /* sentinel */ + } +}; +MODULE_DEVICE_TABLE(of, imx28_wdt_dt_ids); + +static struct driver imx28_wd_driver = { .name = "im28wd", .probe = imx28_wd_probe, .remove = imx28_wd_remove, + .of_compatible = DRV_OF_COMPAT(imx28_wdt_dt_ids), }; device_platform_driver(imx28_wd_driver); |