^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Meson Watchdog Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (c) 2014 Carlo Caione
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #include <linux/clk.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/err.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/moduleparam.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/of_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <linux/watchdog.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define DRV_NAME "meson_wdt"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define MESON_WDT_TC 0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define MESON_WDT_DC_RESET (3 << 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define MESON_WDT_RESET 0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define MESON_WDT_TIMEOUT 30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define MESON_WDT_MIN_TIMEOUT 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define MESON_SEC_TO_TC(s, c) ((s) * (c))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) static bool nowayout = WATCHDOG_NOWAYOUT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) static unsigned int timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct meson_wdt_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) unsigned int enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) unsigned int terminal_count_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) unsigned int count_unit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) static struct meson_wdt_data meson6_wdt_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) .enable = BIT(22),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) .terminal_count_mask = 0x3fffff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) .count_unit = 100000, /* 10 us */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) static struct meson_wdt_data meson8b_wdt_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) .enable = BIT(19),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) .terminal_count_mask = 0xffff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) .count_unit = 7812, /* 128 us */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) struct meson_wdt_dev {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) struct watchdog_device wdt_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) void __iomem *wdt_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) const struct meson_wdt_data *data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) static int meson_wdt_restart(struct watchdog_device *wdt_dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) unsigned long action, void *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) u32 tc_reboot = MESON_WDT_DC_RESET;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) tc_reboot |= meson_wdt->data->enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) while (1) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) writel(tc_reboot, meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) mdelay(5);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) static int meson_wdt_ping(struct watchdog_device *wdt_dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) writel(0, meson_wdt->wdt_base + MESON_WDT_RESET);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) static void meson_wdt_change_timeout(struct watchdog_device *wdt_dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) unsigned int timeout)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) u32 reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) reg = readl(meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) reg &= ~meson_wdt->data->terminal_count_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) reg |= MESON_SEC_TO_TC(timeout, meson_wdt->data->count_unit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) writel(reg, meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) static int meson_wdt_set_timeout(struct watchdog_device *wdt_dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) unsigned int timeout)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) wdt_dev->timeout = timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) meson_wdt_change_timeout(wdt_dev, timeout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) meson_wdt_ping(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) static int meson_wdt_stop(struct watchdog_device *wdt_dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) u32 reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) reg = readl(meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) reg &= ~meson_wdt->data->enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) writel(reg, meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) static int meson_wdt_start(struct watchdog_device *wdt_dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) u32 reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) meson_wdt_change_timeout(wdt_dev, meson_wdt->wdt_dev.timeout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) meson_wdt_ping(wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) reg = readl(meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) reg |= meson_wdt->data->enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) writel(reg, meson_wdt->wdt_base + MESON_WDT_TC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) static const struct watchdog_info meson_wdt_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) .identity = DRV_NAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) .options = WDIOF_SETTIMEOUT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) WDIOF_KEEPALIVEPING |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) WDIOF_MAGICCLOSE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) static const struct watchdog_ops meson_wdt_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) .owner = THIS_MODULE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) .start = meson_wdt_start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) .stop = meson_wdt_stop,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) .ping = meson_wdt_ping,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) .set_timeout = meson_wdt_set_timeout,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) .restart = meson_wdt_restart,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) static const struct of_device_id meson_wdt_dt_ids[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) { .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) { .compatible = "amlogic,meson8-wdt", .data = &meson6_wdt_data },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) { .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) { .compatible = "amlogic,meson8m2-wdt", .data = &meson8b_wdt_data },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) { /* sentinel */ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) static int meson_wdt_probe(struct platform_device *pdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) struct device *dev = &pdev->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) struct meson_wdt_dev *meson_wdt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) const struct of_device_id *of_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) int err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) meson_wdt = devm_kzalloc(dev, sizeof(*meson_wdt), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) if (!meson_wdt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) meson_wdt->wdt_base = devm_platform_ioremap_resource(pdev, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) if (IS_ERR(meson_wdt->wdt_base))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) return PTR_ERR(meson_wdt->wdt_base);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) of_id = of_match_device(meson_wdt_dt_ids, dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) if (!of_id) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) dev_err(dev, "Unable to initialize WDT data\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) meson_wdt->data = of_id->data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) meson_wdt->wdt_dev.parent = dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) meson_wdt->wdt_dev.info = &meson_wdt_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) meson_wdt->wdt_dev.ops = &meson_wdt_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) meson_wdt->wdt_dev.max_timeout =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) meson_wdt->data->terminal_count_mask / meson_wdt->data->count_unit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) meson_wdt->wdt_dev.min_timeout = MESON_WDT_MIN_TIMEOUT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) meson_wdt->wdt_dev.timeout = min_t(unsigned int,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) MESON_WDT_TIMEOUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) meson_wdt->wdt_dev.max_timeout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) watchdog_set_drvdata(&meson_wdt->wdt_dev, meson_wdt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) watchdog_init_timeout(&meson_wdt->wdt_dev, timeout, dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) watchdog_set_nowayout(&meson_wdt->wdt_dev, nowayout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) watchdog_set_restart_priority(&meson_wdt->wdt_dev, 128);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) meson_wdt_stop(&meson_wdt->wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) watchdog_stop_on_reboot(&meson_wdt->wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) err = devm_watchdog_register_device(dev, &meson_wdt->wdt_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) if (err)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) return err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) dev_info(dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) meson_wdt->wdt_dev.timeout, nowayout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) static struct platform_driver meson_wdt_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) .probe = meson_wdt_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) .driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) .name = DRV_NAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) .of_match_table = meson_wdt_dt_ids,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) module_platform_driver(meson_wdt_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) module_param(timeout, uint, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) module_param(nowayout, bool, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) MODULE_PARM_DESC(nowayout,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) "Watchdog cannot be stopped once started (default="
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) MODULE_LICENSE("GPL");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) MODULE_AUTHOR("Carlo Caione <carlo@caione.org>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) MODULE_DESCRIPTION("Meson Watchdog Timer Driver");