wdt 77 drivers/bcma/driver_chipcommon.c static u32 bcma_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, wdt 80 drivers/bcma/driver_chipcommon.c struct bcma_drv_cc *cc = bcm47xx_wdt_get_drvdata(wdt); wdt 85 drivers/bcma/driver_chipcommon.c static u32 bcma_chipco_watchdog_timer_set_ms_wdt(struct bcm47xx_wdt *wdt, wdt 88 drivers/bcma/driver_chipcommon.c struct bcma_drv_cc *cc = bcm47xx_wdt_get_drvdata(wdt); wdt 116 drivers/bcma/driver_chipcommon.c struct bcm47xx_wdt wdt = {}; wdt 125 drivers/bcma/driver_chipcommon.c wdt.driver_data = cc; wdt 126 drivers/bcma/driver_chipcommon.c wdt.timer_set = bcma_chipco_watchdog_timer_set_wdt; wdt 127 drivers/bcma/driver_chipcommon.c wdt.timer_set_ms = bcma_chipco_watchdog_timer_set_ms_wdt; wdt 128 drivers/bcma/driver_chipcommon.c wdt.max_timer_ms = wdt 132 drivers/bcma/driver_chipcommon.c bus->num, &wdt, wdt 133 drivers/bcma/driver_chipcommon.c sizeof(wdt)); wdt 501 drivers/input/touchscreen/wdt87xx_i2c.c static int wdt87xx_validate_firmware(struct wdt87xx_data *wdt, wdt 513 drivers/input/touchscreen/wdt87xx_i2c.c dev_err(&wdt->client->dev, "check fw tag failed\n"); wdt 519 drivers/input/touchscreen/wdt87xx_i2c.c dev_err(&wdt->client->dev, wdt 531 drivers/input/touchscreen/wdt87xx_i2c.c dev_err(&wdt->client->dev, wdt 538 drivers/input/touchscreen/wdt87xx_i2c.c chip_id = (wdt->param.fw_id >> 12) & 0xF; wdt 541 drivers/input/touchscreen/wdt87xx_i2c.c dev_err(&wdt->client->dev, wdt 820 drivers/input/touchscreen/wdt87xx_i2c.c struct wdt87xx_data *wdt = i2c_get_clientdata(client); wdt 823 drivers/input/touchscreen/wdt87xx_i2c.c error = wdt87xx_validate_firmware(wdt, fw); wdt 827 drivers/input/touchscreen/wdt87xx_i2c.c error = mutex_lock_interruptible(&wdt->fw_mutex); wdt 848 drivers/input/touchscreen/wdt87xx_i2c.c error = wdt87xx_get_sysparam(client, &wdt->param); wdt 854 drivers/input/touchscreen/wdt87xx_i2c.c mutex_unlock(&wdt->fw_mutex); wdt 884 drivers/input/touchscreen/wdt87xx_i2c.c struct wdt87xx_data *wdt = i2c_get_clientdata(client); wdt 887 drivers/input/touchscreen/wdt87xx_i2c.c cfg_csum = wdt->param.xmls_id1; wdt 888 drivers/input/touchscreen/wdt87xx_i2c.c cfg_csum = (cfg_csum << 16) | wdt->param.xmls_id2; wdt 897 drivers/input/touchscreen/wdt87xx_i2c.c struct wdt87xx_data *wdt = i2c_get_clientdata(client); wdt 899 drivers/input/touchscreen/wdt87xx_i2c.c return scnprintf(buf, PAGE_SIZE, "%x\n", wdt->param.fw_id); wdt 906 drivers/input/touchscreen/wdt87xx_i2c.c struct wdt87xx_data *wdt = i2c_get_clientdata(client); wdt 908 drivers/input/touchscreen/wdt87xx_i2c.c return scnprintf(buf, PAGE_SIZE, "%x\n", wdt->param.plat_id); wdt 995 drivers/input/touchscreen/wdt87xx_i2c.c struct wdt87xx_data *wdt = dev_id; wdt 996 drivers/input/touchscreen/wdt87xx_i2c.c struct i2c_client *client = wdt->client; wdt 1012 drivers/input/touchscreen/wdt87xx_i2c.c wdt87xx_report_contact(wdt->input, wdt 1013 drivers/input/touchscreen/wdt87xx_i2c.c &wdt->param, wdt 1017 drivers/input/touchscreen/wdt87xx_i2c.c input_mt_sync_frame(wdt->input); wdt 1018 drivers/input/touchscreen/wdt87xx_i2c.c input_sync(wdt->input); wdt 1024 drivers/input/touchscreen/wdt87xx_i2c.c static int wdt87xx_ts_create_input_device(struct wdt87xx_data *wdt) wdt 1026 drivers/input/touchscreen/wdt87xx_i2c.c struct device *dev = &wdt->client->dev; wdt 1028 drivers/input/touchscreen/wdt87xx_i2c.c unsigned int res = DIV_ROUND_CLOSEST(MAX_UNIT_AXIS, wdt->param.phy_w); wdt 1036 drivers/input/touchscreen/wdt87xx_i2c.c wdt->input = input; wdt 1040 drivers/input/touchscreen/wdt87xx_i2c.c input->id.vendor = wdt->param.vendor_id; wdt 1041 drivers/input/touchscreen/wdt87xx_i2c.c input->id.product = wdt->param.product_id; wdt 1042 drivers/input/touchscreen/wdt87xx_i2c.c input->phys = wdt->phys; wdt 1045 drivers/input/touchscreen/wdt87xx_i2c.c wdt->param.max_x, 0, 0); wdt 1047 drivers/input/touchscreen/wdt87xx_i2c.c wdt->param.max_y, 0, 0); wdt 1052 drivers/input/touchscreen/wdt87xx_i2c.c 0, wdt->param.max_x, 0, 0); wdt 1070 drivers/input/touchscreen/wdt87xx_i2c.c struct wdt87xx_data *wdt; wdt 1080 drivers/input/touchscreen/wdt87xx_i2c.c wdt = devm_kzalloc(&client->dev, sizeof(*wdt), GFP_KERNEL); wdt 1081 drivers/input/touchscreen/wdt87xx_i2c.c if (!wdt) wdt 1084 drivers/input/touchscreen/wdt87xx_i2c.c wdt->client = client; wdt 1085 drivers/input/touchscreen/wdt87xx_i2c.c mutex_init(&wdt->fw_mutex); wdt 1086 drivers/input/touchscreen/wdt87xx_i2c.c i2c_set_clientdata(client, wdt); wdt 1088 drivers/input/touchscreen/wdt87xx_i2c.c snprintf(wdt->phys, sizeof(wdt->phys), "i2c-%u-%04x/input0", wdt 1091 drivers/input/touchscreen/wdt87xx_i2c.c error = wdt87xx_get_sysparam(client, &wdt->param); wdt 1095 drivers/input/touchscreen/wdt87xx_i2c.c error = wdt87xx_ts_create_input_device(wdt); wdt 1102 drivers/input/touchscreen/wdt87xx_i2c.c client->name, wdt); wdt 204 drivers/media/platform/mtk-vpu/mtk_vpu.c struct vpu_wdt wdt; wdt 362 drivers/media/platform/mtk-vpu/mtk_vpu.c struct vpu_wdt *wdt = container_of(ws, struct vpu_wdt, ws); wdt 363 drivers/media/platform/mtk-vpu/mtk_vpu.c struct mtk_vpu *vpu = container_of(wdt, struct mtk_vpu, wdt); wdt 364 drivers/media/platform/mtk-vpu/mtk_vpu.c struct vpu_wdt_handler *handler = wdt->handler; wdt 399 drivers/media/platform/mtk-vpu/mtk_vpu.c handler = vpu->wdt.handler; wdt 621 drivers/media/platform/mtk-vpu/mtk_vpu.c unsigned int running, pc, vpu_to_host, host_to_vpu, wdt; wdt 635 drivers/media/platform/mtk-vpu/mtk_vpu.c wdt = vpu_cfg_readl(vpu, VPU_WDT_REG); wdt 647 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->run.fw_ver, pc, wdt, wdt 755 drivers/media/platform/mtk-vpu/mtk_vpu.c queue_work(vpu->wdt.wq, &vpu->wdt.ws); wdt 809 drivers/media/platform/mtk-vpu/mtk_vpu.c vpu->wdt.wq = create_singlethread_workqueue("vpu_wdt"); wdt 810 drivers/media/platform/mtk-vpu/mtk_vpu.c if (!vpu->wdt.wq) { wdt 814 drivers/media/platform/mtk-vpu/mtk_vpu.c INIT_WORK(&vpu->wdt.ws, vpu_wdt_reset_func); wdt 910 drivers/media/platform/mtk-vpu/mtk_vpu.c destroy_workqueue(vpu->wdt.wq); wdt 930 drivers/media/platform/mtk-vpu/mtk_vpu.c if (vpu->wdt.wq) { wdt 931 drivers/media/platform/mtk-vpu/mtk_vpu.c flush_workqueue(vpu->wdt.wq); wdt 932 drivers/media/platform/mtk-vpu/mtk_vpu.c destroy_workqueue(vpu->wdt.wq); wdt 431 drivers/mfd/wm8350-core.c wm8350_client_dev_register(wm8350, "wm8350-wdt", &(wm8350->wdt.pdev)); wdt 311 drivers/ssb/driver_chipcommon.c u32 ssb_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks) wdt 313 drivers/ssb/driver_chipcommon.c struct ssb_chipcommon *cc = bcm47xx_wdt_get_drvdata(wdt); wdt 321 drivers/ssb/driver_chipcommon.c u32 ssb_chipco_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms) wdt 323 drivers/ssb/driver_chipcommon.c struct ssb_chipcommon *cc = bcm47xx_wdt_get_drvdata(wdt); wdt 115 drivers/ssb/driver_extif.c u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks) wdt 117 drivers/ssb/driver_extif.c struct ssb_extif *extif = bcm47xx_wdt_get_drvdata(wdt); wdt 122 drivers/ssb/driver_extif.c u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms) wdt 124 drivers/ssb/driver_extif.c struct ssb_extif *extif = bcm47xx_wdt_get_drvdata(wdt); wdt 39 drivers/ssb/embedded.c struct bcm47xx_wdt wdt = {}; wdt 43 drivers/ssb/embedded.c wdt.driver_data = &bus->chipco; wdt 44 drivers/ssb/embedded.c wdt.timer_set = ssb_chipco_watchdog_timer_set_wdt; wdt 45 drivers/ssb/embedded.c wdt.timer_set_ms = ssb_chipco_watchdog_timer_set_ms; wdt 46 drivers/ssb/embedded.c wdt.max_timer_ms = bus->chipco.max_timer_ms; wdt 48 drivers/ssb/embedded.c wdt.driver_data = &bus->extif; wdt 49 drivers/ssb/embedded.c wdt.timer_set = ssb_extif_watchdog_timer_set_wdt; wdt 50 drivers/ssb/embedded.c wdt.timer_set_ms = ssb_extif_watchdog_timer_set_ms; wdt 51 drivers/ssb/embedded.c wdt.max_timer_ms = SSB_EXTIF_WATCHDOG_MAX_TIMER_MS; wdt 57 drivers/ssb/embedded.c bus->busnumber, &wdt, wdt 58 drivers/ssb/embedded.c sizeof(wdt)); wdt 196 drivers/ssb/ssb_private.h extern u32 ssb_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, wdt 198 drivers/ssb/ssb_private.h extern u32 ssb_chipco_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms); wdt 220 drivers/ssb/ssb_private.h extern u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks); wdt 221 drivers/ssb/ssb_private.h extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms); wdt 223 drivers/ssb/ssb_private.h static inline u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, wdt 228 drivers/ssb/ssb_private.h static inline u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, wdt 77 drivers/watchdog/armada_37xx_wdt.c struct watchdog_device wdt; wdt 145 drivers/watchdog/armada_37xx_wdt.c static int armada_37xx_wdt_ping(struct watchdog_device *wdt) wdt 147 drivers/watchdog/armada_37xx_wdt.c struct armada_37xx_watchdog *dev = watchdog_get_drvdata(wdt); wdt 156 drivers/watchdog/armada_37xx_wdt.c static unsigned int armada_37xx_wdt_get_timeleft(struct watchdog_device *wdt) wdt 158 drivers/watchdog/armada_37xx_wdt.c struct armada_37xx_watchdog *dev = watchdog_get_drvdata(wdt); wdt 167 drivers/watchdog/armada_37xx_wdt.c static int armada_37xx_wdt_set_timeout(struct watchdog_device *wdt, wdt 170 drivers/watchdog/armada_37xx_wdt.c struct armada_37xx_watchdog *dev = watchdog_get_drvdata(wdt); wdt 172 drivers/watchdog/armada_37xx_wdt.c wdt->timeout = timeout; wdt 197 drivers/watchdog/armada_37xx_wdt.c static int armada_37xx_wdt_start(struct watchdog_device *wdt) wdt 199 drivers/watchdog/armada_37xx_wdt.c struct armada_37xx_watchdog *dev = watchdog_get_drvdata(wdt); wdt 222 drivers/watchdog/armada_37xx_wdt.c static int armada_37xx_wdt_stop(struct watchdog_device *wdt) wdt 224 drivers/watchdog/armada_37xx_wdt.c struct armada_37xx_watchdog *dev = watchdog_get_drvdata(wdt); wdt 264 drivers/watchdog/armada_37xx_wdt.c dev->wdt.info = &armada_37xx_wdt_info; wdt 265 drivers/watchdog/armada_37xx_wdt.c dev->wdt.ops = &armada_37xx_wdt_ops; wdt 300 drivers/watchdog/armada_37xx_wdt.c dev->wdt.min_timeout = 1; wdt 301 drivers/watchdog/armada_37xx_wdt.c dev->wdt.max_timeout = UINT_MAX; wdt 302 drivers/watchdog/armada_37xx_wdt.c dev->wdt.parent = &pdev->dev; wdt 305 drivers/watchdog/armada_37xx_wdt.c dev->wdt.timeout = WATCHDOG_TIMEOUT; wdt 306 drivers/watchdog/armada_37xx_wdt.c watchdog_init_timeout(&dev->wdt, timeout, &pdev->dev); wdt 308 drivers/watchdog/armada_37xx_wdt.c platform_set_drvdata(pdev, &dev->wdt); wdt 309 drivers/watchdog/armada_37xx_wdt.c watchdog_set_drvdata(&dev->wdt, dev); wdt 311 drivers/watchdog/armada_37xx_wdt.c armada_37xx_wdt_set_timeout(&dev->wdt, dev->wdt.timeout); wdt 314 drivers/watchdog/armada_37xx_wdt.c set_bit(WDOG_HW_RUNNING, &dev->wdt.status); wdt 316 drivers/watchdog/armada_37xx_wdt.c watchdog_set_nowayout(&dev->wdt, nowayout); wdt 317 drivers/watchdog/armada_37xx_wdt.c watchdog_stop_on_reboot(&dev->wdt); wdt 318 drivers/watchdog/armada_37xx_wdt.c ret = devm_watchdog_register_device(&pdev->dev, &dev->wdt); wdt 323 drivers/watchdog/armada_37xx_wdt.c dev->wdt.timeout, nowayout ? ", nowayout" : ""); wdt 330 drivers/watchdog/armada_37xx_wdt.c struct watchdog_device *wdt = dev_get_drvdata(dev); wdt 332 drivers/watchdog/armada_37xx_wdt.c return armada_37xx_wdt_stop(wdt); wdt 337 drivers/watchdog/armada_37xx_wdt.c struct watchdog_device *wdt = dev_get_drvdata(dev); wdt 339 drivers/watchdog/armada_37xx_wdt.c if (watchdog_active(wdt)) wdt 340 drivers/watchdog/armada_37xx_wdt.c return armada_37xx_wdt_start(wdt); wdt 104 drivers/watchdog/aspeed_wdt.c static void aspeed_wdt_enable(struct aspeed_wdt *wdt, int count) wdt 106 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_ENABLE; wdt 108 drivers/watchdog/aspeed_wdt.c writel(0, wdt->base + WDT_CTRL); wdt 109 drivers/watchdog/aspeed_wdt.c writel(count, wdt->base + WDT_RELOAD_VALUE); wdt 110 drivers/watchdog/aspeed_wdt.c writel(WDT_RESTART_MAGIC, wdt->base + WDT_RESTART); wdt 111 drivers/watchdog/aspeed_wdt.c writel(wdt->ctrl, wdt->base + WDT_CTRL); wdt 116 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); wdt 118 drivers/watchdog/aspeed_wdt.c aspeed_wdt_enable(wdt, wdd->timeout * WDT_RATE_1MHZ); wdt 125 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); wdt 127 drivers/watchdog/aspeed_wdt.c wdt->ctrl &= ~WDT_CTRL_ENABLE; wdt 128 drivers/watchdog/aspeed_wdt.c writel(wdt->ctrl, wdt->base + WDT_CTRL); wdt 135 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); wdt 137 drivers/watchdog/aspeed_wdt.c writel(WDT_RESTART_MAGIC, wdt->base + WDT_RESTART); wdt 145 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); wdt 152 drivers/watchdog/aspeed_wdt.c writel(actual * WDT_RATE_1MHZ, wdt->base + WDT_RELOAD_VALUE); wdt 153 drivers/watchdog/aspeed_wdt.c writel(WDT_RESTART_MAGIC, wdt->base + WDT_RESTART); wdt 161 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); wdt 163 drivers/watchdog/aspeed_wdt.c wdt->ctrl &= ~WDT_CTRL_BOOT_SECONDARY; wdt 164 drivers/watchdog/aspeed_wdt.c aspeed_wdt_enable(wdt, 128 * WDT_RATE_1MHZ / 1000); wdt 175 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = dev_get_drvdata(dev); wdt 176 drivers/watchdog/aspeed_wdt.c u32 status = readl(wdt->base + WDT_TIMEOUT_STATUS); wdt 186 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt = dev_get_drvdata(dev); wdt 194 drivers/watchdog/aspeed_wdt.c wdt->base + WDT_CLEAR_TIMEOUT_STATUS); wdt 246 drivers/watchdog/aspeed_wdt.c struct aspeed_wdt *wdt; wdt 253 drivers/watchdog/aspeed_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 254 drivers/watchdog/aspeed_wdt.c if (!wdt) wdt 257 drivers/watchdog/aspeed_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 258 drivers/watchdog/aspeed_wdt.c if (IS_ERR(wdt->base)) wdt 259 drivers/watchdog/aspeed_wdt.c return PTR_ERR(wdt->base); wdt 261 drivers/watchdog/aspeed_wdt.c wdt->wdd.info = &aspeed_wdt_info; wdt 262 drivers/watchdog/aspeed_wdt.c wdt->wdd.ops = &aspeed_wdt_ops; wdt 263 drivers/watchdog/aspeed_wdt.c wdt->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS; wdt 264 drivers/watchdog/aspeed_wdt.c wdt->wdd.parent = dev; wdt 266 drivers/watchdog/aspeed_wdt.c wdt->wdd.timeout = WDT_DEFAULT_TIMEOUT; wdt 267 drivers/watchdog/aspeed_wdt.c watchdog_init_timeout(&wdt->wdd, 0, dev); wdt 285 drivers/watchdog/aspeed_wdt.c wdt->ctrl = WDT_CTRL_1MHZ_CLK; wdt 293 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC | WDT_CTRL_RESET_SYSTEM; wdt 296 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_RESET_MODE_ARM_CPU | wdt 299 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC | wdt 302 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_RESET_MODE_FULL_CHIP | wdt 308 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_WDT_EXT; wdt 310 drivers/watchdog/aspeed_wdt.c wdt->ctrl |= WDT_CTRL_BOOT_SECONDARY; wdt 312 drivers/watchdog/aspeed_wdt.c if (readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE) { wdt 319 drivers/watchdog/aspeed_wdt.c aspeed_wdt_start(&wdt->wdd); wdt 320 drivers/watchdog/aspeed_wdt.c set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); wdt 325 drivers/watchdog/aspeed_wdt.c u32 reg = readl(wdt->base + WDT_RESET_WIDTH); wdt 333 drivers/watchdog/aspeed_wdt.c writel(reg, wdt->base + WDT_RESET_WIDTH); wdt 341 drivers/watchdog/aspeed_wdt.c writel(reg, wdt->base + WDT_RESET_WIDTH); wdt 367 drivers/watchdog/aspeed_wdt.c writel(duration - 1, wdt->base + WDT_RESET_WIDTH); wdt 370 drivers/watchdog/aspeed_wdt.c status = readl(wdt->base + WDT_TIMEOUT_STATUS); wdt 372 drivers/watchdog/aspeed_wdt.c wdt->wdd.bootstatus = WDIOF_CARDRESET; wdt 376 drivers/watchdog/aspeed_wdt.c wdt->wdd.groups = bswitch_groups; wdt 379 drivers/watchdog/aspeed_wdt.c dev_set_drvdata(dev, wdt); wdt 381 drivers/watchdog/aspeed_wdt.c return devm_watchdog_register_device(dev, &wdt->wdd); wdt 40 drivers/watchdog/at91sam9_wdt.c #define wdt_read(wdt, field) \ wdt 41 drivers/watchdog/at91sam9_wdt.c readl_relaxed((wdt)->base + (field)) wdt 43 drivers/watchdog/at91sam9_wdt.c writel_relaxed((val), (wdt)->base + (field)) wdt 98 drivers/watchdog/at91sam9_wdt.c struct at91wdt *wdt = (struct at91wdt *)dev_id; wdt 100 drivers/watchdog/at91sam9_wdt.c if (wdt_read(wdt, AT91_WDT_SR)) { wdt 112 drivers/watchdog/at91sam9_wdt.c static inline void at91_wdt_reset(struct at91wdt *wdt) wdt 114 drivers/watchdog/at91sam9_wdt.c wdt_write(wdt, AT91_WDT_CR, AT91_WDT_KEY | AT91_WDT_WDRSTT); wdt 122 drivers/watchdog/at91sam9_wdt.c struct at91wdt *wdt = from_timer(wdt, t, timer); wdt 123 drivers/watchdog/at91sam9_wdt.c if (time_before(jiffies, wdt->next_heartbeat) || wdt 124 drivers/watchdog/at91sam9_wdt.c !watchdog_active(&wdt->wdd)) { wdt 125 drivers/watchdog/at91sam9_wdt.c at91_wdt_reset(wdt); wdt 126 drivers/watchdog/at91sam9_wdt.c mod_timer(&wdt->timer, jiffies + wdt->heartbeat); wdt 134 drivers/watchdog/at91sam9_wdt.c struct at91wdt *wdt = to_wdt(wdd); wdt 136 drivers/watchdog/at91sam9_wdt.c wdt->next_heartbeat = jiffies + wdd->timeout * HZ; wdt 152 drivers/watchdog/at91sam9_wdt.c static int at91_wdt_init(struct platform_device *pdev, struct at91wdt *wdt) wdt 158 drivers/watchdog/at91sam9_wdt.c u32 mask = wdt->mr_mask; wdt 163 drivers/watchdog/at91sam9_wdt.c tmp = wdt_read(wdt, AT91_WDT_MR); wdt 164 drivers/watchdog/at91sam9_wdt.c if ((tmp & mask) != (wdt->mr & mask)) { wdt 166 drivers/watchdog/at91sam9_wdt.c wdt_write(wdt, AT91_WDT_MR, wdt->mr); wdt 167 drivers/watchdog/at91sam9_wdt.c tmp = wdt_read(wdt, AT91_WDT_MR); wdt 172 drivers/watchdog/at91sam9_wdt.c if (wdt->mr & AT91_WDT_WDDIS) wdt 198 drivers/watchdog/at91sam9_wdt.c wdt->heartbeat = max_heartbeat / 4; wdt 200 drivers/watchdog/at91sam9_wdt.c wdt->heartbeat = max_heartbeat / 2; wdt 202 drivers/watchdog/at91sam9_wdt.c wdt->heartbeat = min_heartbeat; wdt 208 drivers/watchdog/at91sam9_wdt.c if ((tmp & AT91_WDT_WDFIEN) && wdt->irq) { wdt 209 drivers/watchdog/at91sam9_wdt.c err = request_irq(wdt->irq, wdt_interrupt, wdt 212 drivers/watchdog/at91sam9_wdt.c pdev->name, wdt); wdt 217 drivers/watchdog/at91sam9_wdt.c if ((tmp & wdt->mr_mask) != (wdt->mr & wdt->mr_mask)) wdt 220 drivers/watchdog/at91sam9_wdt.c tmp & wdt->mr_mask, wdt->mr & wdt->mr_mask); wdt 222 drivers/watchdog/at91sam9_wdt.c timer_setup(&wdt->timer, at91_ping, 0); wdt 231 drivers/watchdog/at91sam9_wdt.c mod_timer(&wdt->timer, jiffies + min_heartbeat); wdt 234 drivers/watchdog/at91sam9_wdt.c if (watchdog_init_timeout(&wdt->wdd, 0, dev)) wdt 235 drivers/watchdog/at91sam9_wdt.c watchdog_init_timeout(&wdt->wdd, heartbeat, dev); wdt 236 drivers/watchdog/at91sam9_wdt.c watchdog_set_nowayout(&wdt->wdd, wdt->nowayout); wdt 237 drivers/watchdog/at91sam9_wdt.c err = watchdog_register_device(&wdt->wdd); wdt 241 drivers/watchdog/at91sam9_wdt.c wdt->next_heartbeat = jiffies + wdt->wdd.timeout * HZ; wdt 246 drivers/watchdog/at91sam9_wdt.c del_timer(&wdt->timer); wdt 266 drivers/watchdog/at91sam9_wdt.c static int of_at91wdt_init(struct device_node *np, struct at91wdt *wdt) wdt 273 drivers/watchdog/at91sam9_wdt.c wdt->irq = irq_of_parse_and_map(np, 0); wdt 274 drivers/watchdog/at91sam9_wdt.c if (!wdt->irq) wdt 275 drivers/watchdog/at91sam9_wdt.c dev_warn(wdt->wdd.parent, "failed to get IRQ from DT\n"); wdt 292 drivers/watchdog/at91sam9_wdt.c wdt->mr_mask = 0x3FFFFFFF; wdt 293 drivers/watchdog/at91sam9_wdt.c wdt->mr = 0; wdt 296 drivers/watchdog/at91sam9_wdt.c wdt->mr |= AT91_WDT_WDFIEN; wdt 297 drivers/watchdog/at91sam9_wdt.c wdt->mr_mask &= ~AT91_WDT_WDRPROC; wdt 299 drivers/watchdog/at91sam9_wdt.c wdt->mr |= AT91_WDT_WDRSTEN; wdt 304 drivers/watchdog/at91sam9_wdt.c wdt->mr |= AT91_WDT_WDRPROC; wdt 307 drivers/watchdog/at91sam9_wdt.c wdt->mr |= AT91_WDT_WDDIS; wdt 308 drivers/watchdog/at91sam9_wdt.c wdt->mr_mask &= AT91_WDT_WDDIS; wdt 312 drivers/watchdog/at91sam9_wdt.c wdt->mr |= AT91_WDT_WDIDLEHLT; wdt 315 drivers/watchdog/at91sam9_wdt.c wdt->mr |= AT91_WDT_WDDBGHLT; wdt 317 drivers/watchdog/at91sam9_wdt.c wdt->mr |= max | ((max - min) << 16); wdt 322 drivers/watchdog/at91sam9_wdt.c static inline int of_at91wdt_init(struct device_node *np, struct at91wdt *wdt) wdt 331 drivers/watchdog/at91sam9_wdt.c struct at91wdt *wdt; wdt 333 drivers/watchdog/at91sam9_wdt.c wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL); wdt 334 drivers/watchdog/at91sam9_wdt.c if (!wdt) wdt 337 drivers/watchdog/at91sam9_wdt.c wdt->mr = (WDT_HW_TIMEOUT * 256) | AT91_WDT_WDRSTEN | AT91_WDT_WDD | wdt 339 drivers/watchdog/at91sam9_wdt.c wdt->mr_mask = 0x3FFFFFFF; wdt 340 drivers/watchdog/at91sam9_wdt.c wdt->nowayout = nowayout; wdt 341 drivers/watchdog/at91sam9_wdt.c wdt->wdd.parent = &pdev->dev; wdt 342 drivers/watchdog/at91sam9_wdt.c wdt->wdd.info = &at91_wdt_info; wdt 343 drivers/watchdog/at91sam9_wdt.c wdt->wdd.ops = &at91_wdt_ops; wdt 344 drivers/watchdog/at91sam9_wdt.c wdt->wdd.timeout = WDT_HEARTBEAT; wdt 345 drivers/watchdog/at91sam9_wdt.c wdt->wdd.min_timeout = 1; wdt 346 drivers/watchdog/at91sam9_wdt.c wdt->wdd.max_timeout = 0xFFFF; wdt 348 drivers/watchdog/at91sam9_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 349 drivers/watchdog/at91sam9_wdt.c if (IS_ERR(wdt->base)) wdt 350 drivers/watchdog/at91sam9_wdt.c return PTR_ERR(wdt->base); wdt 352 drivers/watchdog/at91sam9_wdt.c wdt->sclk = devm_clk_get(&pdev->dev, NULL); wdt 353 drivers/watchdog/at91sam9_wdt.c if (IS_ERR(wdt->sclk)) wdt 354 drivers/watchdog/at91sam9_wdt.c return PTR_ERR(wdt->sclk); wdt 356 drivers/watchdog/at91sam9_wdt.c err = clk_prepare_enable(wdt->sclk); wdt 363 drivers/watchdog/at91sam9_wdt.c err = of_at91wdt_init(pdev->dev.of_node, wdt); wdt 368 drivers/watchdog/at91sam9_wdt.c err = at91_wdt_init(pdev, wdt); wdt 372 drivers/watchdog/at91sam9_wdt.c platform_set_drvdata(pdev, wdt); wdt 375 drivers/watchdog/at91sam9_wdt.c wdt->wdd.timeout, wdt->nowayout); wdt 380 drivers/watchdog/at91sam9_wdt.c clk_disable_unprepare(wdt->sclk); wdt 387 drivers/watchdog/at91sam9_wdt.c struct at91wdt *wdt = platform_get_drvdata(pdev); wdt 388 drivers/watchdog/at91sam9_wdt.c watchdog_unregister_device(&wdt->wdd); wdt 391 drivers/watchdog/at91sam9_wdt.c del_timer(&wdt->timer); wdt 392 drivers/watchdog/at91sam9_wdt.c clk_disable_unprepare(wdt->sclk); wdt 44 drivers/watchdog/atlas7_wdt.c struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd); wdt 47 drivers/watchdog/atlas7_wdt.c counter = readl(wdt->base + ATLAS7_WDT_CNT); wdt 48 drivers/watchdog/atlas7_wdt.c match = readl(wdt->base + ATLAS7_WDT_CNT_MATCH); wdt 51 drivers/watchdog/atlas7_wdt.c return delta / wdt->tick_rate; wdt 56 drivers/watchdog/atlas7_wdt.c struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd); wdt 59 drivers/watchdog/atlas7_wdt.c counter = readl(wdt->base + ATLAS7_WDT_CNT); wdt 60 drivers/watchdog/atlas7_wdt.c delta = wdd->timeout * wdt->tick_rate; wdt 63 drivers/watchdog/atlas7_wdt.c writel(match, wdt->base + ATLAS7_WDT_CNT_MATCH); wdt 70 drivers/watchdog/atlas7_wdt.c struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd); wdt 74 drivers/watchdog/atlas7_wdt.c writel(readl(wdt->base + ATLAS7_WDT_CNT_CTRL) | ATLAS7_WDT_CNT_EN, wdt 75 drivers/watchdog/atlas7_wdt.c wdt->base + ATLAS7_WDT_CNT_CTRL); wdt 76 drivers/watchdog/atlas7_wdt.c writel(1, wdt->base + ATLAS7_WDT_EN); wdt 83 drivers/watchdog/atlas7_wdt.c struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd); wdt 85 drivers/watchdog/atlas7_wdt.c writel(0, wdt->base + ATLAS7_WDT_EN); wdt 86 drivers/watchdog/atlas7_wdt.c writel(readl(wdt->base + ATLAS7_WDT_CNT_CTRL) & ~ATLAS7_WDT_CNT_EN, wdt 87 drivers/watchdog/atlas7_wdt.c wdt->base + ATLAS7_WDT_CNT_CTRL); wdt 135 drivers/watchdog/atlas7_wdt.c struct atlas7_wdog *wdt; wdt 139 drivers/watchdog/atlas7_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 140 drivers/watchdog/atlas7_wdt.c if (!wdt) wdt 142 drivers/watchdog/atlas7_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 143 drivers/watchdog/atlas7_wdt.c if (IS_ERR(wdt->base)) wdt 144 drivers/watchdog/atlas7_wdt.c return PTR_ERR(wdt->base); wdt 159 drivers/watchdog/atlas7_wdt.c writel(0, wdt->base + ATLAS7_WDT_CNT_CTRL); wdt 161 drivers/watchdog/atlas7_wdt.c wdt->tick_rate = clk_get_rate(clk); wdt 162 drivers/watchdog/atlas7_wdt.c if (!wdt->tick_rate) wdt 165 drivers/watchdog/atlas7_wdt.c wdt->clk = clk; wdt 167 drivers/watchdog/atlas7_wdt.c atlas7_wdd.max_timeout = UINT_MAX / wdt->tick_rate; wdt 172 drivers/watchdog/atlas7_wdt.c watchdog_set_drvdata(&atlas7_wdd, wdt); wdt 56 drivers/watchdog/bcm2835_wdt.c static bool bcm2835_wdt_is_running(struct bcm2835_wdt *wdt) wdt 60 drivers/watchdog/bcm2835_wdt.c cur = readl(wdt->base + PM_RSTC); wdt 67 drivers/watchdog/bcm2835_wdt.c struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); wdt 71 drivers/watchdog/bcm2835_wdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 74 drivers/watchdog/bcm2835_wdt.c PM_WDOG_TIME_SET), wdt->base + PM_WDOG); wdt 75 drivers/watchdog/bcm2835_wdt.c cur = readl_relaxed(wdt->base + PM_RSTC); wdt 77 drivers/watchdog/bcm2835_wdt.c PM_RSTC_WRCFG_FULL_RESET, wdt->base + PM_RSTC); wdt 79 drivers/watchdog/bcm2835_wdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 86 drivers/watchdog/bcm2835_wdt.c struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); wdt 88 drivers/watchdog/bcm2835_wdt.c writel_relaxed(PM_PASSWORD | PM_RSTC_RESET, wdt->base + PM_RSTC); wdt 94 drivers/watchdog/bcm2835_wdt.c struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); wdt 96 drivers/watchdog/bcm2835_wdt.c uint32_t ret = readl_relaxed(wdt->base + PM_WDOG); wdt 100 drivers/watchdog/bcm2835_wdt.c static void __bcm2835_restart(struct bcm2835_wdt *wdt) wdt 105 drivers/watchdog/bcm2835_wdt.c writel_relaxed(10 | PM_PASSWORD, wdt->base + PM_WDOG); wdt 106 drivers/watchdog/bcm2835_wdt.c val = readl_relaxed(wdt->base + PM_RSTC); wdt 109 drivers/watchdog/bcm2835_wdt.c writel_relaxed(val, wdt->base + PM_RSTC); wdt 118 drivers/watchdog/bcm2835_wdt.c struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); wdt 120 drivers/watchdog/bcm2835_wdt.c __bcm2835_restart(wdt); wdt 154 drivers/watchdog/bcm2835_wdt.c struct bcm2835_wdt *wdt = bcm2835_power_off_wdt; wdt 162 drivers/watchdog/bcm2835_wdt.c val = readl_relaxed(wdt->base + PM_RSTS); wdt 164 drivers/watchdog/bcm2835_wdt.c writel_relaxed(val, wdt->base + PM_RSTS); wdt 167 drivers/watchdog/bcm2835_wdt.c __bcm2835_restart(wdt); wdt 174 drivers/watchdog/bcm2835_wdt.c struct bcm2835_wdt *wdt; wdt 177 drivers/watchdog/bcm2835_wdt.c wdt = devm_kzalloc(dev, sizeof(struct bcm2835_wdt), GFP_KERNEL); wdt 178 drivers/watchdog/bcm2835_wdt.c if (!wdt) wdt 181 drivers/watchdog/bcm2835_wdt.c spin_lock_init(&wdt->lock); wdt 183 drivers/watchdog/bcm2835_wdt.c wdt->base = pm->base; wdt 185 drivers/watchdog/bcm2835_wdt.c watchdog_set_drvdata(&bcm2835_wdt_wdd, wdt); wdt 189 drivers/watchdog/bcm2835_wdt.c if (bcm2835_wdt_is_running(wdt)) { wdt 210 drivers/watchdog/bcm2835_wdt.c bcm2835_power_off_wdt = wdt; wdt 50 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 52 drivers/watchdog/bcm47xx_wdt.c wdt->timer_set_ms(wdt, wdd->timeout * 1000); wdt 64 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 66 drivers/watchdog/bcm47xx_wdt.c wdt->timer_set(wdt, 0); wdt 74 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 75 drivers/watchdog/bcm47xx_wdt.c u32 max_timer = wdt->max_timer_ms; wdt 90 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 92 drivers/watchdog/bcm47xx_wdt.c wdt->timer_set(wdt, 1); wdt 108 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = from_timer(wdt, t, soft_timer); wdt 109 drivers/watchdog/bcm47xx_wdt.c u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); wdt 111 drivers/watchdog/bcm47xx_wdt.c if (!atomic_dec_and_test(&wdt->soft_ticks)) { wdt 112 drivers/watchdog/bcm47xx_wdt.c wdt->timer_set_ms(wdt, next_tick); wdt 113 drivers/watchdog/bcm47xx_wdt.c mod_timer(&wdt->soft_timer, jiffies + HZ); wdt 121 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 123 drivers/watchdog/bcm47xx_wdt.c atomic_set(&wdt->soft_ticks, wdd->timeout); wdt 130 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 133 drivers/watchdog/bcm47xx_wdt.c bcm47xx_wdt_soft_timer_tick(&wdt->soft_timer); wdt 140 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); wdt 142 drivers/watchdog/bcm47xx_wdt.c del_timer_sync(&wdt->soft_timer); wdt 143 drivers/watchdog/bcm47xx_wdt.c wdt->timer_set(wdt, 0); wdt 181 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev); wdt 183 drivers/watchdog/bcm47xx_wdt.c if (!wdt) wdt 186 drivers/watchdog/bcm47xx_wdt.c soft = wdt->max_timer_ms < WDT_SOFTTIMER_THRESHOLD * 1000; wdt 189 drivers/watchdog/bcm47xx_wdt.c wdt->wdd.ops = &bcm47xx_wdt_soft_ops; wdt 190 drivers/watchdog/bcm47xx_wdt.c timer_setup(&wdt->soft_timer, bcm47xx_wdt_soft_timer_tick, 0); wdt 192 drivers/watchdog/bcm47xx_wdt.c wdt->wdd.ops = &bcm47xx_wdt_hard_ops; wdt 195 drivers/watchdog/bcm47xx_wdt.c wdt->wdd.info = &bcm47xx_wdt_info; wdt 196 drivers/watchdog/bcm47xx_wdt.c wdt->wdd.timeout = WDT_DEFAULT_TIME; wdt 197 drivers/watchdog/bcm47xx_wdt.c wdt->wdd.parent = &pdev->dev; wdt 198 drivers/watchdog/bcm47xx_wdt.c ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); wdt 201 drivers/watchdog/bcm47xx_wdt.c watchdog_set_nowayout(&wdt->wdd, nowayout); wdt 202 drivers/watchdog/bcm47xx_wdt.c watchdog_set_restart_priority(&wdt->wdd, 64); wdt 203 drivers/watchdog/bcm47xx_wdt.c watchdog_stop_on_reboot(&wdt->wdd); wdt 205 drivers/watchdog/bcm47xx_wdt.c ret = watchdog_register_device(&wdt->wdd); wdt 216 drivers/watchdog/bcm47xx_wdt.c del_timer_sync(&wdt->soft_timer); wdt 223 drivers/watchdog/bcm47xx_wdt.c struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev); wdt 225 drivers/watchdog/bcm47xx_wdt.c watchdog_unregister_device(&wdt->wdd); wdt 39 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); wdt 42 drivers/watchdog/bcm7038_wdt.c timeout = wdt->rate * wdog->timeout; wdt 44 drivers/watchdog/bcm7038_wdt.c writel(timeout, wdt->base + WDT_TIMEOUT_REG); wdt 49 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); wdt 51 drivers/watchdog/bcm7038_wdt.c writel(WDT_START_1, wdt->base + WDT_CMD_REG); wdt 52 drivers/watchdog/bcm7038_wdt.c writel(WDT_START_2, wdt->base + WDT_CMD_REG); wdt 67 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); wdt 69 drivers/watchdog/bcm7038_wdt.c writel(WDT_STOP_1, wdt->base + WDT_CMD_REG); wdt 70 drivers/watchdog/bcm7038_wdt.c writel(WDT_STOP_2, wdt->base + WDT_CMD_REG); wdt 88 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); wdt 91 drivers/watchdog/bcm7038_wdt.c time_left = readl(wdt->base + WDT_CMD_REG); wdt 93 drivers/watchdog/bcm7038_wdt.c return time_left / wdt->rate; wdt 118 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt; wdt 121 drivers/watchdog/bcm7038_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 122 drivers/watchdog/bcm7038_wdt.c if (!wdt) wdt 125 drivers/watchdog/bcm7038_wdt.c platform_set_drvdata(pdev, wdt); wdt 127 drivers/watchdog/bcm7038_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 128 drivers/watchdog/bcm7038_wdt.c if (IS_ERR(wdt->base)) wdt 129 drivers/watchdog/bcm7038_wdt.c return PTR_ERR(wdt->base); wdt 131 drivers/watchdog/bcm7038_wdt.c wdt->clk = devm_clk_get(dev, NULL); wdt 133 drivers/watchdog/bcm7038_wdt.c if (!IS_ERR(wdt->clk)) { wdt 134 drivers/watchdog/bcm7038_wdt.c err = clk_prepare_enable(wdt->clk); wdt 139 drivers/watchdog/bcm7038_wdt.c wdt->clk); wdt 142 drivers/watchdog/bcm7038_wdt.c wdt->rate = clk_get_rate(wdt->clk); wdt 144 drivers/watchdog/bcm7038_wdt.c if (!wdt->rate) wdt 145 drivers/watchdog/bcm7038_wdt.c wdt->rate = WDT_DEFAULT_RATE; wdt 147 drivers/watchdog/bcm7038_wdt.c wdt->rate = WDT_DEFAULT_RATE; wdt 148 drivers/watchdog/bcm7038_wdt.c wdt->clk = NULL; wdt 151 drivers/watchdog/bcm7038_wdt.c wdt->wdd.info = &bcm7038_wdt_info; wdt 152 drivers/watchdog/bcm7038_wdt.c wdt->wdd.ops = &bcm7038_wdt_ops; wdt 153 drivers/watchdog/bcm7038_wdt.c wdt->wdd.min_timeout = WDT_MIN_TIMEOUT; wdt 154 drivers/watchdog/bcm7038_wdt.c wdt->wdd.timeout = WDT_DEFAULT_TIMEOUT; wdt 155 drivers/watchdog/bcm7038_wdt.c wdt->wdd.max_timeout = 0xffffffff / wdt->rate; wdt 156 drivers/watchdog/bcm7038_wdt.c wdt->wdd.parent = dev; wdt 157 drivers/watchdog/bcm7038_wdt.c watchdog_set_drvdata(&wdt->wdd, wdt); wdt 159 drivers/watchdog/bcm7038_wdt.c watchdog_stop_on_reboot(&wdt->wdd); wdt 160 drivers/watchdog/bcm7038_wdt.c watchdog_stop_on_unregister(&wdt->wdd); wdt 161 drivers/watchdog/bcm7038_wdt.c err = devm_watchdog_register_device(dev, &wdt->wdd); wdt 173 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt = dev_get_drvdata(dev); wdt 175 drivers/watchdog/bcm7038_wdt.c if (watchdog_active(&wdt->wdd)) wdt 176 drivers/watchdog/bcm7038_wdt.c return bcm7038_wdt_stop(&wdt->wdd); wdt 183 drivers/watchdog/bcm7038_wdt.c struct bcm7038_watchdog *wdt = dev_get_drvdata(dev); wdt 185 drivers/watchdog/bcm7038_wdt.c if (watchdog_active(&wdt->wdd)) wdt 186 drivers/watchdog/bcm7038_wdt.c return bcm7038_wdt_start(&wdt->wdd); wdt 58 drivers/watchdog/bcm_kona_wdt.c static int secure_register_read(struct bcm_kona_wdt *wdt, uint32_t offset) wdt 71 drivers/watchdog/bcm_kona_wdt.c val = readl_relaxed(wdt->base + offset); wdt 77 drivers/watchdog/bcm_kona_wdt.c if (count > wdt->busy_count) wdt 78 drivers/watchdog/bcm_kona_wdt.c wdt->busy_count = count; wdt 97 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt = s->private; wdt 99 drivers/watchdog/bcm_kona_wdt.c if (!wdt) { wdt 104 drivers/watchdog/bcm_kona_wdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 105 drivers/watchdog/bcm_kona_wdt.c ctl_val = secure_register_read(wdt, SECWDOG_CTRL_REG); wdt 106 drivers/watchdog/bcm_kona_wdt.c cur_val = secure_register_read(wdt, SECWDOG_COUNT_REG); wdt 107 drivers/watchdog/bcm_kona_wdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 117 drivers/watchdog/bcm_kona_wdt.c ctl_sec = TICKS_TO_SECS(ctl, wdt); wdt 118 drivers/watchdog/bcm_kona_wdt.c cur_sec = TICKS_TO_SECS(cur, wdt); wdt 124 drivers/watchdog/bcm_kona_wdt.c res, wdt->resolution, wdt 127 drivers/watchdog/bcm_kona_wdt.c wdt->busy_count); wdt 138 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt = platform_get_drvdata(pdev); wdt 140 drivers/watchdog/bcm_kona_wdt.c if (!wdt) wdt 143 drivers/watchdog/bcm_kona_wdt.c wdt->debugfs = NULL; wdt 147 drivers/watchdog/bcm_kona_wdt.c debugfs_create_file("info", S_IFREG | S_IRUGO, dir, wdt, wdt 149 drivers/watchdog/bcm_kona_wdt.c wdt->debugfs = dir; wdt 154 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt = platform_get_drvdata(pdev); wdt 156 drivers/watchdog/bcm_kona_wdt.c if (wdt) wdt 157 drivers/watchdog/bcm_kona_wdt.c debugfs_remove_recursive(wdt->debugfs); wdt 167 drivers/watchdog/bcm_kona_wdt.c static int bcm_kona_wdt_ctrl_reg_modify(struct bcm_kona_wdt *wdt, wdt 174 drivers/watchdog/bcm_kona_wdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 176 drivers/watchdog/bcm_kona_wdt.c val = secure_register_read(wdt, SECWDOG_CTRL_REG); wdt 182 drivers/watchdog/bcm_kona_wdt.c writel_relaxed(val, wdt->base + SECWDOG_CTRL_REG); wdt 185 drivers/watchdog/bcm_kona_wdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 190 drivers/watchdog/bcm_kona_wdt.c static int bcm_kona_wdt_set_resolution_reg(struct bcm_kona_wdt *wdt) wdt 192 drivers/watchdog/bcm_kona_wdt.c if (wdt->resolution > SECWDOG_MAX_RES) wdt 195 drivers/watchdog/bcm_kona_wdt.c return bcm_kona_wdt_ctrl_reg_modify(wdt, SECWDOG_RES_MASK, wdt 196 drivers/watchdog/bcm_kona_wdt.c wdt->resolution << SECWDOG_CLKS_SHIFT); wdt 202 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt = watchdog_get_drvdata(wdog); wdt 204 drivers/watchdog/bcm_kona_wdt.c return bcm_kona_wdt_ctrl_reg_modify(wdt, SECWDOG_COUNT_MASK, wdt 205 drivers/watchdog/bcm_kona_wdt.c SECS_TO_TICKS(wdog->timeout, wdt) | wdt 218 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt = watchdog_get_drvdata(wdog); wdt 222 drivers/watchdog/bcm_kona_wdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 223 drivers/watchdog/bcm_kona_wdt.c val = secure_register_read(wdt, SECWDOG_COUNT_REG); wdt 224 drivers/watchdog/bcm_kona_wdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 229 drivers/watchdog/bcm_kona_wdt.c return TICKS_TO_SECS(val & SECWDOG_COUNT_MASK, wdt); wdt 240 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt = watchdog_get_drvdata(wdog); wdt 242 drivers/watchdog/bcm_kona_wdt.c return bcm_kona_wdt_ctrl_reg_modify(wdt, SECWDOG_EN_MASK | wdt 271 drivers/watchdog/bcm_kona_wdt.c struct bcm_kona_wdt *wdt; wdt 274 drivers/watchdog/bcm_kona_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 275 drivers/watchdog/bcm_kona_wdt.c if (!wdt) wdt 278 drivers/watchdog/bcm_kona_wdt.c spin_lock_init(&wdt->lock); wdt 280 drivers/watchdog/bcm_kona_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 281 drivers/watchdog/bcm_kona_wdt.c if (IS_ERR(wdt->base)) wdt 284 drivers/watchdog/bcm_kona_wdt.c wdt->resolution = SECWDOG_DEFAULT_RESOLUTION; wdt 285 drivers/watchdog/bcm_kona_wdt.c ret = bcm_kona_wdt_set_resolution_reg(wdt); wdt 291 drivers/watchdog/bcm_kona_wdt.c platform_set_drvdata(pdev, wdt); wdt 292 drivers/watchdog/bcm_kona_wdt.c watchdog_set_drvdata(&bcm_kona_wdt_wdd, wdt); wdt 29 drivers/watchdog/bd70528_wdt.c struct watchdog_device wdt; wdt 147 drivers/watchdog/bd70528_wdt.c static int bd70528_wdt_start(struct watchdog_device *wdt) wdt 149 drivers/watchdog/bd70528_wdt.c struct wdtbd70528 *w = watchdog_get_drvdata(wdt); wdt 155 drivers/watchdog/bd70528_wdt.c static int bd70528_wdt_stop(struct watchdog_device *wdt) wdt 157 drivers/watchdog/bd70528_wdt.c struct wdtbd70528 *w = watchdog_get_drvdata(wdt); wdt 163 drivers/watchdog/bd70528_wdt.c static int bd70528_wdt_set_timeout(struct watchdog_device *wdt, wdt 170 drivers/watchdog/bd70528_wdt.c struct wdtbd70528 *w = watchdog_get_drvdata(wdt); wdt 244 drivers/watchdog/bd70528_wdt.c w->wdt.info = &bd70528_wdt_info; wdt 245 drivers/watchdog/bd70528_wdt.c w->wdt.ops = &bd70528_wdt_ops; wdt 246 drivers/watchdog/bd70528_wdt.c w->wdt.min_hw_heartbeat_ms = WDT_MIN_MS; wdt 247 drivers/watchdog/bd70528_wdt.c w->wdt.max_hw_heartbeat_ms = WDT_MAX_MS; wdt 248 drivers/watchdog/bd70528_wdt.c w->wdt.parent = pdev->dev.parent; wdt 249 drivers/watchdog/bd70528_wdt.c w->wdt.timeout = DEFAULT_TIMEOUT; wdt 250 drivers/watchdog/bd70528_wdt.c watchdog_set_drvdata(&w->wdt, w); wdt 251 drivers/watchdog/bd70528_wdt.c watchdog_init_timeout(&w->wdt, 0, pdev->dev.parent); wdt 253 drivers/watchdog/bd70528_wdt.c ret = bd70528_wdt_set_timeout(&w->wdt, w->wdt.timeout); wdt 269 drivers/watchdog/bd70528_wdt.c set_bit(WDOG_HW_RUNNING, &w->wdt.status); wdt 272 drivers/watchdog/bd70528_wdt.c ret = devm_watchdog_register_device(&pdev->dev, &w->wdt); wdt 85 drivers/watchdog/cadence_wdt.c static inline void cdns_wdt_writereg(struct cdns_wdt *wdt, u32 offset, u32 val) wdt 87 drivers/watchdog/cadence_wdt.c writel_relaxed(val, wdt->regs + offset); wdt 126 drivers/watchdog/cadence_wdt.c struct cdns_wdt *wdt = watchdog_get_drvdata(wdd); wdt 128 drivers/watchdog/cadence_wdt.c spin_lock(&wdt->io_lock); wdt 129 drivers/watchdog/cadence_wdt.c cdns_wdt_writereg(wdt, CDNS_WDT_ZMR_OFFSET, wdt 131 drivers/watchdog/cadence_wdt.c spin_unlock(&wdt->io_lock); wdt 147 drivers/watchdog/cadence_wdt.c struct cdns_wdt *wdt = watchdog_get_drvdata(wdd); wdt 149 drivers/watchdog/cadence_wdt.c spin_lock(&wdt->io_lock); wdt 150 drivers/watchdog/cadence_wdt.c cdns_wdt_writereg(wdt, CDNS_WDT_RESTART_OFFSET, wdt 152 drivers/watchdog/cadence_wdt.c spin_unlock(&wdt->io_lock); wdt 177 drivers/watchdog/cadence_wdt.c struct cdns_wdt *wdt = watchdog_get_drvdata(wdd); wdt 180 drivers/watchdog/cadence_wdt.c unsigned long clock_f = clk_get_rate(wdt->clk); wdt 186 drivers/watchdog/cadence_wdt.c count = (wdd->timeout * (clock_f / wdt->prescaler)) / wdt 192 drivers/watchdog/cadence_wdt.c spin_lock(&wdt->io_lock); wdt 193 drivers/watchdog/cadence_wdt.c cdns_wdt_writereg(wdt, CDNS_WDT_ZMR_OFFSET, wdt 199 drivers/watchdog/cadence_wdt.c data = count | CDNS_WDT_REGISTER_ACCESS_KEY | wdt->ctrl_clksel; wdt 200 drivers/watchdog/cadence_wdt.c cdns_wdt_writereg(wdt, CDNS_WDT_CCR_OFFSET, data); wdt 205 drivers/watchdog/cadence_wdt.c if (wdt->rst) { wdt 212 drivers/watchdog/cadence_wdt.c cdns_wdt_writereg(wdt, CDNS_WDT_ZMR_OFFSET, data); wdt 213 drivers/watchdog/cadence_wdt.c cdns_wdt_writereg(wdt, CDNS_WDT_RESTART_OFFSET, wdt 215 drivers/watchdog/cadence_wdt.c spin_unlock(&wdt->io_lock); wdt 296 drivers/watchdog/cadence_wdt.c struct cdns_wdt *wdt; wdt 299 drivers/watchdog/cadence_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 300 drivers/watchdog/cadence_wdt.c if (!wdt) wdt 303 drivers/watchdog/cadence_wdt.c cdns_wdt_device = &wdt->cdns_wdt_device; wdt 310 drivers/watchdog/cadence_wdt.c wdt->regs = devm_platform_ioremap_resource(pdev, 0); wdt 311 drivers/watchdog/cadence_wdt.c if (IS_ERR(wdt->regs)) wdt 312 drivers/watchdog/cadence_wdt.c return PTR_ERR(wdt->regs); wdt 315 drivers/watchdog/cadence_wdt.c wdt->rst = of_property_read_bool(dev->of_node, "reset-on-timeout"); wdt 317 drivers/watchdog/cadence_wdt.c if (!wdt->rst && irq >= 0) { wdt 334 drivers/watchdog/cadence_wdt.c watchdog_set_drvdata(cdns_wdt_device, wdt); wdt 336 drivers/watchdog/cadence_wdt.c wdt->clk = devm_clk_get(dev, NULL); wdt 337 drivers/watchdog/cadence_wdt.c if (IS_ERR(wdt->clk)) { wdt 339 drivers/watchdog/cadence_wdt.c return PTR_ERR(wdt->clk); wdt 342 drivers/watchdog/cadence_wdt.c ret = clk_prepare_enable(wdt->clk); wdt 348 drivers/watchdog/cadence_wdt.c wdt->clk); wdt 352 drivers/watchdog/cadence_wdt.c clock_f = clk_get_rate(wdt->clk); wdt 354 drivers/watchdog/cadence_wdt.c wdt->prescaler = CDNS_WDT_PRESCALE_512; wdt 355 drivers/watchdog/cadence_wdt.c wdt->ctrl_clksel = CDNS_WDT_PRESCALE_SELECT_512; wdt 357 drivers/watchdog/cadence_wdt.c wdt->prescaler = CDNS_WDT_PRESCALE_4096; wdt 358 drivers/watchdog/cadence_wdt.c wdt->ctrl_clksel = CDNS_WDT_PRESCALE_SELECT_4096; wdt 361 drivers/watchdog/cadence_wdt.c spin_lock_init(&wdt->io_lock); wdt 368 drivers/watchdog/cadence_wdt.c platform_set_drvdata(pdev, wdt); wdt 371 drivers/watchdog/cadence_wdt.c wdt->regs, cdns_wdt_device->timeout, wdt 385 drivers/watchdog/cadence_wdt.c struct cdns_wdt *wdt = dev_get_drvdata(dev); wdt 387 drivers/watchdog/cadence_wdt.c if (watchdog_active(&wdt->cdns_wdt_device)) { wdt 388 drivers/watchdog/cadence_wdt.c cdns_wdt_stop(&wdt->cdns_wdt_device); wdt 389 drivers/watchdog/cadence_wdt.c clk_disable_unprepare(wdt->clk); wdt 404 drivers/watchdog/cadence_wdt.c struct cdns_wdt *wdt = dev_get_drvdata(dev); wdt 406 drivers/watchdog/cadence_wdt.c if (watchdog_active(&wdt->cdns_wdt_device)) { wdt 407 drivers/watchdog/cadence_wdt.c ret = clk_prepare_enable(wdt->clk); wdt 412 drivers/watchdog/cadence_wdt.c cdns_wdt_start(&wdt->cdns_wdt_device); wdt 28 drivers/watchdog/da9052_wdt.c struct watchdog_device wdt; wdt 164 drivers/watchdog/da9052_wdt.c da9052_wdt = &driver_data->wdt; wdt 179 drivers/watchdog/da9052_wdt.c return devm_watchdog_register_device(dev, &driver_data->wdt); wdt 32 drivers/watchdog/da9055_wdt.c struct watchdog_device wdt; wdt 134 drivers/watchdog/da9055_wdt.c da9055_wdt = &driver_data->wdt; wdt 149 drivers/watchdog/da9055_wdt.c ret = devm_watchdog_register_device(dev, &driver_data->wdt); wdt 47 drivers/watchdog/da9062_wdt.c static int da9062_reset_watchdog_timer(struct da9062_watchdog *wdt) wdt 49 drivers/watchdog/da9062_wdt.c return regmap_update_bits(wdt->hw->regmap, DA9062AA_CONTROL_F, wdt 54 drivers/watchdog/da9062_wdt.c static int da9062_wdt_update_timeout_register(struct da9062_watchdog *wdt, wdt 57 drivers/watchdog/da9062_wdt.c struct da9062 *chip = wdt->hw; wdt 60 drivers/watchdog/da9062_wdt.c ret = da9062_reset_watchdog_timer(wdt); wdt 79 drivers/watchdog/da9062_wdt.c struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); wdt 83 drivers/watchdog/da9062_wdt.c selector = da9062_wdt_timeout_to_sel(wdt->wdtdev.timeout); wdt 84 drivers/watchdog/da9062_wdt.c ret = da9062_wdt_update_timeout_register(wdt, selector); wdt 86 drivers/watchdog/da9062_wdt.c dev_err(wdt->hw->dev, "Watchdog failed to start (err = %d)\n", wdt 94 drivers/watchdog/da9062_wdt.c struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); wdt 97 drivers/watchdog/da9062_wdt.c ret = regmap_update_bits(wdt->hw->regmap, wdt 102 drivers/watchdog/da9062_wdt.c dev_err(wdt->hw->dev, "Watchdog failed to stop (err = %d)\n", wdt 110 drivers/watchdog/da9062_wdt.c struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); wdt 113 drivers/watchdog/da9062_wdt.c ret = da9062_reset_watchdog_timer(wdt); wdt 115 drivers/watchdog/da9062_wdt.c dev_err(wdt->hw->dev, "Failed to ping the watchdog (err = %d)\n", wdt 124 drivers/watchdog/da9062_wdt.c struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); wdt 129 drivers/watchdog/da9062_wdt.c ret = da9062_wdt_update_timeout_register(wdt, selector); wdt 131 drivers/watchdog/da9062_wdt.c dev_err(wdt->hw->dev, "Failed to set watchdog timeout (err = %d)\n", wdt 142 drivers/watchdog/da9062_wdt.c struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); wdt 145 drivers/watchdog/da9062_wdt.c ret = regmap_write(wdt->hw->regmap, wdt 149 drivers/watchdog/da9062_wdt.c dev_alert(wdt->hw->dev, "Failed to shutdown (err = %d)\n", wdt 184 drivers/watchdog/da9062_wdt.c struct da9062_watchdog *wdt; wdt 190 drivers/watchdog/da9062_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 191 drivers/watchdog/da9062_wdt.c if (!wdt) wdt 194 drivers/watchdog/da9062_wdt.c wdt->hw = chip; wdt 196 drivers/watchdog/da9062_wdt.c wdt->wdtdev.info = &da9062_watchdog_info; wdt 197 drivers/watchdog/da9062_wdt.c wdt->wdtdev.ops = &da9062_watchdog_ops; wdt 198 drivers/watchdog/da9062_wdt.c wdt->wdtdev.min_timeout = DA9062_WDT_MIN_TIMEOUT; wdt 199 drivers/watchdog/da9062_wdt.c wdt->wdtdev.max_timeout = DA9062_WDT_MAX_TIMEOUT; wdt 200 drivers/watchdog/da9062_wdt.c wdt->wdtdev.min_hw_heartbeat_ms = DA9062_RESET_PROTECTION_MS; wdt 201 drivers/watchdog/da9062_wdt.c wdt->wdtdev.timeout = DA9062_WDG_DEFAULT_TIMEOUT; wdt 202 drivers/watchdog/da9062_wdt.c wdt->wdtdev.status = WATCHDOG_NOWAYOUT_INIT_STATUS; wdt 203 drivers/watchdog/da9062_wdt.c wdt->wdtdev.parent = dev; wdt 205 drivers/watchdog/da9062_wdt.c watchdog_set_restart_priority(&wdt->wdtdev, 128); wdt 207 drivers/watchdog/da9062_wdt.c watchdog_set_drvdata(&wdt->wdtdev, wdt); wdt 209 drivers/watchdog/da9062_wdt.c ret = devm_watchdog_register_device(dev, &wdt->wdtdev); wdt 213 drivers/watchdog/da9062_wdt.c return da9062_wdt_ping(&wdt->wdtdev); wdt 34 drivers/watchdog/digicolor_wdt.c static void dc_wdt_set(struct dc_wdt *wdt, u32 ticks) wdt 38 drivers/watchdog/digicolor_wdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 40 drivers/watchdog/digicolor_wdt.c writel_relaxed(0, wdt->base + TIMER_A_CONTROL); wdt 41 drivers/watchdog/digicolor_wdt.c writel_relaxed(ticks, wdt->base + TIMER_A_COUNT); wdt 43 drivers/watchdog/digicolor_wdt.c wdt->base + TIMER_A_CONTROL); wdt 45 drivers/watchdog/digicolor_wdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 51 drivers/watchdog/digicolor_wdt.c struct dc_wdt *wdt = watchdog_get_drvdata(wdog); wdt 53 drivers/watchdog/digicolor_wdt.c dc_wdt_set(wdt, 1); wdt 62 drivers/watchdog/digicolor_wdt.c struct dc_wdt *wdt = watchdog_get_drvdata(wdog); wdt 64 drivers/watchdog/digicolor_wdt.c dc_wdt_set(wdt, wdog->timeout * clk_get_rate(wdt->clk)); wdt 71 drivers/watchdog/digicolor_wdt.c struct dc_wdt *wdt = watchdog_get_drvdata(wdog); wdt 73 drivers/watchdog/digicolor_wdt.c writel_relaxed(0, wdt->base + TIMER_A_CONTROL); wdt 80 drivers/watchdog/digicolor_wdt.c struct dc_wdt *wdt = watchdog_get_drvdata(wdog); wdt 82 drivers/watchdog/digicolor_wdt.c dc_wdt_set(wdt, t * clk_get_rate(wdt->clk)); wdt 90 drivers/watchdog/digicolor_wdt.c struct dc_wdt *wdt = watchdog_get_drvdata(wdog); wdt 91 drivers/watchdog/digicolor_wdt.c uint32_t count = readl_relaxed(wdt->base + TIMER_A_COUNT); wdt 93 drivers/watchdog/digicolor_wdt.c return count / clk_get_rate(wdt->clk); wdt 120 drivers/watchdog/digicolor_wdt.c struct dc_wdt *wdt; wdt 122 drivers/watchdog/digicolor_wdt.c wdt = devm_kzalloc(dev, sizeof(struct dc_wdt), GFP_KERNEL); wdt 123 drivers/watchdog/digicolor_wdt.c if (!wdt) wdt 126 drivers/watchdog/digicolor_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 127 drivers/watchdog/digicolor_wdt.c if (IS_ERR(wdt->base)) wdt 128 drivers/watchdog/digicolor_wdt.c return PTR_ERR(wdt->base); wdt 130 drivers/watchdog/digicolor_wdt.c wdt->clk = devm_clk_get(dev, NULL); wdt 131 drivers/watchdog/digicolor_wdt.c if (IS_ERR(wdt->clk)) wdt 132 drivers/watchdog/digicolor_wdt.c return PTR_ERR(wdt->clk); wdt 133 drivers/watchdog/digicolor_wdt.c dc_wdt_wdd.max_timeout = U32_MAX / clk_get_rate(wdt->clk); wdt 137 drivers/watchdog/digicolor_wdt.c spin_lock_init(&wdt->lock); wdt 139 drivers/watchdog/digicolor_wdt.c watchdog_set_drvdata(&dc_wdt_wdd, wdt); wdt 91 drivers/watchdog/imgpdc_wdt.c struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev); wdt 93 drivers/watchdog/imgpdc_wdt.c writel(PDC_WDT_TICKLE1_MAGIC, wdt->base + PDC_WDT_TICKLE1); wdt 94 drivers/watchdog/imgpdc_wdt.c writel(PDC_WDT_TICKLE2_MAGIC, wdt->base + PDC_WDT_TICKLE2); wdt 102 drivers/watchdog/imgpdc_wdt.c struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev); wdt 104 drivers/watchdog/imgpdc_wdt.c val = readl(wdt->base + PDC_WDT_CONFIG); wdt 106 drivers/watchdog/imgpdc_wdt.c writel(val, wdt->base + PDC_WDT_CONFIG); wdt 114 drivers/watchdog/imgpdc_wdt.c static void __pdc_wdt_set_timeout(struct pdc_wdt_dev *wdt) wdt 116 drivers/watchdog/imgpdc_wdt.c unsigned long clk_rate = clk_get_rate(wdt->wdt_clk); wdt 119 drivers/watchdog/imgpdc_wdt.c val = readl(wdt->base + PDC_WDT_CONFIG) & ~PDC_WDT_CONFIG_DELAY_MASK; wdt 120 drivers/watchdog/imgpdc_wdt.c val |= order_base_2(wdt->wdt_dev.timeout * clk_rate) - 1; wdt 121 drivers/watchdog/imgpdc_wdt.c writel(val, wdt->base + PDC_WDT_CONFIG); wdt 127 drivers/watchdog/imgpdc_wdt.c struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev); wdt 129 drivers/watchdog/imgpdc_wdt.c wdt->wdt_dev.timeout = new_timeout; wdt 131 drivers/watchdog/imgpdc_wdt.c __pdc_wdt_set_timeout(wdt); wdt 140 drivers/watchdog/imgpdc_wdt.c struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev); wdt 142 drivers/watchdog/imgpdc_wdt.c __pdc_wdt_set_timeout(wdt); wdt 144 drivers/watchdog/imgpdc_wdt.c val = readl(wdt->base + PDC_WDT_CONFIG); wdt 146 drivers/watchdog/imgpdc_wdt.c writel(val, wdt->base + PDC_WDT_CONFIG); wdt 154 drivers/watchdog/imgpdc_wdt.c struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev); wdt 157 drivers/watchdog/imgpdc_wdt.c writel(0x1, wdt->base + PDC_WDT_SOFT_RESET); wdt 70 drivers/watchdog/imx7ulp_wdt.c struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); wdt 72 drivers/watchdog/imx7ulp_wdt.c writel(REFRESH, wdt->base + WDOG_CNT); wdt 79 drivers/watchdog/imx7ulp_wdt.c struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); wdt 81 drivers/watchdog/imx7ulp_wdt.c imx7ulp_wdt_enable(wdt->base, true); wdt 88 drivers/watchdog/imx7ulp_wdt.c struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); wdt 90 drivers/watchdog/imx7ulp_wdt.c imx7ulp_wdt_enable(wdt->base, false); wdt 98 drivers/watchdog/imx7ulp_wdt.c struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); wdt 101 drivers/watchdog/imx7ulp_wdt.c writel(UNLOCK, wdt->base + WDOG_CNT); wdt 102 drivers/watchdog/imx7ulp_wdt.c writel(val, wdt->base + WDOG_TOVAL); wdt 112 drivers/watchdog/imx7ulp_wdt.c struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); wdt 114 drivers/watchdog/imx7ulp_wdt.c imx7ulp_wdt_enable(wdt->base, true); wdt 115 drivers/watchdog/imx7ulp_wdt.c imx7ulp_wdt_set_timeout(&wdt->wdd, 1); wdt 51 drivers/watchdog/jz4740_wdt.c struct watchdog_device wdt; wdt 174 drivers/watchdog/jz4740_wdt.c jz4740_wdt = &drvdata->wdt; wdt 194 drivers/watchdog/jz4740_wdt.c return devm_watchdog_register_device(dev, &drvdata->wdt); wdt 62 drivers/watchdog/lantiq_wdt.c struct watchdog_device wdt; wdt 87 drivers/watchdog/lantiq_wdt.c static struct ltq_wdt_priv *ltq_wdt_get_priv(struct watchdog_device *wdt) wdt 89 drivers/watchdog/lantiq_wdt.c return container_of(wdt, struct ltq_wdt_priv, wdt); wdt 98 drivers/watchdog/lantiq_wdt.c static int ltq_wdt_start(struct watchdog_device *wdt) wdt 100 drivers/watchdog/lantiq_wdt.c struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt); wdt 103 drivers/watchdog/lantiq_wdt.c timeout = wdt->timeout * priv->clk_rate; wdt 115 drivers/watchdog/lantiq_wdt.c static int ltq_wdt_stop(struct watchdog_device *wdt) wdt 117 drivers/watchdog/lantiq_wdt.c struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt); wdt 126 drivers/watchdog/lantiq_wdt.c static int ltq_wdt_ping(struct watchdog_device *wdt) wdt 128 drivers/watchdog/lantiq_wdt.c struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt); wdt 131 drivers/watchdog/lantiq_wdt.c timeout = wdt->timeout * priv->clk_rate; wdt 141 drivers/watchdog/lantiq_wdt.c static unsigned int ltq_wdt_get_timeleft(struct watchdog_device *wdt) wdt 143 drivers/watchdog/lantiq_wdt.c struct ltq_wdt_priv *priv = ltq_wdt_get_priv(wdt); wdt 203 drivers/watchdog/lantiq_wdt.c struct watchdog_device *wdt; wdt 226 drivers/watchdog/lantiq_wdt.c wdt = &priv->wdt; wdt 227 drivers/watchdog/lantiq_wdt.c wdt->info = <q_wdt_info; wdt 228 drivers/watchdog/lantiq_wdt.c wdt->ops = <q_wdt_ops; wdt 229 drivers/watchdog/lantiq_wdt.c wdt->min_timeout = 1; wdt 230 drivers/watchdog/lantiq_wdt.c wdt->max_timeout = LTQ_WDT_CR_MAX_TIMEOUT / priv->clk_rate; wdt 231 drivers/watchdog/lantiq_wdt.c wdt->timeout = wdt->max_timeout; wdt 232 drivers/watchdog/lantiq_wdt.c wdt->parent = dev; wdt 238 drivers/watchdog/lantiq_wdt.c wdt->bootstatus = ret; wdt 241 drivers/watchdog/lantiq_wdt.c watchdog_set_nowayout(wdt, nowayout); wdt 242 drivers/watchdog/lantiq_wdt.c watchdog_init_timeout(wdt, 0, dev); wdt 251 drivers/watchdog/lantiq_wdt.c ltq_wdt_start(wdt); wdt 252 drivers/watchdog/lantiq_wdt.c set_bit(WDOG_HW_RUNNING, &wdt->status); wdt 255 drivers/watchdog/lantiq_wdt.c return devm_watchdog_register_device(dev, wdt); wdt 24 drivers/watchdog/loongson1_wdt.c struct watchdog_device wdt; wdt 122 drivers/watchdog/loongson1_wdt.c ls1x_wdt = &drvdata->wdt; wdt 134 drivers/watchdog/loongson1_wdt.c err = devm_watchdog_register_device(dev, &drvdata->wdt); wdt 56 drivers/watchdog/max63xx_wdt.c void (*ping)(struct max63xx_wdt *wdt); wdt 57 drivers/watchdog/max63xx_wdt.c void (*set)(struct max63xx_wdt *wdt, u8 set); wdt 122 drivers/watchdog/max63xx_wdt.c struct max63xx_wdt *wdt = watchdog_get_drvdata(wdd); wdt 124 drivers/watchdog/max63xx_wdt.c wdt->ping(wdt); wdt 130 drivers/watchdog/max63xx_wdt.c struct max63xx_wdt *wdt = watchdog_get_drvdata(wdd); wdt 132 drivers/watchdog/max63xx_wdt.c wdt->set(wdt, wdt->timeout->wdset); wdt 135 drivers/watchdog/max63xx_wdt.c if (wdt->timeout->tdelay == 0) wdt 136 drivers/watchdog/max63xx_wdt.c wdt->ping(wdt); wdt 142 drivers/watchdog/max63xx_wdt.c struct max63xx_wdt *wdt = watchdog_get_drvdata(wdd); wdt 144 drivers/watchdog/max63xx_wdt.c wdt->set(wdt, MAX6369_WDSET_DISABLED); wdt 160 drivers/watchdog/max63xx_wdt.c static void max63xx_mmap_ping(struct max63xx_wdt *wdt) wdt 164 drivers/watchdog/max63xx_wdt.c spin_lock(&wdt->lock); wdt 166 drivers/watchdog/max63xx_wdt.c val = __raw_readb(wdt->base); wdt 168 drivers/watchdog/max63xx_wdt.c __raw_writeb(val | MAX6369_WDI, wdt->base); wdt 169 drivers/watchdog/max63xx_wdt.c __raw_writeb(val & ~MAX6369_WDI, wdt->base); wdt 171 drivers/watchdog/max63xx_wdt.c spin_unlock(&wdt->lock); wdt 174 drivers/watchdog/max63xx_wdt.c static void max63xx_mmap_set(struct max63xx_wdt *wdt, u8 set) wdt 178 drivers/watchdog/max63xx_wdt.c spin_lock(&wdt->lock); wdt 180 drivers/watchdog/max63xx_wdt.c val = __raw_readb(wdt->base); wdt 183 drivers/watchdog/max63xx_wdt.c __raw_writeb(val, wdt->base); wdt 185 drivers/watchdog/max63xx_wdt.c spin_unlock(&wdt->lock); wdt 188 drivers/watchdog/max63xx_wdt.c static int max63xx_mmap_init(struct platform_device *p, struct max63xx_wdt *wdt) wdt 190 drivers/watchdog/max63xx_wdt.c wdt->base = devm_platform_ioremap_resource(p, 0); wdt 191 drivers/watchdog/max63xx_wdt.c if (IS_ERR(wdt->base)) wdt 192 drivers/watchdog/max63xx_wdt.c return PTR_ERR(wdt->base); wdt 194 drivers/watchdog/max63xx_wdt.c spin_lock_init(&wdt->lock); wdt 196 drivers/watchdog/max63xx_wdt.c wdt->ping = max63xx_mmap_ping; wdt 197 drivers/watchdog/max63xx_wdt.c wdt->set = max63xx_mmap_set; wdt 204 drivers/watchdog/max63xx_wdt.c struct max63xx_wdt *wdt; wdt 208 drivers/watchdog/max63xx_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 209 drivers/watchdog/max63xx_wdt.c if (!wdt) wdt 217 drivers/watchdog/max63xx_wdt.c wdt->timeout = max63xx_select_timeout(table, heartbeat); wdt 218 drivers/watchdog/max63xx_wdt.c if (!wdt->timeout) { wdt 224 drivers/watchdog/max63xx_wdt.c err = max63xx_mmap_init(pdev, wdt); wdt 228 drivers/watchdog/max63xx_wdt.c platform_set_drvdata(pdev, &wdt->wdd); wdt 229 drivers/watchdog/max63xx_wdt.c watchdog_set_drvdata(&wdt->wdd, wdt); wdt 231 drivers/watchdog/max63xx_wdt.c wdt->wdd.parent = dev; wdt 232 drivers/watchdog/max63xx_wdt.c wdt->wdd.timeout = wdt->timeout->twd; wdt 233 drivers/watchdog/max63xx_wdt.c wdt->wdd.info = &max63xx_wdt_info; wdt 234 drivers/watchdog/max63xx_wdt.c wdt->wdd.ops = &max63xx_wdt_ops; wdt 236 drivers/watchdog/max63xx_wdt.c watchdog_set_nowayout(&wdt->wdd, nowayout); wdt 238 drivers/watchdog/max63xx_wdt.c err = devm_watchdog_register_device(dev, &wdt->wdd); wdt 243 drivers/watchdog/max63xx_wdt.c wdt->timeout->twd, wdt->timeout->tdelay); wdt 31 drivers/watchdog/max77620_wdt.c struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 33 drivers/watchdog/max77620_wdt.c return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, wdt 39 drivers/watchdog/max77620_wdt.c struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 41 drivers/watchdog/max77620_wdt.c return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, wdt 47 drivers/watchdog/max77620_wdt.c struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 49 drivers/watchdog/max77620_wdt.c return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL3, wdt 56 drivers/watchdog/max77620_wdt.c struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 83 drivers/watchdog/max77620_wdt.c ret = regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL3, wdt 88 drivers/watchdog/max77620_wdt.c ret = regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, wdt 113 drivers/watchdog/max77620_wdt.c struct max77620_wdt *wdt; wdt 118 drivers/watchdog/max77620_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 119 drivers/watchdog/max77620_wdt.c if (!wdt) wdt 122 drivers/watchdog/max77620_wdt.c wdt->dev = dev; wdt 123 drivers/watchdog/max77620_wdt.c wdt->rmap = dev_get_regmap(dev->parent, NULL); wdt 124 drivers/watchdog/max77620_wdt.c if (!wdt->rmap) { wdt 125 drivers/watchdog/max77620_wdt.c dev_err(wdt->dev, "Failed to get parent regmap\n"); wdt 129 drivers/watchdog/max77620_wdt.c wdt_dev = &wdt->wdt_dev; wdt 136 drivers/watchdog/max77620_wdt.c platform_set_drvdata(pdev, wdt); wdt 139 drivers/watchdog/max77620_wdt.c ret = regmap_update_bits(wdt->rmap, MAX77620_REG_ONOFFCNFG2, wdt 143 drivers/watchdog/max77620_wdt.c dev_err(wdt->dev, "Failed to set WD_RST_WK: %d\n", ret); wdt 148 drivers/watchdog/max77620_wdt.c ret = regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, wdt 152 drivers/watchdog/max77620_wdt.c dev_err(wdt->dev, "Failed to set WDT OFF mode: %d\n", ret); wdt 157 drivers/watchdog/max77620_wdt.c ret = regmap_read(wdt->rmap, MAX77620_REG_CNFGGLBL2, ®val); wdt 159 drivers/watchdog/max77620_wdt.c dev_err(wdt->dev, "Failed to read WDT CFG register: %d\n", ret); wdt 182 drivers/watchdog/max77620_wdt.c watchdog_set_drvdata(wdt_dev, wdt); wdt 166 drivers/watchdog/mei_wdt.c static int mei_wdt_ping(struct mei_wdt *wdt) wdt 177 drivers/watchdog/mei_wdt.c req.timeout = wdt->timeout; wdt 179 drivers/watchdog/mei_wdt.c ret = mei_cldev_send(wdt->cldev, (u8 *)&req, req_len); wdt 194 drivers/watchdog/mei_wdt.c static int mei_wdt_stop(struct mei_wdt *wdt) wdt 206 drivers/watchdog/mei_wdt.c ret = mei_cldev_send(wdt->cldev, (u8 *)&req, req_len); wdt 222 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = watchdog_get_drvdata(wdd); wdt 224 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_START; wdt 225 drivers/watchdog/mei_wdt.c wdd->timeout = wdt->timeout; wdt 238 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = watchdog_get_drvdata(wdd); wdt 241 drivers/watchdog/mei_wdt.c if (wdt->state != MEI_WDT_RUNNING) wdt 244 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_STOPPING; wdt 246 drivers/watchdog/mei_wdt.c ret = mei_wdt_stop(wdt); wdt 250 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_IDLE; wdt 264 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = watchdog_get_drvdata(wdd); wdt 267 drivers/watchdog/mei_wdt.c if (wdt->state != MEI_WDT_START && wdt->state != MEI_WDT_RUNNING) wdt 270 drivers/watchdog/mei_wdt.c if (wdt->resp_required) wdt 271 drivers/watchdog/mei_wdt.c init_completion(&wdt->response); wdt 273 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_RUNNING; wdt 274 drivers/watchdog/mei_wdt.c ret = mei_wdt_ping(wdt); wdt 278 drivers/watchdog/mei_wdt.c if (wdt->resp_required) wdt 279 drivers/watchdog/mei_wdt.c ret = wait_for_completion_killable(&wdt->response); wdt 296 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = watchdog_get_drvdata(wdd); wdt 299 drivers/watchdog/mei_wdt.c wdt->timeout = timeout; wdt 329 drivers/watchdog/mei_wdt.c static inline bool __mei_wdt_is_registered(struct mei_wdt *wdt) wdt 331 drivers/watchdog/mei_wdt.c return !!watchdog_get_drvdata(&wdt->wdd); wdt 339 drivers/watchdog/mei_wdt.c static void mei_wdt_unregister(struct mei_wdt *wdt) wdt 341 drivers/watchdog/mei_wdt.c mutex_lock(&wdt->reg_lock); wdt 343 drivers/watchdog/mei_wdt.c if (__mei_wdt_is_registered(wdt)) { wdt 344 drivers/watchdog/mei_wdt.c watchdog_unregister_device(&wdt->wdd); wdt 345 drivers/watchdog/mei_wdt.c watchdog_set_drvdata(&wdt->wdd, NULL); wdt 346 drivers/watchdog/mei_wdt.c memset(&wdt->wdd, 0, sizeof(wdt->wdd)); wdt 349 drivers/watchdog/mei_wdt.c mutex_unlock(&wdt->reg_lock); wdt 359 drivers/watchdog/mei_wdt.c static int mei_wdt_register(struct mei_wdt *wdt) wdt 364 drivers/watchdog/mei_wdt.c if (!wdt || !wdt->cldev) wdt 367 drivers/watchdog/mei_wdt.c dev = &wdt->cldev->dev; wdt 369 drivers/watchdog/mei_wdt.c mutex_lock(&wdt->reg_lock); wdt 371 drivers/watchdog/mei_wdt.c if (__mei_wdt_is_registered(wdt)) { wdt 376 drivers/watchdog/mei_wdt.c wdt->wdd.info = &wd_info; wdt 377 drivers/watchdog/mei_wdt.c wdt->wdd.ops = &wd_ops; wdt 378 drivers/watchdog/mei_wdt.c wdt->wdd.parent = dev; wdt 379 drivers/watchdog/mei_wdt.c wdt->wdd.timeout = MEI_WDT_DEFAULT_TIMEOUT; wdt 380 drivers/watchdog/mei_wdt.c wdt->wdd.min_timeout = MEI_WDT_MIN_TIMEOUT; wdt 381 drivers/watchdog/mei_wdt.c wdt->wdd.max_timeout = MEI_WDT_MAX_TIMEOUT; wdt 383 drivers/watchdog/mei_wdt.c watchdog_set_drvdata(&wdt->wdd, wdt); wdt 384 drivers/watchdog/mei_wdt.c watchdog_stop_on_reboot(&wdt->wdd); wdt 386 drivers/watchdog/mei_wdt.c ret = watchdog_register_device(&wdt->wdd); wdt 388 drivers/watchdog/mei_wdt.c watchdog_set_drvdata(&wdt->wdd, NULL); wdt 390 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_IDLE; wdt 393 drivers/watchdog/mei_wdt.c mutex_unlock(&wdt->reg_lock); wdt 399 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = container_of(work, struct mei_wdt, unregister); wdt 401 drivers/watchdog/mei_wdt.c mei_wdt_unregister(wdt); wdt 411 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = mei_cldev_get_drvdata(cldev); wdt 416 drivers/watchdog/mei_wdt.c ret = mei_cldev_recv(wdt->cldev, (u8 *)&res, res_len); wdt 440 drivers/watchdog/mei_wdt.c mei_wdt_state_str(wdt->state), wdt 441 drivers/watchdog/mei_wdt.c wdt->state); wdt 449 drivers/watchdog/mei_wdt.c if (wdt->state == MEI_WDT_RUNNING) { wdt 451 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_NOT_REQUIRED; wdt 452 drivers/watchdog/mei_wdt.c schedule_work(&wdt->unregister); wdt 457 drivers/watchdog/mei_wdt.c if (wdt->state == MEI_WDT_PROBE) { wdt 459 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_NOT_REQUIRED; wdt 462 drivers/watchdog/mei_wdt.c mei_wdt_stop(wdt); wdt 463 drivers/watchdog/mei_wdt.c mei_wdt_register(wdt); wdt 469 drivers/watchdog/mei_wdt.c mei_wdt_state_str(wdt->state), wdt->state); wdt 472 drivers/watchdog/mei_wdt.c if (!completion_done(&wdt->response)) wdt 473 drivers/watchdog/mei_wdt.c complete(&wdt->response); wdt 483 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = mei_cldev_get_drvdata(cldev); wdt 485 drivers/watchdog/mei_wdt.c if (wdt->state != MEI_WDT_NOT_REQUIRED) wdt 488 drivers/watchdog/mei_wdt.c mei_wdt_register(wdt); wdt 496 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = file->private_data; wdt 501 drivers/watchdog/mei_wdt.c mutex_lock(&wdt->reg_lock); wdt 503 drivers/watchdog/mei_wdt.c __mei_wdt_is_registered(wdt) ? "activated" : "deactivated"); wdt 504 drivers/watchdog/mei_wdt.c mutex_unlock(&wdt->reg_lock); wdt 518 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = file->private_data; wdt 523 drivers/watchdog/mei_wdt.c mei_wdt_state_str(wdt->state)); wdt 534 drivers/watchdog/mei_wdt.c static void dbgfs_unregister(struct mei_wdt *wdt) wdt 536 drivers/watchdog/mei_wdt.c debugfs_remove_recursive(wdt->dbgfs_dir); wdt 537 drivers/watchdog/mei_wdt.c wdt->dbgfs_dir = NULL; wdt 540 drivers/watchdog/mei_wdt.c static void dbgfs_register(struct mei_wdt *wdt) wdt 545 drivers/watchdog/mei_wdt.c wdt->dbgfs_dir = dir; wdt 547 drivers/watchdog/mei_wdt.c debugfs_create_file("state", S_IRUSR, dir, wdt, &dbgfs_fops_state); wdt 549 drivers/watchdog/mei_wdt.c debugfs_create_file("activation", S_IRUSR, dir, wdt, wdt 555 drivers/watchdog/mei_wdt.c static inline void dbgfs_unregister(struct mei_wdt *wdt) {} wdt 556 drivers/watchdog/mei_wdt.c static inline void dbgfs_register(struct mei_wdt *wdt) {} wdt 562 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt; wdt 565 drivers/watchdog/mei_wdt.c wdt = kzalloc(sizeof(struct mei_wdt), GFP_KERNEL); wdt 566 drivers/watchdog/mei_wdt.c if (!wdt) wdt 569 drivers/watchdog/mei_wdt.c wdt->timeout = MEI_WDT_DEFAULT_TIMEOUT; wdt 570 drivers/watchdog/mei_wdt.c wdt->state = MEI_WDT_PROBE; wdt 571 drivers/watchdog/mei_wdt.c wdt->cldev = cldev; wdt 572 drivers/watchdog/mei_wdt.c wdt->resp_required = mei_cldev_ver(cldev) > 0x1; wdt 573 drivers/watchdog/mei_wdt.c mutex_init(&wdt->reg_lock); wdt 574 drivers/watchdog/mei_wdt.c init_completion(&wdt->response); wdt 575 drivers/watchdog/mei_wdt.c INIT_WORK(&wdt->unregister, mei_wdt_unregister_work); wdt 577 drivers/watchdog/mei_wdt.c mei_cldev_set_drvdata(cldev, wdt); wdt 585 drivers/watchdog/mei_wdt.c ret = mei_cldev_register_rx_cb(wdt->cldev, mei_wdt_rx); wdt 591 drivers/watchdog/mei_wdt.c ret = mei_cldev_register_notif_cb(wdt->cldev, mei_wdt_notif); wdt 601 drivers/watchdog/mei_wdt.c if (wdt->resp_required) wdt 602 drivers/watchdog/mei_wdt.c ret = mei_wdt_ping(wdt); wdt 604 drivers/watchdog/mei_wdt.c ret = mei_wdt_register(wdt); wdt 609 drivers/watchdog/mei_wdt.c dbgfs_register(wdt); wdt 617 drivers/watchdog/mei_wdt.c kfree(wdt); wdt 624 drivers/watchdog/mei_wdt.c struct mei_wdt *wdt = mei_cldev_get_drvdata(cldev); wdt 627 drivers/watchdog/mei_wdt.c if (!completion_done(&wdt->response)) wdt 628 drivers/watchdog/mei_wdt.c complete(&wdt->response); wdt 630 drivers/watchdog/mei_wdt.c cancel_work_sync(&wdt->unregister); wdt 632 drivers/watchdog/mei_wdt.c mei_wdt_unregister(wdt); wdt 636 drivers/watchdog/mei_wdt.c dbgfs_unregister(wdt); wdt 638 drivers/watchdog/mei_wdt.c kfree(wdt); wdt 33 drivers/watchdog/mena21_wdt.c struct watchdog_device wdt; wdt 53 drivers/watchdog/mena21_wdt.c static int a21_wdt_start(struct watchdog_device *wdt) wdt 55 drivers/watchdog/mena21_wdt.c struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); wdt 62 drivers/watchdog/mena21_wdt.c static int a21_wdt_stop(struct watchdog_device *wdt) wdt 64 drivers/watchdog/mena21_wdt.c struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); wdt 71 drivers/watchdog/mena21_wdt.c static int a21_wdt_ping(struct watchdog_device *wdt) wdt 73 drivers/watchdog/mena21_wdt.c struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); wdt 82 drivers/watchdog/mena21_wdt.c static int a21_wdt_set_timeout(struct watchdog_device *wdt, wdt 85 drivers/watchdog/mena21_wdt.c struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); wdt 88 drivers/watchdog/mena21_wdt.c dev_err(wdt->parent, "Only 1 and 30 allowed as timeout\n"); wdt 92 drivers/watchdog/mena21_wdt.c if (timeout == 30 && wdt->timeout == 1) { wdt 93 drivers/watchdog/mena21_wdt.c dev_err(wdt->parent, wdt 103 drivers/watchdog/mena21_wdt.c wdt->timeout = timeout; wdt 189 drivers/watchdog/mena21_wdt.c drv->wdt = a21_wdt; wdt 34 drivers/watchdog/menf21bmc_wdt.c struct watchdog_device wdt; wdt 47 drivers/watchdog/menf21bmc_wdt.c data->wdt.bootstatus |= WDIOF_CARDRESET; wdt 49 drivers/watchdog/menf21bmc_wdt.c data->wdt.bootstatus |= WDIOF_EXTERN1; wdt 51 drivers/watchdog/menf21bmc_wdt.c data->wdt.bootstatus |= WDIOF_EXTERN2; wdt 53 drivers/watchdog/menf21bmc_wdt.c data->wdt.bootstatus |= WDIOF_POWERUNDER; wdt 58 drivers/watchdog/menf21bmc_wdt.c static int menf21bmc_wdt_start(struct watchdog_device *wdt) wdt 60 drivers/watchdog/menf21bmc_wdt.c struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); wdt 65 drivers/watchdog/menf21bmc_wdt.c static int menf21bmc_wdt_stop(struct watchdog_device *wdt) wdt 67 drivers/watchdog/menf21bmc_wdt.c struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); wdt 74 drivers/watchdog/menf21bmc_wdt.c menf21bmc_wdt_settimeout(struct watchdog_device *wdt, unsigned int timeout) wdt 77 drivers/watchdog/menf21bmc_wdt.c struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); wdt 89 drivers/watchdog/menf21bmc_wdt.c wdt->timeout = timeout; wdt 94 drivers/watchdog/menf21bmc_wdt.c static int menf21bmc_wdt_ping(struct watchdog_device *wdt) wdt 96 drivers/watchdog/menf21bmc_wdt.c struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); wdt 125 drivers/watchdog/menf21bmc_wdt.c drv_data->wdt.ops = &menf21bmc_wdt_ops; wdt 126 drivers/watchdog/menf21bmc_wdt.c drv_data->wdt.info = &menf21bmc_wdt_info; wdt 127 drivers/watchdog/menf21bmc_wdt.c drv_data->wdt.min_timeout = BMC_WD_TIMEOUT_MIN; wdt 128 drivers/watchdog/menf21bmc_wdt.c drv_data->wdt.max_timeout = BMC_WD_TIMEOUT_MAX; wdt 129 drivers/watchdog/menf21bmc_wdt.c drv_data->wdt.parent = dev; wdt 143 drivers/watchdog/menf21bmc_wdt.c watchdog_init_timeout(&drv_data->wdt, bmc_timeout / 10, dev); wdt 144 drivers/watchdog/menf21bmc_wdt.c watchdog_set_nowayout(&drv_data->wdt, nowayout); wdt 145 drivers/watchdog/menf21bmc_wdt.c watchdog_set_drvdata(&drv_data->wdt, drv_data); wdt 154 drivers/watchdog/menf21bmc_wdt.c ret = devm_watchdog_register_device(dev, &drv_data->wdt); wdt 14 drivers/watchdog/menz69_wdt.c struct watchdog_device wdt; wdt 34 drivers/watchdog/menz69_wdt.c static int men_z069_wdt_start(struct watchdog_device *wdt) wdt 36 drivers/watchdog/menz69_wdt.c struct men_z069_drv *drv = watchdog_get_drvdata(wdt); wdt 46 drivers/watchdog/menz69_wdt.c static int men_z069_wdt_stop(struct watchdog_device *wdt) wdt 48 drivers/watchdog/menz69_wdt.c struct men_z069_drv *drv = watchdog_get_drvdata(wdt); wdt 58 drivers/watchdog/menz69_wdt.c static int men_z069_wdt_ping(struct watchdog_device *wdt) wdt 60 drivers/watchdog/menz69_wdt.c struct men_z069_drv *drv = watchdog_get_drvdata(wdt); wdt 71 drivers/watchdog/menz69_wdt.c static int men_z069_wdt_set_timeout(struct watchdog_device *wdt, wdt 74 drivers/watchdog/menz69_wdt.c struct men_z069_drv *drv = watchdog_get_drvdata(wdt); wdt 77 drivers/watchdog/menz69_wdt.c wdt->timeout = timeout; wdt 129 drivers/watchdog/menz69_wdt.c drv->wdt = men_z069_wdt; wdt 130 drivers/watchdog/menz69_wdt.c watchdog_init_timeout(&drv->wdt, 0, &dev->dev); wdt 131 drivers/watchdog/menz69_wdt.c watchdog_set_nowayout(&drv->wdt, nowayout); wdt 132 drivers/watchdog/menz69_wdt.c watchdog_set_drvdata(&drv->wdt, drv); wdt 133 drivers/watchdog/menz69_wdt.c drv->wdt.parent = &dev->dev; wdt 147 drivers/watchdog/menz69_wdt.c watchdog_unregister_device(&drv->wdt); wdt 55 drivers/watchdog/mlx_wdt.c static void mlxreg_wdt_check_card_reset(struct mlxreg_wdt *wdt) wdt 61 drivers/watchdog/mlx_wdt.c if (wdt->reset_idx == -EINVAL) wdt 64 drivers/watchdog/mlx_wdt.c if (!(wdt->wdd.info->options & WDIOF_CARDRESET)) wdt 67 drivers/watchdog/mlx_wdt.c reg_data = &wdt->pdata->data[wdt->reset_idx]; wdt 68 drivers/watchdog/mlx_wdt.c rc = regmap_read(wdt->regmap, reg_data->reg, ®val); wdt 71 drivers/watchdog/mlx_wdt.c wdt->wdd.bootstatus = WDIOF_CARDRESET; wdt 72 drivers/watchdog/mlx_wdt.c dev_info(wdt->wdd.parent, wdt 80 drivers/watchdog/mlx_wdt.c struct mlxreg_wdt *wdt = watchdog_get_drvdata(wdd); wdt 81 drivers/watchdog/mlx_wdt.c struct mlxreg_core_data *reg_data = &wdt->pdata->data[wdt->action_idx]; wdt 83 drivers/watchdog/mlx_wdt.c return regmap_update_bits(wdt->regmap, reg_data->reg, ~reg_data->mask, wdt 89 drivers/watchdog/mlx_wdt.c struct mlxreg_wdt *wdt = watchdog_get_drvdata(wdd); wdt 90 drivers/watchdog/mlx_wdt.c struct mlxreg_core_data *reg_data = &wdt->pdata->data[wdt->action_idx]; wdt 92 drivers/watchdog/mlx_wdt.c return regmap_update_bits(wdt->regmap, reg_data->reg, ~reg_data->mask, wdt 98 drivers/watchdog/mlx_wdt.c struct mlxreg_wdt *wdt = watchdog_get_drvdata(wdd); wdt 99 drivers/watchdog/mlx_wdt.c struct mlxreg_core_data *reg_data = &wdt->pdata->data[wdt->ping_idx]; wdt 101 drivers/watchdog/mlx_wdt.c return regmap_update_bits_base(wdt->regmap, reg_data->reg, wdt 109 drivers/watchdog/mlx_wdt.c struct mlxreg_wdt *wdt = watchdog_get_drvdata(wdd); wdt 110 drivers/watchdog/mlx_wdt.c struct mlxreg_core_data *reg_data = &wdt->pdata->data[wdt->timeout_idx]; wdt 114 drivers/watchdog/mlx_wdt.c if (wdt->wdt_type == MLX_WDT_TYPE1) { wdt 115 drivers/watchdog/mlx_wdt.c rc = regmap_read(wdt->regmap, reg_data->reg, ®val); wdt 129 drivers/watchdog/mlx_wdt.c rc = regmap_write(wdt->regmap, reg_data->reg, regval); wdt 148 drivers/watchdog/mlx_wdt.c struct mlxreg_wdt *wdt = watchdog_get_drvdata(wdd); wdt 149 drivers/watchdog/mlx_wdt.c struct mlxreg_core_data *reg_data = &wdt->pdata->data[wdt->tleft_idx]; wdt 153 drivers/watchdog/mlx_wdt.c rc = regmap_read(wdt->regmap, reg_data->reg, ®val); wdt 187 drivers/watchdog/mlx_wdt.c static void mlxreg_wdt_config(struct mlxreg_wdt *wdt, wdt 193 drivers/watchdog/mlx_wdt.c wdt->reset_idx = -EINVAL; wdt 196 drivers/watchdog/mlx_wdt.c wdt->action_idx = i; wdt 198 drivers/watchdog/mlx_wdt.c wdt->timeout_idx = i; wdt 200 drivers/watchdog/mlx_wdt.c wdt->tleft_idx = i; wdt 202 drivers/watchdog/mlx_wdt.c wdt->ping_idx = i; wdt 204 drivers/watchdog/mlx_wdt.c wdt->reset_idx = i; wdt 207 drivers/watchdog/mlx_wdt.c wdt->pdata = pdata; wdt 210 drivers/watchdog/mlx_wdt.c wdt->wdd.info = &mlxreg_wdt_main_info; wdt 212 drivers/watchdog/mlx_wdt.c wdt->wdd.info = &mlxreg_wdt_aux_info; wdt 214 drivers/watchdog/mlx_wdt.c wdt->wdt_type = pdata->version; wdt 215 drivers/watchdog/mlx_wdt.c if (wdt->wdt_type == MLX_WDT_TYPE2) { wdt 216 drivers/watchdog/mlx_wdt.c wdt->wdd.ops = &mlxreg_wdt_ops_type2; wdt 217 drivers/watchdog/mlx_wdt.c wdt->wdd.max_timeout = MLXREG_WDT_MAX_TIMEOUT_TYPE2; wdt 219 drivers/watchdog/mlx_wdt.c wdt->wdd.ops = &mlxreg_wdt_ops_type1; wdt 220 drivers/watchdog/mlx_wdt.c wdt->wdd.max_timeout = MLXREG_WDT_MAX_TIMEOUT_TYPE1; wdt 222 drivers/watchdog/mlx_wdt.c wdt->wdd.min_timeout = MLXREG_WDT_MIN_TIMEOUT; wdt 225 drivers/watchdog/mlx_wdt.c static int mlxreg_wdt_init_timeout(struct mlxreg_wdt *wdt, wdt 230 drivers/watchdog/mlx_wdt.c timeout = pdata->data[wdt->timeout_idx].health_cntr; wdt 231 drivers/watchdog/mlx_wdt.c return mlxreg_wdt_set_timeout(&wdt->wdd, timeout); wdt 238 drivers/watchdog/mlx_wdt.c struct mlxreg_wdt *wdt; wdt 246 drivers/watchdog/mlx_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 247 drivers/watchdog/mlx_wdt.c if (!wdt) wdt 250 drivers/watchdog/mlx_wdt.c wdt->wdd.parent = dev; wdt 251 drivers/watchdog/mlx_wdt.c wdt->regmap = pdata->regmap; wdt 252 drivers/watchdog/mlx_wdt.c mlxreg_wdt_config(wdt, pdata); wdt 255 drivers/watchdog/mlx_wdt.c watchdog_set_nowayout(&wdt->wdd, WATCHDOG_NOWAYOUT); wdt 256 drivers/watchdog/mlx_wdt.c watchdog_stop_on_reboot(&wdt->wdd); wdt 257 drivers/watchdog/mlx_wdt.c watchdog_stop_on_unregister(&wdt->wdd); wdt 258 drivers/watchdog/mlx_wdt.c watchdog_set_drvdata(&wdt->wdd, wdt); wdt 259 drivers/watchdog/mlx_wdt.c rc = mlxreg_wdt_init_timeout(wdt, pdata); wdt 264 drivers/watchdog/mlx_wdt.c rc = mlxreg_wdt_start(&wdt->wdd); wdt 267 drivers/watchdog/mlx_wdt.c set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); wdt 269 drivers/watchdog/mlx_wdt.c mlxreg_wdt_check_card_reset(wdt); wdt 270 drivers/watchdog/mlx_wdt.c rc = devm_watchdog_register_device(dev, &wdt->wdd); wdt 56 drivers/watchdog/ni903x_wdt.c static void ni903x_start(struct ni903x_wdt *wdt) wdt 58 drivers/watchdog/ni903x_wdt.c u8 control = inb(wdt->io_base + NIWD_CONTROL); wdt 60 drivers/watchdog/ni903x_wdt.c outb(control | NIWD_CONTROL_RESET, wdt->io_base + NIWD_CONTROL); wdt 61 drivers/watchdog/ni903x_wdt.c outb(control | NIWD_CONTROL_PET, wdt->io_base + NIWD_CONTROL); wdt 67 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = watchdog_get_drvdata(wdd); wdt 70 drivers/watchdog/ni903x_wdt.c outb(((0x00FF0000 & counter) >> 16), wdt->io_base + NIWD_SEED2); wdt 71 drivers/watchdog/ni903x_wdt.c outb(((0x0000FF00 & counter) >> 8), wdt->io_base + NIWD_SEED1); wdt 72 drivers/watchdog/ni903x_wdt.c outb((0x000000FF & counter), wdt->io_base + NIWD_SEED0); wdt 81 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = watchdog_get_drvdata(wdd); wdt 85 drivers/watchdog/ni903x_wdt.c control = inb(wdt->io_base + NIWD_CONTROL); wdt 87 drivers/watchdog/ni903x_wdt.c outb(control, wdt->io_base + NIWD_CONTROL); wdt 89 drivers/watchdog/ni903x_wdt.c counter2 = inb(wdt->io_base + NIWD_COUNTER2); wdt 90 drivers/watchdog/ni903x_wdt.c counter1 = inb(wdt->io_base + NIWD_COUNTER1); wdt 91 drivers/watchdog/ni903x_wdt.c counter0 = inb(wdt->io_base + NIWD_COUNTER0); wdt 100 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = watchdog_get_drvdata(wdd); wdt 103 drivers/watchdog/ni903x_wdt.c control = inb(wdt->io_base + NIWD_CONTROL); wdt 104 drivers/watchdog/ni903x_wdt.c outb(control | NIWD_CONTROL_PET, wdt->io_base + NIWD_CONTROL); wdt 111 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = watchdog_get_drvdata(wdd); wdt 114 drivers/watchdog/ni903x_wdt.c wdt->io_base + NIWD_CONTROL); wdt 117 drivers/watchdog/ni903x_wdt.c ni903x_start(wdt); wdt 124 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = watchdog_get_drvdata(wdd); wdt 126 drivers/watchdog/ni903x_wdt.c outb(NIWD_CONTROL_RESET, wdt->io_base + NIWD_CONTROL); wdt 133 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = data; wdt 138 drivers/watchdog/ni903x_wdt.c if (wdt->io_base != 0) { wdt 139 drivers/watchdog/ni903x_wdt.c dev_err(wdt->dev, "too many IO resources\n"); wdt 143 drivers/watchdog/ni903x_wdt.c wdt->io_base = res->data.io.minimum; wdt 147 drivers/watchdog/ni903x_wdt.c dev_err(wdt->dev, "memory region too small\n"); wdt 151 drivers/watchdog/ni903x_wdt.c if (!devm_request_region(wdt->dev, wdt->io_base, io_size, wdt 153 drivers/watchdog/ni903x_wdt.c dev_err(wdt->dev, "failed to get memory region\n"); wdt 184 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt; wdt 188 drivers/watchdog/ni903x_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 189 drivers/watchdog/ni903x_wdt.c if (!wdt) wdt 192 drivers/watchdog/ni903x_wdt.c device->driver_data = wdt; wdt 193 drivers/watchdog/ni903x_wdt.c wdt->dev = dev; wdt 196 drivers/watchdog/ni903x_wdt.c ni903x_resources, wdt); wdt 197 drivers/watchdog/ni903x_wdt.c if (ACPI_FAILURE(status) || wdt->io_base == 0) { wdt 202 drivers/watchdog/ni903x_wdt.c wdd = &wdt->wdd; wdt 209 drivers/watchdog/ni903x_wdt.c watchdog_set_drvdata(wdd, wdt); wdt 219 drivers/watchdog/ni903x_wdt.c wdt->io_base + NIWD_CONTROL); wdt 222 drivers/watchdog/ni903x_wdt.c wdt->io_base, timeout, nowayout); wdt 229 drivers/watchdog/ni903x_wdt.c struct ni903x_wdt *wdt = acpi_driver_data(device); wdt 231 drivers/watchdog/ni903x_wdt.c ni903x_wdd_stop(&wdt->wdd); wdt 232 drivers/watchdog/ni903x_wdt.c watchdog_unregister_device(&wdt->wdd); wdt 89 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); wdt 96 drivers/watchdog/nic7018_wdt.c wdt->io_base + WDT_PRESET_PRESCALE); wdt 99 drivers/watchdog/nic7018_wdt.c wdt->period = config->period; wdt 106 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); wdt 111 drivers/watchdog/nic7018_wdt.c control = inb(wdt->io_base + WDT_RELOAD_CTRL); wdt 112 drivers/watchdog/nic7018_wdt.c outb(control | WDT_RELOAD_PORT_EN, wdt->io_base + WDT_RELOAD_CTRL); wdt 114 drivers/watchdog/nic7018_wdt.c outb(1, wdt->io_base + WDT_RELOAD_PORT); wdt 116 drivers/watchdog/nic7018_wdt.c control = inb(wdt->io_base + WDT_CTRL); wdt 117 drivers/watchdog/nic7018_wdt.c outb(control | WDT_CTRL_RESET_EN, wdt->io_base + WDT_CTRL); wdt 124 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); wdt 126 drivers/watchdog/nic7018_wdt.c outb(0, wdt->io_base + WDT_CTRL); wdt 127 drivers/watchdog/nic7018_wdt.c outb(0, wdt->io_base + WDT_RELOAD_CTRL); wdt 128 drivers/watchdog/nic7018_wdt.c outb(0xF0, wdt->io_base + WDT_PRESET_PRESCALE); wdt 135 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); wdt 137 drivers/watchdog/nic7018_wdt.c outb(1, wdt->io_base + WDT_RELOAD_PORT); wdt 144 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd); wdt 147 drivers/watchdog/nic7018_wdt.c count = inb(wdt->io_base + WDT_COUNT) & 0xF; wdt 151 drivers/watchdog/nic7018_wdt.c return nic7018_timeout(wdt->period, count); wdt 172 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt; wdt 176 drivers/watchdog/nic7018_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 177 drivers/watchdog/nic7018_wdt.c if (!wdt) wdt 180 drivers/watchdog/nic7018_wdt.c platform_set_drvdata(pdev, wdt); wdt 194 drivers/watchdog/nic7018_wdt.c wdt->io_base = io_rc->start; wdt 195 drivers/watchdog/nic7018_wdt.c wdd = &wdt->wdd; wdt 203 drivers/watchdog/nic7018_wdt.c watchdog_set_drvdata(wdd, wdt); wdt 208 drivers/watchdog/nic7018_wdt.c outb(UNLOCK, wdt->io_base + WDT_REG_LOCK); wdt 212 drivers/watchdog/nic7018_wdt.c outb(LOCK, wdt->io_base + WDT_REG_LOCK); wdt 217 drivers/watchdog/nic7018_wdt.c wdt->io_base, timeout, nowayout); wdt 223 drivers/watchdog/nic7018_wdt.c struct nic7018_wdt *wdt = platform_get_drvdata(pdev); wdt 225 drivers/watchdog/nic7018_wdt.c watchdog_unregister_device(&wdt->wdd); wdt 228 drivers/watchdog/nic7018_wdt.c outb(LOCK, wdt->io_base + WDT_REG_LOCK); wdt 55 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt = to_npcm_wdt(wdd); wdt 58 drivers/watchdog/npcm_wdt.c val = readl(wdt->reg); wdt 59 drivers/watchdog/npcm_wdt.c writel(val | NPCM_WTR, wdt->reg); wdt 66 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt = to_npcm_wdt(wdd); wdt 92 drivers/watchdog/npcm_wdt.c writel(val, wdt->reg); wdt 99 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt = to_npcm_wdt(wdd); wdt 101 drivers/watchdog/npcm_wdt.c writel(0, wdt->reg); wdt 139 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt = data; wdt 141 drivers/watchdog/npcm_wdt.c watchdog_notify_pretimeout(&wdt->wdd); wdt 149 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt = to_npcm_wdt(wdd); wdt 151 drivers/watchdog/npcm_wdt.c writel(NPCM_WTR | NPCM_WTRE | NPCM_WTE, wdt->reg); wdt 159 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt = to_npcm_wdt(wdd); wdt 161 drivers/watchdog/npcm_wdt.c return readl(wdt->reg) & NPCM_WTE; wdt 183 drivers/watchdog/npcm_wdt.c struct npcm_wdt *wdt; wdt 187 drivers/watchdog/npcm_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 188 drivers/watchdog/npcm_wdt.c if (!wdt) wdt 191 drivers/watchdog/npcm_wdt.c wdt->reg = devm_platform_ioremap_resource(pdev, 0); wdt 192 drivers/watchdog/npcm_wdt.c if (IS_ERR(wdt->reg)) wdt 193 drivers/watchdog/npcm_wdt.c return PTR_ERR(wdt->reg); wdt 199 drivers/watchdog/npcm_wdt.c wdt->wdd.info = &npcm_wdt_info; wdt 200 drivers/watchdog/npcm_wdt.c wdt->wdd.ops = &npcm_wdt_ops; wdt 201 drivers/watchdog/npcm_wdt.c wdt->wdd.min_timeout = 1; wdt 202 drivers/watchdog/npcm_wdt.c wdt->wdd.max_timeout = 2750; wdt 203 drivers/watchdog/npcm_wdt.c wdt->wdd.parent = dev; wdt 205 drivers/watchdog/npcm_wdt.c wdt->wdd.timeout = 86; wdt 206 drivers/watchdog/npcm_wdt.c watchdog_init_timeout(&wdt->wdd, 0, dev); wdt 209 drivers/watchdog/npcm_wdt.c npcm_wdt_set_timeout(&wdt->wdd, wdt->wdd.timeout); wdt 211 drivers/watchdog/npcm_wdt.c if (npcm_is_running(&wdt->wdd)) { wdt 213 drivers/watchdog/npcm_wdt.c npcm_wdt_start(&wdt->wdd); wdt 214 drivers/watchdog/npcm_wdt.c set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); wdt 218 drivers/watchdog/npcm_wdt.c wdt); wdt 222 drivers/watchdog/npcm_wdt.c ret = devm_watchdog_register_device(dev, &wdt->wdd); wdt 72 drivers/watchdog/orion_wdt.c struct watchdog_device wdt; wdt 191 drivers/watchdog/orion_wdt.c if (dev->wdt.info->options & WDIOF_PRETIMEOUT) wdt 206 drivers/watchdog/orion_wdt.c if (dev->wdt.info->options & WDIOF_PRETIMEOUT) wdt 215 drivers/watchdog/orion_wdt.c if (dev->wdt.info->options & WDIOF_PRETIMEOUT) wdt 394 drivers/watchdog/orion_wdt.c watchdog_notify_pretimeout(&dev->wdt); wdt 568 drivers/watchdog/orion_wdt.c dev->wdt.info = &orion_wdt_info; wdt 569 drivers/watchdog/orion_wdt.c dev->wdt.ops = &orion_wdt_ops; wdt 570 drivers/watchdog/orion_wdt.c dev->wdt.min_timeout = 1; wdt 585 drivers/watchdog/orion_wdt.c dev->wdt.timeout = wdt_max_duration; wdt 586 drivers/watchdog/orion_wdt.c dev->wdt.max_timeout = wdt_max_duration; wdt 587 drivers/watchdog/orion_wdt.c dev->wdt.parent = &pdev->dev; wdt 588 drivers/watchdog/orion_wdt.c watchdog_init_timeout(&dev->wdt, heartbeat, &pdev->dev); wdt 590 drivers/watchdog/orion_wdt.c platform_set_drvdata(pdev, &dev->wdt); wdt 591 drivers/watchdog/orion_wdt.c watchdog_set_drvdata(&dev->wdt, dev); wdt 599 drivers/watchdog/orion_wdt.c if (!orion_wdt_enabled(&dev->wdt)) wdt 600 drivers/watchdog/orion_wdt.c orion_wdt_stop(&dev->wdt); wdt 602 drivers/watchdog/orion_wdt.c set_bit(WDOG_HW_RUNNING, &dev->wdt.status); wdt 632 drivers/watchdog/orion_wdt.c watchdog_set_nowayout(&dev->wdt, nowayout); wdt 633 drivers/watchdog/orion_wdt.c ret = watchdog_register_device(&dev->wdt); wdt 638 drivers/watchdog/orion_wdt.c dev->wdt.timeout, nowayout ? ", nowayout" : ""); wdt 45 drivers/watchdog/pic32-wdt.c static inline bool pic32_wdt_is_win_enabled(struct pic32_wdt *wdt) wdt 47 drivers/watchdog/pic32-wdt.c return !!(readl(wdt->regs + WDTCON_REG) & WDTCON_WIN_EN); wdt 50 drivers/watchdog/pic32-wdt.c static inline u32 pic32_wdt_get_post_scaler(struct pic32_wdt *wdt) wdt 52 drivers/watchdog/pic32-wdt.c u32 v = readl(wdt->regs + WDTCON_REG); wdt 57 drivers/watchdog/pic32-wdt.c static inline u32 pic32_wdt_get_clk_id(struct pic32_wdt *wdt) wdt 59 drivers/watchdog/pic32-wdt.c u32 v = readl(wdt->regs + WDTCON_REG); wdt 64 drivers/watchdog/pic32-wdt.c static int pic32_wdt_bootstatus(struct pic32_wdt *wdt) wdt 66 drivers/watchdog/pic32-wdt.c u32 v = readl(wdt->rst_base); wdt 68 drivers/watchdog/pic32-wdt.c writel(RESETCON_WDT_TIMEOUT, PIC32_CLR(wdt->rst_base)); wdt 73 drivers/watchdog/pic32-wdt.c static u32 pic32_wdt_get_timeout_secs(struct pic32_wdt *wdt, struct device *dev) wdt 78 drivers/watchdog/pic32-wdt.c rate = clk_get_rate(wdt->clk); wdt 81 drivers/watchdog/pic32-wdt.c pic32_wdt_get_clk_id(wdt), rate); wdt 89 drivers/watchdog/pic32-wdt.c ps = pic32_wdt_get_post_scaler(wdt); wdt 101 drivers/watchdog/pic32-wdt.c static void pic32_wdt_keepalive(struct pic32_wdt *wdt) wdt 104 drivers/watchdog/pic32-wdt.c writew(WDTCON_CLR_KEY, wdt->regs + WDTCON_REG + 2); wdt 109 drivers/watchdog/pic32-wdt.c struct pic32_wdt *wdt = watchdog_get_drvdata(wdd); wdt 111 drivers/watchdog/pic32-wdt.c writel(WDTCON_ON, PIC32_SET(wdt->regs + WDTCON_REG)); wdt 112 drivers/watchdog/pic32-wdt.c pic32_wdt_keepalive(wdt); wdt 119 drivers/watchdog/pic32-wdt.c struct pic32_wdt *wdt = watchdog_get_drvdata(wdd); wdt 121 drivers/watchdog/pic32-wdt.c writel(WDTCON_ON, PIC32_CLR(wdt->regs + WDTCON_REG)); wdt 134 drivers/watchdog/pic32-wdt.c struct pic32_wdt *wdt = watchdog_get_drvdata(wdd); wdt 136 drivers/watchdog/pic32-wdt.c pic32_wdt_keepalive(wdt); wdt 175 drivers/watchdog/pic32-wdt.c struct pic32_wdt *wdt; wdt 177 drivers/watchdog/pic32-wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 178 drivers/watchdog/pic32-wdt.c if (!wdt) wdt 181 drivers/watchdog/pic32-wdt.c wdt->regs = devm_platform_ioremap_resource(pdev, 0); wdt 182 drivers/watchdog/pic32-wdt.c if (IS_ERR(wdt->regs)) wdt 183 drivers/watchdog/pic32-wdt.c return PTR_ERR(wdt->regs); wdt 185 drivers/watchdog/pic32-wdt.c wdt->rst_base = devm_ioremap(dev, PIC32_BASE_RESET, 0x10); wdt 186 drivers/watchdog/pic32-wdt.c if (!wdt->rst_base) wdt 189 drivers/watchdog/pic32-wdt.c wdt->clk = devm_clk_get(dev, NULL); wdt 190 drivers/watchdog/pic32-wdt.c if (IS_ERR(wdt->clk)) { wdt 192 drivers/watchdog/pic32-wdt.c return PTR_ERR(wdt->clk); wdt 195 drivers/watchdog/pic32-wdt.c ret = clk_prepare_enable(wdt->clk); wdt 201 drivers/watchdog/pic32-wdt.c wdt->clk); wdt 205 drivers/watchdog/pic32-wdt.c if (pic32_wdt_is_win_enabled(wdt)) { wdt 210 drivers/watchdog/pic32-wdt.c wdd->timeout = pic32_wdt_get_timeout_secs(wdt, dev); wdt 218 drivers/watchdog/pic32-wdt.c wdd->bootstatus = pic32_wdt_bootstatus(wdt) ? WDIOF_CARDRESET : 0; wdt 221 drivers/watchdog/pic32-wdt.c watchdog_set_drvdata(wdd, wdt); wdt 41 drivers/watchdog/pm8916_wdt.c struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); wdt 43 drivers/watchdog/pm8916_wdt.c return regmap_update_bits(wdt->regmap, wdt 44 drivers/watchdog/pm8916_wdt.c wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL2, wdt 50 drivers/watchdog/pm8916_wdt.c struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); wdt 52 drivers/watchdog/pm8916_wdt.c return regmap_update_bits(wdt->regmap, wdt 53 drivers/watchdog/pm8916_wdt.c wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL2, wdt 59 drivers/watchdog/pm8916_wdt.c struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); wdt 61 drivers/watchdog/pm8916_wdt.c return regmap_update_bits(wdt->regmap, wdt 62 drivers/watchdog/pm8916_wdt.c wdt->baseaddr + PON_PMIC_WD_RESET_PET, wdt 68 drivers/watchdog/pm8916_wdt.c struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); wdt 71 drivers/watchdog/pm8916_wdt.c err = regmap_write(wdt->regmap, wdt 72 drivers/watchdog/pm8916_wdt.c wdt->baseaddr + PON_PMIC_WD_RESET_S1_TIMER, wdt 77 drivers/watchdog/pm8916_wdt.c return regmap_write(wdt->regmap, wdt 78 drivers/watchdog/pm8916_wdt.c wdt->baseaddr + PON_PMIC_WD_RESET_S2_TIMER, wdt 100 drivers/watchdog/pm8916_wdt.c struct pm8916_wdt *wdt = arg; wdt 103 drivers/watchdog/pm8916_wdt.c err = regmap_read(wdt->regmap, wdt->baseaddr + PON_INT_RT_STS, &sts); wdt 108 drivers/watchdog/pm8916_wdt.c watchdog_notify_pretimeout(&wdt->wdev); wdt 136 drivers/watchdog/pm8916_wdt.c struct pm8916_wdt *wdt; wdt 140 drivers/watchdog/pm8916_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 141 drivers/watchdog/pm8916_wdt.c if (!wdt) wdt 152 drivers/watchdog/pm8916_wdt.c wdt->regmap = dev_get_regmap(parent->parent, NULL); wdt 153 drivers/watchdog/pm8916_wdt.c if (!wdt->regmap) { wdt 158 drivers/watchdog/pm8916_wdt.c err = device_property_read_u32(parent, "reg", &wdt->baseaddr); wdt 167 drivers/watchdog/pm8916_wdt.c "pm8916_wdt", wdt); wdt 171 drivers/watchdog/pm8916_wdt.c wdt->wdev.info = &pm8916_wdt_pt_ident; wdt 176 drivers/watchdog/pm8916_wdt.c wdt->wdev.info = &pm8916_wdt_ident; wdt 180 drivers/watchdog/pm8916_wdt.c err = regmap_write(wdt->regmap, wdt 181 drivers/watchdog/pm8916_wdt.c wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL, wdt 188 drivers/watchdog/pm8916_wdt.c wdt->wdev.ops = &pm8916_wdt_ops, wdt 189 drivers/watchdog/pm8916_wdt.c wdt->wdev.parent = dev; wdt 190 drivers/watchdog/pm8916_wdt.c wdt->wdev.min_timeout = PM8916_WDT_MIN_TIMEOUT; wdt 191 drivers/watchdog/pm8916_wdt.c wdt->wdev.max_timeout = PM8916_WDT_MAX_TIMEOUT; wdt 192 drivers/watchdog/pm8916_wdt.c wdt->wdev.timeout = PM8916_WDT_DEFAULT_TIMEOUT; wdt 193 drivers/watchdog/pm8916_wdt.c wdt->wdev.pretimeout = 0; wdt 194 drivers/watchdog/pm8916_wdt.c watchdog_set_drvdata(&wdt->wdev, wdt); wdt 196 drivers/watchdog/pm8916_wdt.c watchdog_init_timeout(&wdt->wdev, 0, dev); wdt 197 drivers/watchdog/pm8916_wdt.c pm8916_wdt_configure_timers(&wdt->wdev); wdt 199 drivers/watchdog/pm8916_wdt.c return devm_watchdog_register_device(dev, &wdt->wdev); wdt 50 drivers/watchdog/qcom-wdt.c static void __iomem *wdt_addr(struct qcom_wdt *wdt, enum wdt_reg reg) wdt 52 drivers/watchdog/qcom-wdt.c return wdt->base + wdt->layout[reg]; wdt 82 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt = to_qcom_wdt(wdd); wdt 85 drivers/watchdog/qcom-wdt.c writel(0, wdt_addr(wdt, WDT_EN)); wdt 86 drivers/watchdog/qcom-wdt.c writel(1, wdt_addr(wdt, WDT_RST)); wdt 87 drivers/watchdog/qcom-wdt.c writel(bark * wdt->rate, wdt_addr(wdt, WDT_BARK_TIME)); wdt 88 drivers/watchdog/qcom-wdt.c writel(wdd->timeout * wdt->rate, wdt_addr(wdt, WDT_BITE_TIME)); wdt 89 drivers/watchdog/qcom-wdt.c writel(qcom_get_enable(wdd), wdt_addr(wdt, WDT_EN)); wdt 95 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt = to_qcom_wdt(wdd); wdt 97 drivers/watchdog/qcom-wdt.c writel(0, wdt_addr(wdt, WDT_EN)); wdt 103 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt = to_qcom_wdt(wdd); wdt 105 drivers/watchdog/qcom-wdt.c writel(1, wdt_addr(wdt, WDT_RST)); wdt 126 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt = to_qcom_wdt(wdd); wdt 133 drivers/watchdog/qcom-wdt.c timeout = 128 * wdt->rate / 1000; wdt 135 drivers/watchdog/qcom-wdt.c writel(0, wdt_addr(wdt, WDT_EN)); wdt 136 drivers/watchdog/qcom-wdt.c writel(1, wdt_addr(wdt, WDT_RST)); wdt 137 drivers/watchdog/qcom-wdt.c writel(timeout, wdt_addr(wdt, WDT_BARK_TIME)); wdt 138 drivers/watchdog/qcom-wdt.c writel(timeout, wdt_addr(wdt, WDT_BITE_TIME)); wdt 139 drivers/watchdog/qcom-wdt.c writel(QCOM_WDT_ENABLE, wdt_addr(wdt, WDT_EN)); wdt 185 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt; wdt 199 drivers/watchdog/qcom-wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 200 drivers/watchdog/qcom-wdt.c if (!wdt) wdt 214 drivers/watchdog/qcom-wdt.c wdt->base = devm_ioremap_resource(dev, res); wdt 215 drivers/watchdog/qcom-wdt.c if (IS_ERR(wdt->base)) wdt 216 drivers/watchdog/qcom-wdt.c return PTR_ERR(wdt->base); wdt 241 drivers/watchdog/qcom-wdt.c wdt->rate = clk_get_rate(clk); wdt 242 drivers/watchdog/qcom-wdt.c if (wdt->rate == 0 || wdt 243 drivers/watchdog/qcom-wdt.c wdt->rate > 0x10000000U) { wdt 253 drivers/watchdog/qcom-wdt.c "wdt_bark", &wdt->wdd); wdt 257 drivers/watchdog/qcom-wdt.c wdt->wdd.info = &qcom_wdt_pt_info; wdt 258 drivers/watchdog/qcom-wdt.c wdt->wdd.pretimeout = 1; wdt 263 drivers/watchdog/qcom-wdt.c wdt->wdd.info = &qcom_wdt_info; wdt 266 drivers/watchdog/qcom-wdt.c wdt->wdd.ops = &qcom_wdt_ops; wdt 267 drivers/watchdog/qcom-wdt.c wdt->wdd.min_timeout = 1; wdt 268 drivers/watchdog/qcom-wdt.c wdt->wdd.max_timeout = 0x10000000U / wdt->rate; wdt 269 drivers/watchdog/qcom-wdt.c wdt->wdd.parent = dev; wdt 270 drivers/watchdog/qcom-wdt.c wdt->layout = regs; wdt 272 drivers/watchdog/qcom-wdt.c if (readl(wdt_addr(wdt, WDT_STS)) & 1) wdt 273 drivers/watchdog/qcom-wdt.c wdt->wdd.bootstatus = WDIOF_CARDRESET; wdt 280 drivers/watchdog/qcom-wdt.c wdt->wdd.timeout = min(wdt->wdd.max_timeout, 30U); wdt 281 drivers/watchdog/qcom-wdt.c watchdog_init_timeout(&wdt->wdd, 0, dev); wdt 283 drivers/watchdog/qcom-wdt.c ret = devm_watchdog_register_device(dev, &wdt->wdd); wdt 287 drivers/watchdog/qcom-wdt.c platform_set_drvdata(pdev, wdt); wdt 293 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt = dev_get_drvdata(dev); wdt 295 drivers/watchdog/qcom-wdt.c if (watchdog_active(&wdt->wdd)) wdt 296 drivers/watchdog/qcom-wdt.c qcom_wdt_stop(&wdt->wdd); wdt 303 drivers/watchdog/qcom-wdt.c struct qcom_wdt *wdt = dev_get_drvdata(dev); wdt 305 drivers/watchdog/qcom-wdt.c if (watchdog_active(&wdt->wdd)) wdt 306 drivers/watchdog/qcom-wdt.c qcom_wdt_start(&wdt->wdd); wdt 50 drivers/watchdog/rn5t618_wdt.c struct rn5t618_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 61 drivers/watchdog/rn5t618_wdt.c ret = regmap_update_bits(wdt->rn5t618->regmap, RN5T618_WATCHDOG, wdt 72 drivers/watchdog/rn5t618_wdt.c struct rn5t618_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 80 drivers/watchdog/rn5t618_wdt.c ret = regmap_update_bits(wdt->rn5t618->regmap, RN5T618_REPCNT, wdt 87 drivers/watchdog/rn5t618_wdt.c ret = regmap_update_bits(wdt->rn5t618->regmap, RN5T618_WATCHDOG, wdt 94 drivers/watchdog/rn5t618_wdt.c return regmap_update_bits(wdt->rn5t618->regmap, RN5T618_PWRIREN, wdt 101 drivers/watchdog/rn5t618_wdt.c struct rn5t618_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 103 drivers/watchdog/rn5t618_wdt.c return regmap_update_bits(wdt->rn5t618->regmap, RN5T618_WATCHDOG, wdt 109 drivers/watchdog/rn5t618_wdt.c struct rn5t618_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 114 drivers/watchdog/rn5t618_wdt.c ret = regmap_read(wdt->rn5t618->regmap, RN5T618_WATCHDOG, &val); wdt 118 drivers/watchdog/rn5t618_wdt.c ret = regmap_write(wdt->rn5t618->regmap, RN5T618_WATCHDOG, val); wdt 123 drivers/watchdog/rn5t618_wdt.c return regmap_update_bits(wdt->rn5t618->regmap, RN5T618_PWRIRQ, wdt 145 drivers/watchdog/rn5t618_wdt.c struct rn5t618_wdt *wdt; wdt 148 drivers/watchdog/rn5t618_wdt.c wdt = devm_kzalloc(dev, sizeof(struct rn5t618_wdt), GFP_KERNEL); wdt 149 drivers/watchdog/rn5t618_wdt.c if (!wdt) wdt 155 drivers/watchdog/rn5t618_wdt.c wdt->rn5t618 = rn5t618; wdt 156 drivers/watchdog/rn5t618_wdt.c wdt->wdt_dev.info = &rn5t618_wdt_info; wdt 157 drivers/watchdog/rn5t618_wdt.c wdt->wdt_dev.ops = &rn5t618_wdt_ops; wdt 158 drivers/watchdog/rn5t618_wdt.c wdt->wdt_dev.min_timeout = min_timeout; wdt 159 drivers/watchdog/rn5t618_wdt.c wdt->wdt_dev.max_timeout = max_timeout; wdt 160 drivers/watchdog/rn5t618_wdt.c wdt->wdt_dev.timeout = max_timeout; wdt 161 drivers/watchdog/rn5t618_wdt.c wdt->wdt_dev.parent = dev; wdt 163 drivers/watchdog/rn5t618_wdt.c watchdog_set_drvdata(&wdt->wdt_dev, wdt); wdt 164 drivers/watchdog/rn5t618_wdt.c watchdog_init_timeout(&wdt->wdt_dev, timeout, dev); wdt 165 drivers/watchdog/rn5t618_wdt.c watchdog_set_nowayout(&wdt->wdt_dev, nowayout); wdt 167 drivers/watchdog/rn5t618_wdt.c platform_set_drvdata(pdev, wdt); wdt 169 drivers/watchdog/rn5t618_wdt.c return watchdog_register_device(&wdt->wdt_dev); wdt 174 drivers/watchdog/rn5t618_wdt.c struct rn5t618_wdt *wdt = platform_get_drvdata(pdev); wdt 176 drivers/watchdog/rn5t618_wdt.c watchdog_unregister_device(&wdt->wdt_dev); wdt 203 drivers/watchdog/s3c2410_wdt.c static int s3c2410wdt_mask_and_disable_reset(struct s3c2410_wdt *wdt, bool mask) wdt 206 drivers/watchdog/s3c2410_wdt.c u32 mask_val = 1 << wdt->drv_data->mask_bit; wdt 210 drivers/watchdog/s3c2410_wdt.c if (!(wdt->drv_data->quirks & QUIRK_HAS_PMU_CONFIG)) wdt 216 drivers/watchdog/s3c2410_wdt.c ret = regmap_update_bits(wdt->pmureg, wdt 217 drivers/watchdog/s3c2410_wdt.c wdt->drv_data->disable_reg, wdt 222 drivers/watchdog/s3c2410_wdt.c ret = regmap_update_bits(wdt->pmureg, wdt 223 drivers/watchdog/s3c2410_wdt.c wdt->drv_data->mask_reset_reg, wdt 227 drivers/watchdog/s3c2410_wdt.c dev_err(wdt->dev, "failed to update reg(%d)\n", ret); wdt 234 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd); wdt 236 drivers/watchdog/s3c2410_wdt.c spin_lock(&wdt->lock); wdt 237 drivers/watchdog/s3c2410_wdt.c writel(wdt->count, wdt->reg_base + S3C2410_WTCNT); wdt 238 drivers/watchdog/s3c2410_wdt.c spin_unlock(&wdt->lock); wdt 243 drivers/watchdog/s3c2410_wdt.c static void __s3c2410wdt_stop(struct s3c2410_wdt *wdt) wdt 247 drivers/watchdog/s3c2410_wdt.c wtcon = readl(wdt->reg_base + S3C2410_WTCON); wdt 249 drivers/watchdog/s3c2410_wdt.c writel(wtcon, wdt->reg_base + S3C2410_WTCON); wdt 254 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd); wdt 256 drivers/watchdog/s3c2410_wdt.c spin_lock(&wdt->lock); wdt 257 drivers/watchdog/s3c2410_wdt.c __s3c2410wdt_stop(wdt); wdt 258 drivers/watchdog/s3c2410_wdt.c spin_unlock(&wdt->lock); wdt 266 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd); wdt 268 drivers/watchdog/s3c2410_wdt.c spin_lock(&wdt->lock); wdt 270 drivers/watchdog/s3c2410_wdt.c __s3c2410wdt_stop(wdt); wdt 272 drivers/watchdog/s3c2410_wdt.c wtcon = readl(wdt->reg_base + S3C2410_WTCON); wdt 283 drivers/watchdog/s3c2410_wdt.c dev_dbg(wdt->dev, "Starting watchdog: count=0x%08x, wtcon=%08lx\n", wdt 284 drivers/watchdog/s3c2410_wdt.c wdt->count, wtcon); wdt 286 drivers/watchdog/s3c2410_wdt.c writel(wdt->count, wdt->reg_base + S3C2410_WTDAT); wdt 287 drivers/watchdog/s3c2410_wdt.c writel(wdt->count, wdt->reg_base + S3C2410_WTCNT); wdt 288 drivers/watchdog/s3c2410_wdt.c writel(wtcon, wdt->reg_base + S3C2410_WTCON); wdt 289 drivers/watchdog/s3c2410_wdt.c spin_unlock(&wdt->lock); wdt 294 drivers/watchdog/s3c2410_wdt.c static inline int s3c2410wdt_is_running(struct s3c2410_wdt *wdt) wdt 296 drivers/watchdog/s3c2410_wdt.c return readl(wdt->reg_base + S3C2410_WTCON) & S3C2410_WTCON_ENABLE; wdt 302 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd); wdt 303 drivers/watchdog/s3c2410_wdt.c unsigned long freq = clk_get_rate(wdt->clock); wdt 314 drivers/watchdog/s3c2410_wdt.c dev_dbg(wdt->dev, "Heartbeat: count=%d, timeout=%d, freq=%lu\n", wdt 326 drivers/watchdog/s3c2410_wdt.c dev_err(wdt->dev, "timeout %d too big\n", timeout); wdt 331 drivers/watchdog/s3c2410_wdt.c dev_dbg(wdt->dev, "Heartbeat: timeout=%d, divisor=%d, count=%d (%08x)\n", wdt 335 drivers/watchdog/s3c2410_wdt.c wdt->count = count; wdt 338 drivers/watchdog/s3c2410_wdt.c wtcon = readl(wdt->reg_base + S3C2410_WTCON); wdt 342 drivers/watchdog/s3c2410_wdt.c writel(count, wdt->reg_base + S3C2410_WTDAT); wdt 343 drivers/watchdog/s3c2410_wdt.c writel(wtcon, wdt->reg_base + S3C2410_WTCON); wdt 353 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd); wdt 354 drivers/watchdog/s3c2410_wdt.c void __iomem *wdt_base = wdt->reg_base; wdt 401 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = platform_get_drvdata(param); wdt 403 drivers/watchdog/s3c2410_wdt.c dev_info(wdt->dev, "watchdog timer expired (irq)\n"); wdt 405 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_keepalive(&wdt->wdt_device); wdt 407 drivers/watchdog/s3c2410_wdt.c if (wdt->drv_data->quirks & QUIRK_HAS_WTCLRINT_REG) wdt 408 drivers/watchdog/s3c2410_wdt.c writel(0x1, wdt->reg_base + S3C2410_WTCLRINT); wdt 419 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = freq_to_wdt(nb); wdt 421 drivers/watchdog/s3c2410_wdt.c if (!s3c2410wdt_is_running(wdt)) wdt 430 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_keepalive(&wdt->wdt_device); wdt 432 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_stop(&wdt->wdt_device); wdt 434 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_set_heartbeat(&wdt->wdt_device, wdt 435 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.timeout); wdt 438 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_start(&wdt->wdt_device); wdt 447 drivers/watchdog/s3c2410_wdt.c dev_err(wdt->dev, "cannot set new value for timeout %d\n", wdt 448 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.timeout); wdt 452 drivers/watchdog/s3c2410_wdt.c static inline int s3c2410wdt_cpufreq_register(struct s3c2410_wdt *wdt) wdt 454 drivers/watchdog/s3c2410_wdt.c wdt->freq_transition.notifier_call = s3c2410wdt_cpufreq_transition; wdt 456 drivers/watchdog/s3c2410_wdt.c return cpufreq_register_notifier(&wdt->freq_transition, wdt 460 drivers/watchdog/s3c2410_wdt.c static inline void s3c2410wdt_cpufreq_deregister(struct s3c2410_wdt *wdt) wdt 462 drivers/watchdog/s3c2410_wdt.c wdt->freq_transition.notifier_call = s3c2410wdt_cpufreq_transition; wdt 464 drivers/watchdog/s3c2410_wdt.c cpufreq_unregister_notifier(&wdt->freq_transition, wdt 470 drivers/watchdog/s3c2410_wdt.c static inline int s3c2410wdt_cpufreq_register(struct s3c2410_wdt *wdt) wdt 475 drivers/watchdog/s3c2410_wdt.c static inline void s3c2410wdt_cpufreq_deregister(struct s3c2410_wdt *wdt) wdt 480 drivers/watchdog/s3c2410_wdt.c static inline unsigned int s3c2410wdt_get_bootstatus(struct s3c2410_wdt *wdt) wdt 485 drivers/watchdog/s3c2410_wdt.c if (!(wdt->drv_data->quirks & QUIRK_HAS_RST_STAT)) wdt 488 drivers/watchdog/s3c2410_wdt.c ret = regmap_read(wdt->pmureg, wdt->drv_data->rst_stat_reg, &rst_stat); wdt 490 drivers/watchdog/s3c2410_wdt.c dev_warn(wdt->dev, "Couldn't get RST_STAT register\n"); wdt 491 drivers/watchdog/s3c2410_wdt.c else if (rst_stat & BIT(wdt->drv_data->rst_stat_bit)) wdt 515 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt; wdt 521 drivers/watchdog/s3c2410_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 522 drivers/watchdog/s3c2410_wdt.c if (!wdt) wdt 525 drivers/watchdog/s3c2410_wdt.c wdt->dev = dev; wdt 526 drivers/watchdog/s3c2410_wdt.c spin_lock_init(&wdt->lock); wdt 527 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device = s3c2410_wdd; wdt 529 drivers/watchdog/s3c2410_wdt.c wdt->drv_data = s3c2410_get_wdt_drv_data(pdev); wdt 530 drivers/watchdog/s3c2410_wdt.c if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { wdt 531 drivers/watchdog/s3c2410_wdt.c wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, wdt 533 drivers/watchdog/s3c2410_wdt.c if (IS_ERR(wdt->pmureg)) { wdt 535 drivers/watchdog/s3c2410_wdt.c return PTR_ERR(wdt->pmureg); wdt 547 drivers/watchdog/s3c2410_wdt.c wdt->reg_base = devm_platform_ioremap_resource(pdev, 0); wdt 548 drivers/watchdog/s3c2410_wdt.c if (IS_ERR(wdt->reg_base)) { wdt 549 drivers/watchdog/s3c2410_wdt.c ret = PTR_ERR(wdt->reg_base); wdt 553 drivers/watchdog/s3c2410_wdt.c wdt->clock = devm_clk_get(dev, "watchdog"); wdt 554 drivers/watchdog/s3c2410_wdt.c if (IS_ERR(wdt->clock)) { wdt 556 drivers/watchdog/s3c2410_wdt.c ret = PTR_ERR(wdt->clock); wdt 560 drivers/watchdog/s3c2410_wdt.c ret = clk_prepare_enable(wdt->clock); wdt 566 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.min_timeout = 1; wdt 567 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.max_timeout = s3c2410wdt_max_timeout(wdt->clock); wdt 569 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_cpufreq_register(wdt); wdt 575 drivers/watchdog/s3c2410_wdt.c watchdog_set_drvdata(&wdt->wdt_device, wdt); wdt 580 drivers/watchdog/s3c2410_wdt.c watchdog_init_timeout(&wdt->wdt_device, tmr_margin, dev); wdt 581 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_set_heartbeat(&wdt->wdt_device, wdt 582 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.timeout); wdt 584 drivers/watchdog/s3c2410_wdt.c started = s3c2410wdt_set_heartbeat(&wdt->wdt_device, wdt 602 drivers/watchdog/s3c2410_wdt.c watchdog_set_nowayout(&wdt->wdt_device, nowayout); wdt 603 drivers/watchdog/s3c2410_wdt.c watchdog_set_restart_priority(&wdt->wdt_device, 128); wdt 605 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.bootstatus = s3c2410wdt_get_bootstatus(wdt); wdt 606 drivers/watchdog/s3c2410_wdt.c wdt->wdt_device.parent = dev; wdt 608 drivers/watchdog/s3c2410_wdt.c ret = watchdog_register_device(&wdt->wdt_device); wdt 612 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_mask_and_disable_reset(wdt, false); wdt 618 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_start(&wdt->wdt_device); wdt 624 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_stop(&wdt->wdt_device); wdt 627 drivers/watchdog/s3c2410_wdt.c platform_set_drvdata(pdev, wdt); wdt 631 drivers/watchdog/s3c2410_wdt.c wtcon = readl(wdt->reg_base + S3C2410_WTCON); wdt 641 drivers/watchdog/s3c2410_wdt.c watchdog_unregister_device(&wdt->wdt_device); wdt 644 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_cpufreq_deregister(wdt); wdt 647 drivers/watchdog/s3c2410_wdt.c clk_disable_unprepare(wdt->clock); wdt 656 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = platform_get_drvdata(dev); wdt 658 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_mask_and_disable_reset(wdt, true); wdt 662 drivers/watchdog/s3c2410_wdt.c watchdog_unregister_device(&wdt->wdt_device); wdt 664 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_cpufreq_deregister(wdt); wdt 666 drivers/watchdog/s3c2410_wdt.c clk_disable_unprepare(wdt->clock); wdt 673 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = platform_get_drvdata(dev); wdt 675 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_mask_and_disable_reset(wdt, true); wdt 677 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_stop(&wdt->wdt_device); wdt 685 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = dev_get_drvdata(dev); wdt 688 drivers/watchdog/s3c2410_wdt.c wdt->wtcon_save = readl(wdt->reg_base + S3C2410_WTCON); wdt 689 drivers/watchdog/s3c2410_wdt.c wdt->wtdat_save = readl(wdt->reg_base + S3C2410_WTDAT); wdt 691 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_mask_and_disable_reset(wdt, true); wdt 696 drivers/watchdog/s3c2410_wdt.c s3c2410wdt_stop(&wdt->wdt_device); wdt 704 drivers/watchdog/s3c2410_wdt.c struct s3c2410_wdt *wdt = dev_get_drvdata(dev); wdt 707 drivers/watchdog/s3c2410_wdt.c writel(wdt->wtdat_save, wdt->reg_base + S3C2410_WTDAT); wdt 708 drivers/watchdog/s3c2410_wdt.c writel(wdt->wtdat_save, wdt->reg_base + S3C2410_WTCNT);/* Reset count */ wdt 709 drivers/watchdog/s3c2410_wdt.c writel(wdt->wtcon_save, wdt->reg_base + S3C2410_WTCON); wdt 711 drivers/watchdog/s3c2410_wdt.c ret = s3c2410wdt_mask_and_disable_reset(wdt, false); wdt 716 drivers/watchdog/s3c2410_wdt.c (wdt->wtcon_save & S3C2410_WTCON_ENABLE) ? "en" : "dis"); wdt 48 drivers/watchdog/sama5d4_wdt.c #define wdt_enabled (!(wdt->mr & AT91_WDT_WDDIS)) wdt 50 drivers/watchdog/sama5d4_wdt.c #define wdt_read(wdt, field) \ wdt 51 drivers/watchdog/sama5d4_wdt.c readl_relaxed((wdt)->reg_base + (field)) wdt 56 drivers/watchdog/sama5d4_wdt.c static void wdt_write(struct sama5d4_wdt *wdt, u32 field, u32 val) wdt 63 drivers/watchdog/sama5d4_wdt.c while (time_before(jiffies, wdt->last_ping + WDT_DELAY)) wdt 65 drivers/watchdog/sama5d4_wdt.c writel_relaxed(val, wdt->reg_base + field); wdt 66 drivers/watchdog/sama5d4_wdt.c wdt->last_ping = jiffies; wdt 69 drivers/watchdog/sama5d4_wdt.c static void wdt_write_nosleep(struct sama5d4_wdt *wdt, u32 field, u32 val) wdt 71 drivers/watchdog/sama5d4_wdt.c if (time_before(jiffies, wdt->last_ping + WDT_DELAY)) wdt 73 drivers/watchdog/sama5d4_wdt.c writel_relaxed(val, wdt->reg_base + field); wdt 74 drivers/watchdog/sama5d4_wdt.c wdt->last_ping = jiffies; wdt 79 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); wdt 81 drivers/watchdog/sama5d4_wdt.c wdt->mr &= ~AT91_WDT_WDDIS; wdt 82 drivers/watchdog/sama5d4_wdt.c wdt_write(wdt, AT91_WDT_MR, wdt->mr); wdt 89 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); wdt 91 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_WDDIS; wdt 92 drivers/watchdog/sama5d4_wdt.c wdt_write(wdt, AT91_WDT_MR, wdt->mr); wdt 99 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); wdt 101 drivers/watchdog/sama5d4_wdt.c wdt_write(wdt, AT91_WDT_CR, AT91_WDT_KEY | AT91_WDT_WDRSTT); wdt 109 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); wdt 112 drivers/watchdog/sama5d4_wdt.c wdt->mr &= ~AT91_WDT_WDV; wdt 113 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_SET_WDV(value); wdt 123 drivers/watchdog/sama5d4_wdt.c wdt_write(wdt, AT91_WDT_MR, wdt->mr & ~AT91_WDT_WDDIS); wdt 145 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = platform_get_drvdata(dev_id); wdt 147 drivers/watchdog/sama5d4_wdt.c if (wdt_read(wdt, AT91_WDT_SR)) { wdt 156 drivers/watchdog/sama5d4_wdt.c static int of_sama5d4_wdt_init(struct device_node *np, struct sama5d4_wdt *wdt) wdt 160 drivers/watchdog/sama5d4_wdt.c wdt->mr = AT91_WDT_WDDIS; wdt 164 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_WDFIEN; wdt 166 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_WDRSTEN; wdt 169 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_WDIDLEHLT; wdt 172 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_WDDBGHLT; wdt 177 drivers/watchdog/sama5d4_wdt.c static int sama5d4_wdt_init(struct sama5d4_wdt *wdt) wdt 187 drivers/watchdog/sama5d4_wdt.c wdt_write_nosleep(wdt, AT91_WDT_MR, wdt->mr); wdt 189 drivers/watchdog/sama5d4_wdt.c reg = wdt_read(wdt, AT91_WDT_MR); wdt 191 drivers/watchdog/sama5d4_wdt.c wdt_write_nosleep(wdt, AT91_WDT_MR, wdt 201 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt; wdt 207 drivers/watchdog/sama5d4_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 208 drivers/watchdog/sama5d4_wdt.c if (!wdt) wdt 211 drivers/watchdog/sama5d4_wdt.c wdd = &wdt->wdd; wdt 217 drivers/watchdog/sama5d4_wdt.c wdt->last_ping = jiffies; wdt 219 drivers/watchdog/sama5d4_wdt.c watchdog_set_drvdata(wdd, wdt); wdt 225 drivers/watchdog/sama5d4_wdt.c wdt->reg_base = regs; wdt 231 drivers/watchdog/sama5d4_wdt.c ret = of_sama5d4_wdt_init(dev->of_node, wdt); wdt 235 drivers/watchdog/sama5d4_wdt.c if ((wdt->mr & AT91_WDT_WDFIEN) && irq) { wdt 249 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_SET_WDD(WDT_SEC2TICKS(MAX_WDT_TIMEOUT)); wdt 250 drivers/watchdog/sama5d4_wdt.c wdt->mr |= AT91_WDT_SET_WDV(timeout); wdt 252 drivers/watchdog/sama5d4_wdt.c ret = sama5d4_wdt_init(wdt); wdt 263 drivers/watchdog/sama5d4_wdt.c platform_set_drvdata(pdev, wdt); wdt 280 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = dev_get_drvdata(dev); wdt 282 drivers/watchdog/sama5d4_wdt.c if (watchdog_active(&wdt->wdd)) wdt 283 drivers/watchdog/sama5d4_wdt.c sama5d4_wdt_stop(&wdt->wdd); wdt 290 drivers/watchdog/sama5d4_wdt.c struct sama5d4_wdt *wdt = dev_get_drvdata(dev); wdt 297 drivers/watchdog/sama5d4_wdt.c sama5d4_wdt_init(wdt); wdt 299 drivers/watchdog/sama5d4_wdt.c if (watchdog_active(&wdt->wdd)) wdt 300 drivers/watchdog/sama5d4_wdt.c sama5d4_wdt_start(&wdt->wdd); wdt 83 drivers/watchdog/shwdt.c struct sh_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 87 drivers/watchdog/shwdt.c pm_runtime_get_sync(wdt->dev); wdt 88 drivers/watchdog/shwdt.c clk_enable(wdt->clk); wdt 90 drivers/watchdog/shwdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 93 drivers/watchdog/shwdt.c mod_timer(&wdt->timer, next_ping_period(clock_division_ratio)); wdt 119 drivers/watchdog/shwdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 126 drivers/watchdog/shwdt.c struct sh_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 130 drivers/watchdog/shwdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 132 drivers/watchdog/shwdt.c del_timer(&wdt->timer); wdt 138 drivers/watchdog/shwdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 140 drivers/watchdog/shwdt.c clk_disable(wdt->clk); wdt 141 drivers/watchdog/shwdt.c pm_runtime_put_sync(wdt->dev); wdt 148 drivers/watchdog/shwdt.c struct sh_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 151 drivers/watchdog/shwdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 153 drivers/watchdog/shwdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 160 drivers/watchdog/shwdt.c struct sh_wdt *wdt = watchdog_get_drvdata(wdt_dev); wdt 166 drivers/watchdog/shwdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 169 drivers/watchdog/shwdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 176 drivers/watchdog/shwdt.c struct sh_wdt *wdt = from_timer(wdt, t, timer); wdt 179 drivers/watchdog/shwdt.c spin_lock_irqsave(&wdt->lock, flags); wdt 189 drivers/watchdog/shwdt.c mod_timer(&wdt->timer, next_ping_period(clock_division_ratio)); wdt 191 drivers/watchdog/shwdt.c dev_warn(wdt->dev, "Heartbeat lost! Will not ping " wdt 193 drivers/watchdog/shwdt.c spin_unlock_irqrestore(&wdt->lock, flags); wdt 218 drivers/watchdog/shwdt.c struct sh_wdt *wdt; wdt 228 drivers/watchdog/shwdt.c wdt = devm_kzalloc(&pdev->dev, sizeof(struct sh_wdt), GFP_KERNEL); wdt 229 drivers/watchdog/shwdt.c if (unlikely(!wdt)) wdt 232 drivers/watchdog/shwdt.c wdt->dev = &pdev->dev; wdt 234 drivers/watchdog/shwdt.c wdt->clk = devm_clk_get(&pdev->dev, NULL); wdt 235 drivers/watchdog/shwdt.c if (IS_ERR(wdt->clk)) { wdt 240 drivers/watchdog/shwdt.c wdt->clk = NULL; wdt 243 drivers/watchdog/shwdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 244 drivers/watchdog/shwdt.c if (IS_ERR(wdt->base)) wdt 245 drivers/watchdog/shwdt.c return PTR_ERR(wdt->base); wdt 248 drivers/watchdog/shwdt.c watchdog_set_drvdata(&sh_wdt_dev, wdt); wdt 251 drivers/watchdog/shwdt.c spin_lock_init(&wdt->lock); wdt 272 drivers/watchdog/shwdt.c timer_setup(&wdt->timer, sh_wdt_ping, 0); wdt 273 drivers/watchdog/shwdt.c wdt->timer.expires = next_ping_period(clock_division_ratio); wdt 84 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); wdt 85 drivers/watchdog/sp805_wdt.c u32 wdtcontrol = readl_relaxed(wdt->base + WDTCONTROL); wdt 93 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); wdt 96 drivers/watchdog/sp805_wdt.c rate = wdt->rate; wdt 109 drivers/watchdog/sp805_wdt.c spin_lock(&wdt->lock); wdt 110 drivers/watchdog/sp805_wdt.c wdt->load_val = load; wdt 113 drivers/watchdog/sp805_wdt.c spin_unlock(&wdt->lock); wdt 121 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); wdt 124 drivers/watchdog/sp805_wdt.c spin_lock(&wdt->lock); wdt 125 drivers/watchdog/sp805_wdt.c load = readl_relaxed(wdt->base + WDTVALUE); wdt 128 drivers/watchdog/sp805_wdt.c if (!(readl_relaxed(wdt->base + WDTRIS) & INT_MASK)) wdt 129 drivers/watchdog/sp805_wdt.c load += wdt->load_val + 1; wdt 130 drivers/watchdog/sp805_wdt.c spin_unlock(&wdt->lock); wdt 132 drivers/watchdog/sp805_wdt.c return div_u64(load, wdt->rate); wdt 138 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); wdt 140 drivers/watchdog/sp805_wdt.c writel_relaxed(UNLOCK, wdt->base + WDTLOCK); wdt 141 drivers/watchdog/sp805_wdt.c writel_relaxed(0, wdt->base + WDTCONTROL); wdt 142 drivers/watchdog/sp805_wdt.c writel_relaxed(0, wdt->base + WDTLOAD); wdt 143 drivers/watchdog/sp805_wdt.c writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base + WDTCONTROL); wdt 146 drivers/watchdog/sp805_wdt.c readl_relaxed(wdt->base + WDTLOCK); wdt 153 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); wdt 158 drivers/watchdog/sp805_wdt.c ret = clk_prepare_enable(wdt->clk); wdt 160 drivers/watchdog/sp805_wdt.c dev_err(&wdt->adev->dev, "clock enable fail"); wdt 165 drivers/watchdog/sp805_wdt.c spin_lock(&wdt->lock); wdt 167 drivers/watchdog/sp805_wdt.c writel_relaxed(UNLOCK, wdt->base + WDTLOCK); wdt 168 drivers/watchdog/sp805_wdt.c writel_relaxed(wdt->load_val, wdt->base + WDTLOAD); wdt 169 drivers/watchdog/sp805_wdt.c writel_relaxed(INT_MASK, wdt->base + WDTINTCLR); wdt 172 drivers/watchdog/sp805_wdt.c writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base + wdt 175 drivers/watchdog/sp805_wdt.c writel_relaxed(LOCK, wdt->base + WDTLOCK); wdt 178 drivers/watchdog/sp805_wdt.c readl_relaxed(wdt->base + WDTLOCK); wdt 179 drivers/watchdog/sp805_wdt.c spin_unlock(&wdt->lock); wdt 198 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); wdt 200 drivers/watchdog/sp805_wdt.c spin_lock(&wdt->lock); wdt 202 drivers/watchdog/sp805_wdt.c writel_relaxed(UNLOCK, wdt->base + WDTLOCK); wdt 203 drivers/watchdog/sp805_wdt.c writel_relaxed(0, wdt->base + WDTCONTROL); wdt 204 drivers/watchdog/sp805_wdt.c writel_relaxed(LOCK, wdt->base + WDTLOCK); wdt 207 drivers/watchdog/sp805_wdt.c readl_relaxed(wdt->base + WDTLOCK); wdt 208 drivers/watchdog/sp805_wdt.c spin_unlock(&wdt->lock); wdt 210 drivers/watchdog/sp805_wdt.c clk_disable_unprepare(wdt->clk); wdt 233 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt; wdt 236 drivers/watchdog/sp805_wdt.c wdt = devm_kzalloc(&adev->dev, sizeof(*wdt), GFP_KERNEL); wdt 237 drivers/watchdog/sp805_wdt.c if (!wdt) { wdt 242 drivers/watchdog/sp805_wdt.c wdt->base = devm_ioremap_resource(&adev->dev, &adev->res); wdt 243 drivers/watchdog/sp805_wdt.c if (IS_ERR(wdt->base)) wdt 244 drivers/watchdog/sp805_wdt.c return PTR_ERR(wdt->base); wdt 247 drivers/watchdog/sp805_wdt.c wdt->clk = devm_clk_get(&adev->dev, NULL); wdt 248 drivers/watchdog/sp805_wdt.c if (IS_ERR(wdt->clk)) { wdt 250 drivers/watchdog/sp805_wdt.c return PTR_ERR(wdt->clk); wdt 252 drivers/watchdog/sp805_wdt.c wdt->rate = clk_get_rate(wdt->clk); wdt 260 drivers/watchdog/sp805_wdt.c &wdt->rate); wdt 261 drivers/watchdog/sp805_wdt.c if (!wdt->rate) { wdt 267 drivers/watchdog/sp805_wdt.c wdt->adev = adev; wdt 268 drivers/watchdog/sp805_wdt.c wdt->wdd.info = &wdt_info; wdt 269 drivers/watchdog/sp805_wdt.c wdt->wdd.ops = &wdt_ops; wdt 270 drivers/watchdog/sp805_wdt.c wdt->wdd.parent = &adev->dev; wdt 272 drivers/watchdog/sp805_wdt.c spin_lock_init(&wdt->lock); wdt 273 drivers/watchdog/sp805_wdt.c watchdog_set_nowayout(&wdt->wdd, nowayout); wdt 274 drivers/watchdog/sp805_wdt.c watchdog_set_drvdata(&wdt->wdd, wdt); wdt 275 drivers/watchdog/sp805_wdt.c watchdog_set_restart_priority(&wdt->wdd, 128); wdt 281 drivers/watchdog/sp805_wdt.c wdt->wdd.timeout = DEFAULT_TIMEOUT; wdt 282 drivers/watchdog/sp805_wdt.c watchdog_init_timeout(&wdt->wdd, 0, &adev->dev); wdt 283 drivers/watchdog/sp805_wdt.c wdt_setload(&wdt->wdd, wdt->wdd.timeout); wdt 289 drivers/watchdog/sp805_wdt.c if (wdt_is_running(&wdt->wdd)) { wdt 290 drivers/watchdog/sp805_wdt.c wdt_enable(&wdt->wdd); wdt 291 drivers/watchdog/sp805_wdt.c set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); wdt 294 drivers/watchdog/sp805_wdt.c ret = watchdog_register_device(&wdt->wdd); wdt 297 drivers/watchdog/sp805_wdt.c amba_set_drvdata(adev, wdt); wdt 309 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = amba_get_drvdata(adev); wdt 311 drivers/watchdog/sp805_wdt.c watchdog_unregister_device(&wdt->wdd); wdt 312 drivers/watchdog/sp805_wdt.c watchdog_set_drvdata(&wdt->wdd, NULL); wdt 319 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = dev_get_drvdata(dev); wdt 321 drivers/watchdog/sp805_wdt.c if (watchdog_active(&wdt->wdd)) wdt 322 drivers/watchdog/sp805_wdt.c return wdt_disable(&wdt->wdd); wdt 329 drivers/watchdog/sp805_wdt.c struct sp805_wdt *wdt = dev_get_drvdata(dev); wdt 331 drivers/watchdog/sp805_wdt.c if (watchdog_active(&wdt->wdd)) wdt 332 drivers/watchdog/sp805_wdt.c return wdt_enable(&wdt->wdd); wdt 83 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = (struct sprd_wdt *)dev_id; wdt 85 drivers/watchdog/sprd_wdt.c sprd_wdt_unlock(wdt->base); wdt 86 drivers/watchdog/sprd_wdt.c writel_relaxed(SPRD_WDT_INT_CLEAR_BIT, wdt->base + SPRD_WDT_INT_CLR); wdt 87 drivers/watchdog/sprd_wdt.c sprd_wdt_lock(wdt->base); wdt 88 drivers/watchdog/sprd_wdt.c watchdog_notify_pretimeout(&wdt->wdd); wdt 92 drivers/watchdog/sprd_wdt.c static u32 sprd_wdt_get_cnt_value(struct sprd_wdt *wdt) wdt 96 drivers/watchdog/sprd_wdt.c val = readl_relaxed(wdt->base + SPRD_WDT_CNT_HIGH) << wdt 98 drivers/watchdog/sprd_wdt.c val |= readl_relaxed(wdt->base + SPRD_WDT_CNT_LOW) & wdt 104 drivers/watchdog/sprd_wdt.c static int sprd_wdt_load_value(struct sprd_wdt *wdt, u32 timeout, wdt 111 drivers/watchdog/sprd_wdt.c sprd_wdt_unlock(wdt->base); wdt 113 drivers/watchdog/sprd_wdt.c SPRD_WDT_LOW_VALUE_MASK, wdt->base + SPRD_WDT_LOAD_HIGH); wdt 115 drivers/watchdog/sprd_wdt.c wdt->base + SPRD_WDT_LOAD_LOW); wdt 118 drivers/watchdog/sprd_wdt.c wdt->base + SPRD_WDT_IRQ_LOAD_HIGH); wdt 120 drivers/watchdog/sprd_wdt.c wdt->base + SPRD_WDT_IRQ_LOAD_LOW); wdt 121 drivers/watchdog/sprd_wdt.c sprd_wdt_lock(wdt->base); wdt 128 drivers/watchdog/sprd_wdt.c val = readl_relaxed(wdt->base + SPRD_WDT_INT_RAW); wdt 140 drivers/watchdog/sprd_wdt.c static int sprd_wdt_enable(struct sprd_wdt *wdt) wdt 145 drivers/watchdog/sprd_wdt.c ret = clk_prepare_enable(wdt->enable); wdt 148 drivers/watchdog/sprd_wdt.c ret = clk_prepare_enable(wdt->rtc_enable); wdt 150 drivers/watchdog/sprd_wdt.c clk_disable_unprepare(wdt->enable); wdt 154 drivers/watchdog/sprd_wdt.c sprd_wdt_unlock(wdt->base); wdt 155 drivers/watchdog/sprd_wdt.c val = readl_relaxed(wdt->base + SPRD_WDT_CTRL); wdt 157 drivers/watchdog/sprd_wdt.c writel_relaxed(val, wdt->base + SPRD_WDT_CTRL); wdt 158 drivers/watchdog/sprd_wdt.c sprd_wdt_lock(wdt->base); wdt 164 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = _data; wdt 166 drivers/watchdog/sprd_wdt.c sprd_wdt_unlock(wdt->base); wdt 167 drivers/watchdog/sprd_wdt.c writel_relaxed(0x0, wdt->base + SPRD_WDT_CTRL); wdt 168 drivers/watchdog/sprd_wdt.c sprd_wdt_lock(wdt->base); wdt 170 drivers/watchdog/sprd_wdt.c clk_disable_unprepare(wdt->rtc_enable); wdt 171 drivers/watchdog/sprd_wdt.c clk_disable_unprepare(wdt->enable); wdt 176 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = to_sprd_wdt(wdd); wdt 180 drivers/watchdog/sprd_wdt.c ret = sprd_wdt_load_value(wdt, wdd->timeout, wdd->pretimeout); wdt 184 drivers/watchdog/sprd_wdt.c sprd_wdt_unlock(wdt->base); wdt 185 drivers/watchdog/sprd_wdt.c val = readl_relaxed(wdt->base + SPRD_WDT_CTRL); wdt 187 drivers/watchdog/sprd_wdt.c writel_relaxed(val, wdt->base + SPRD_WDT_CTRL); wdt 188 drivers/watchdog/sprd_wdt.c sprd_wdt_lock(wdt->base); wdt 196 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = to_sprd_wdt(wdd); wdt 199 drivers/watchdog/sprd_wdt.c sprd_wdt_unlock(wdt->base); wdt 200 drivers/watchdog/sprd_wdt.c val = readl_relaxed(wdt->base + SPRD_WDT_CTRL); wdt 203 drivers/watchdog/sprd_wdt.c writel_relaxed(val, wdt->base + SPRD_WDT_CTRL); wdt 204 drivers/watchdog/sprd_wdt.c sprd_wdt_lock(wdt->base); wdt 211 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = to_sprd_wdt(wdd); wdt 218 drivers/watchdog/sprd_wdt.c return sprd_wdt_load_value(wdt, timeout, wdd->pretimeout); wdt 224 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = to_sprd_wdt(wdd); wdt 231 drivers/watchdog/sprd_wdt.c return sprd_wdt_load_value(wdt, wdd->timeout, new_pretimeout); wdt 236 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = to_sprd_wdt(wdd); wdt 239 drivers/watchdog/sprd_wdt.c val = sprd_wdt_get_cnt_value(wdt); wdt 263 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt; wdt 266 drivers/watchdog/sprd_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 267 drivers/watchdog/sprd_wdt.c if (!wdt) wdt 270 drivers/watchdog/sprd_wdt.c wdt->base = devm_platform_ioremap_resource(pdev, 0); wdt 271 drivers/watchdog/sprd_wdt.c if (IS_ERR(wdt->base)) wdt 272 drivers/watchdog/sprd_wdt.c return PTR_ERR(wdt->base); wdt 274 drivers/watchdog/sprd_wdt.c wdt->enable = devm_clk_get(dev, "enable"); wdt 275 drivers/watchdog/sprd_wdt.c if (IS_ERR(wdt->enable)) { wdt 277 drivers/watchdog/sprd_wdt.c return PTR_ERR(wdt->enable); wdt 280 drivers/watchdog/sprd_wdt.c wdt->rtc_enable = devm_clk_get(dev, "rtc_enable"); wdt 281 drivers/watchdog/sprd_wdt.c if (IS_ERR(wdt->rtc_enable)) { wdt 283 drivers/watchdog/sprd_wdt.c return PTR_ERR(wdt->rtc_enable); wdt 286 drivers/watchdog/sprd_wdt.c wdt->irq = platform_get_irq(pdev, 0); wdt 287 drivers/watchdog/sprd_wdt.c if (wdt->irq < 0) wdt 288 drivers/watchdog/sprd_wdt.c return wdt->irq; wdt 290 drivers/watchdog/sprd_wdt.c ret = devm_request_irq(dev, wdt->irq, sprd_wdt_isr, IRQF_NO_SUSPEND, wdt 291 drivers/watchdog/sprd_wdt.c "sprd-wdt", (void *)wdt); wdt 297 drivers/watchdog/sprd_wdt.c wdt->wdd.info = &sprd_wdt_info; wdt 298 drivers/watchdog/sprd_wdt.c wdt->wdd.ops = &sprd_wdt_ops; wdt 299 drivers/watchdog/sprd_wdt.c wdt->wdd.parent = dev; wdt 300 drivers/watchdog/sprd_wdt.c wdt->wdd.min_timeout = SPRD_WDT_MIN_TIMEOUT; wdt 301 drivers/watchdog/sprd_wdt.c wdt->wdd.max_timeout = SPRD_WDT_MAX_TIMEOUT; wdt 302 drivers/watchdog/sprd_wdt.c wdt->wdd.timeout = SPRD_WDT_MAX_TIMEOUT; wdt 304 drivers/watchdog/sprd_wdt.c ret = sprd_wdt_enable(wdt); wdt 309 drivers/watchdog/sprd_wdt.c ret = devm_add_action_or_reset(dev, sprd_wdt_disable, wdt); wdt 315 drivers/watchdog/sprd_wdt.c watchdog_set_nowayout(&wdt->wdd, WATCHDOG_NOWAYOUT); wdt 316 drivers/watchdog/sprd_wdt.c watchdog_init_timeout(&wdt->wdd, 0, dev); wdt 318 drivers/watchdog/sprd_wdt.c ret = devm_watchdog_register_device(dev, &wdt->wdd); wdt 320 drivers/watchdog/sprd_wdt.c sprd_wdt_disable(wdt); wdt 323 drivers/watchdog/sprd_wdt.c platform_set_drvdata(pdev, wdt); wdt 330 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = dev_get_drvdata(dev); wdt 332 drivers/watchdog/sprd_wdt.c if (watchdog_active(&wdt->wdd)) wdt 333 drivers/watchdog/sprd_wdt.c sprd_wdt_stop(&wdt->wdd); wdt 334 drivers/watchdog/sprd_wdt.c sprd_wdt_disable(wdt); wdt 341 drivers/watchdog/sprd_wdt.c struct sprd_wdt *wdt = dev_get_drvdata(dev); wdt 344 drivers/watchdog/sprd_wdt.c ret = sprd_wdt_enable(wdt); wdt 348 drivers/watchdog/sprd_wdt.c if (watchdog_active(&wdt->wdd)) { wdt 349 drivers/watchdog/sprd_wdt.c ret = sprd_wdt_start(&wdt->wdd); wdt 351 drivers/watchdog/sprd_wdt.c sprd_wdt_disable(wdt); wdt 89 drivers/watchdog/stm32_iwdg.c struct stm32_iwdg *wdt = watchdog_get_drvdata(wdd); wdt 98 drivers/watchdog/stm32_iwdg.c presc = DIV_ROUND_UP(tout * wdt->rate, RLR_MAX + 1); wdt 103 drivers/watchdog/stm32_iwdg.c iwdg_rlr = ((tout * wdt->rate) / presc) - 1; wdt 106 drivers/watchdog/stm32_iwdg.c reg_write(wdt->regs, IWDG_KR, KR_KEY_EWA); wdt 109 drivers/watchdog/stm32_iwdg.c reg_write(wdt->regs, IWDG_PR, iwdg_pr); wdt 110 drivers/watchdog/stm32_iwdg.c reg_write(wdt->regs, IWDG_RLR, iwdg_rlr); wdt 111 drivers/watchdog/stm32_iwdg.c reg_write(wdt->regs, IWDG_KR, KR_KEY_ENABLE); wdt 114 drivers/watchdog/stm32_iwdg.c ret = readl_relaxed_poll_timeout(wdt->regs + IWDG_SR, iwdg_sr, wdt 123 drivers/watchdog/stm32_iwdg.c reg_write(wdt->regs, IWDG_KR, KR_KEY_RELOAD); wdt 130 drivers/watchdog/stm32_iwdg.c struct stm32_iwdg *wdt = watchdog_get_drvdata(wdd); wdt 135 drivers/watchdog/stm32_iwdg.c reg_write(wdt->regs, IWDG_KR, KR_KEY_RELOAD); wdt 159 drivers/watchdog/stm32_iwdg.c struct stm32_iwdg *wdt) wdt 164 drivers/watchdog/stm32_iwdg.c wdt->clk_lsi = devm_clk_get(dev, "lsi"); wdt 165 drivers/watchdog/stm32_iwdg.c if (IS_ERR(wdt->clk_lsi)) { wdt 167 drivers/watchdog/stm32_iwdg.c return PTR_ERR(wdt->clk_lsi); wdt 171 drivers/watchdog/stm32_iwdg.c if (wdt->data->has_pclk) { wdt 172 drivers/watchdog/stm32_iwdg.c wdt->clk_pclk = devm_clk_get(dev, "pclk"); wdt 173 drivers/watchdog/stm32_iwdg.c if (IS_ERR(wdt->clk_pclk)) { wdt 175 drivers/watchdog/stm32_iwdg.c return PTR_ERR(wdt->clk_pclk); wdt 178 drivers/watchdog/stm32_iwdg.c ret = clk_prepare_enable(wdt->clk_pclk); wdt 185 drivers/watchdog/stm32_iwdg.c wdt->clk_pclk); wdt 190 drivers/watchdog/stm32_iwdg.c ret = clk_prepare_enable(wdt->clk_lsi); wdt 196 drivers/watchdog/stm32_iwdg.c wdt->clk_lsi); wdt 200 drivers/watchdog/stm32_iwdg.c wdt->rate = clk_get_rate(wdt->clk_lsi); wdt 230 drivers/watchdog/stm32_iwdg.c struct stm32_iwdg *wdt; wdt 233 drivers/watchdog/stm32_iwdg.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 234 drivers/watchdog/stm32_iwdg.c if (!wdt) wdt 237 drivers/watchdog/stm32_iwdg.c wdt->data = of_device_get_match_data(&pdev->dev); wdt 238 drivers/watchdog/stm32_iwdg.c if (!wdt->data) wdt 242 drivers/watchdog/stm32_iwdg.c wdt->regs = devm_platform_ioremap_resource(pdev, 0); wdt 243 drivers/watchdog/stm32_iwdg.c if (IS_ERR(wdt->regs)) { wdt 245 drivers/watchdog/stm32_iwdg.c return PTR_ERR(wdt->regs); wdt 248 drivers/watchdog/stm32_iwdg.c ret = stm32_iwdg_clk_init(pdev, wdt); wdt 253 drivers/watchdog/stm32_iwdg.c wdd = &wdt->wdd; wdt 257 drivers/watchdog/stm32_iwdg.c wdd->min_timeout = DIV_ROUND_UP((RLR_MIN + 1) * PR_MIN, wdt->rate); wdt 258 drivers/watchdog/stm32_iwdg.c wdd->max_hw_heartbeat_ms = ((RLR_MAX + 1) * wdt->data->max_prescaler * wdt 259 drivers/watchdog/stm32_iwdg.c 1000) / wdt->rate; wdt 261 drivers/watchdog/stm32_iwdg.c watchdog_set_drvdata(wdd, wdt); wdt 287 drivers/watchdog/stm32_iwdg.c platform_set_drvdata(pdev, wdt); wdt 37 drivers/watchdog/stpmic1_wdt.c struct stpmic1_wdt *wdt = watchdog_get_drvdata(wdd); wdt 39 drivers/watchdog/stpmic1_wdt.c return regmap_update_bits(wdt->pmic->regmap, wdt 45 drivers/watchdog/stpmic1_wdt.c struct stpmic1_wdt *wdt = watchdog_get_drvdata(wdd); wdt 47 drivers/watchdog/stpmic1_wdt.c return regmap_update_bits(wdt->pmic->regmap, wdt 53 drivers/watchdog/stpmic1_wdt.c struct stpmic1_wdt *wdt = watchdog_get_drvdata(wdd); wdt 55 drivers/watchdog/stpmic1_wdt.c return regmap_update_bits(wdt->pmic->regmap, wdt 62 drivers/watchdog/stpmic1_wdt.c struct stpmic1_wdt *wdt = watchdog_get_drvdata(wdd); wdt 66 drivers/watchdog/stpmic1_wdt.c return regmap_write(wdt->pmic->regmap, WCHDG_TIMER_CR, timeout - 1); wdt 87 drivers/watchdog/stpmic1_wdt.c struct stpmic1_wdt *wdt; wdt 96 drivers/watchdog/stpmic1_wdt.c wdt = devm_kzalloc(dev, sizeof(struct stpmic1_wdt), GFP_KERNEL); wdt 97 drivers/watchdog/stpmic1_wdt.c if (!wdt) wdt 100 drivers/watchdog/stpmic1_wdt.c wdt->pmic = pmic; wdt 102 drivers/watchdog/stpmic1_wdt.c wdt->wdtdev.info = &pmic_watchdog_info; wdt 103 drivers/watchdog/stpmic1_wdt.c wdt->wdtdev.ops = &pmic_watchdog_ops; wdt 104 drivers/watchdog/stpmic1_wdt.c wdt->wdtdev.min_timeout = PMIC_WDT_MIN_TIMEOUT; wdt 105 drivers/watchdog/stpmic1_wdt.c wdt->wdtdev.max_timeout = PMIC_WDT_MAX_TIMEOUT; wdt 106 drivers/watchdog/stpmic1_wdt.c wdt->wdtdev.parent = dev; wdt 108 drivers/watchdog/stpmic1_wdt.c wdt->wdtdev.timeout = PMIC_WDT_DEFAULT_TIMEOUT; wdt 109 drivers/watchdog/stpmic1_wdt.c watchdog_init_timeout(&wdt->wdtdev, 0, dev); wdt 111 drivers/watchdog/stpmic1_wdt.c watchdog_set_nowayout(&wdt->wdtdev, nowayout); wdt 112 drivers/watchdog/stpmic1_wdt.c watchdog_set_drvdata(&wdt->wdtdev, wdt); wdt 114 drivers/watchdog/stpmic1_wdt.c ret = devm_watchdog_register_device(dev, &wdt->wdtdev); wdt 118 drivers/watchdog/stpmic1_wdt.c dev_dbg(wdt->pmic->dev, "PMIC Watchdog driver probed\n"); wdt 41 drivers/watchdog/tangox_wdt.c struct watchdog_device wdt; wdt 47 drivers/watchdog/tangox_wdt.c static int tangox_wdt_set_timeout(struct watchdog_device *wdt, wdt 50 drivers/watchdog/tangox_wdt.c wdt->timeout = new_timeout; wdt 55 drivers/watchdog/tangox_wdt.c static int tangox_wdt_start(struct watchdog_device *wdt) wdt 57 drivers/watchdog/tangox_wdt.c struct tangox_wdt_device *dev = watchdog_get_drvdata(wdt); wdt 60 drivers/watchdog/tangox_wdt.c ticks = 1 + wdt->timeout * dev->clk_rate; wdt 66 drivers/watchdog/tangox_wdt.c static int tangox_wdt_stop(struct watchdog_device *wdt) wdt 68 drivers/watchdog/tangox_wdt.c struct tangox_wdt_device *dev = watchdog_get_drvdata(wdt); wdt 75 drivers/watchdog/tangox_wdt.c static unsigned int tangox_wdt_get_timeleft(struct watchdog_device *wdt) wdt 77 drivers/watchdog/tangox_wdt.c struct tangox_wdt_device *dev = watchdog_get_drvdata(wdt); wdt 93 drivers/watchdog/tangox_wdt.c static int tangox_wdt_restart(struct watchdog_device *wdt, wdt 96 drivers/watchdog/tangox_wdt.c struct tangox_wdt_device *dev = watchdog_get_drvdata(wdt); wdt 146 drivers/watchdog/tangox_wdt.c dev->wdt.parent = &pdev->dev; wdt 147 drivers/watchdog/tangox_wdt.c dev->wdt.info = &tangox_wdt_info; wdt 148 drivers/watchdog/tangox_wdt.c dev->wdt.ops = &tangox_wdt_ops; wdt 149 drivers/watchdog/tangox_wdt.c dev->wdt.timeout = DEFAULT_TIMEOUT; wdt 150 drivers/watchdog/tangox_wdt.c dev->wdt.min_timeout = 1; wdt 151 drivers/watchdog/tangox_wdt.c dev->wdt.max_hw_heartbeat_ms = (U32_MAX - 1) / dev->clk_rate; wdt 153 drivers/watchdog/tangox_wdt.c watchdog_init_timeout(&dev->wdt, timeout, &pdev->dev); wdt 154 drivers/watchdog/tangox_wdt.c watchdog_set_nowayout(&dev->wdt, nowayout); wdt 155 drivers/watchdog/tangox_wdt.c watchdog_set_drvdata(&dev->wdt, dev); wdt 172 drivers/watchdog/tangox_wdt.c set_bit(WDOG_HW_RUNNING, &dev->wdt.status); wdt 173 drivers/watchdog/tangox_wdt.c tangox_wdt_start(&dev->wdt); wdt 176 drivers/watchdog/tangox_wdt.c watchdog_set_restart_priority(&dev->wdt, 128); wdt 178 drivers/watchdog/tangox_wdt.c watchdog_stop_on_unregister(&dev->wdt); wdt 179 drivers/watchdog/tangox_wdt.c err = devm_watchdog_register_device(&pdev->dev, &dev->wdt); wdt 80 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); wdt 91 drivers/watchdog/tegra_wdt.c writel(val, wdt->tmr_regs + TIMER_PTV); wdt 103 drivers/watchdog/tegra_wdt.c writel(val, wdt->wdt_regs + WDT_CFG); wdt 105 drivers/watchdog/tegra_wdt.c writel(WDT_CMD_START_COUNTER, wdt->wdt_regs + WDT_CMD); wdt 112 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); wdt 114 drivers/watchdog/tegra_wdt.c writel(WDT_UNLOCK_PATTERN, wdt->wdt_regs + WDT_UNLOCK); wdt 115 drivers/watchdog/tegra_wdt.c writel(WDT_CMD_DISABLE_COUNTER, wdt->wdt_regs + WDT_CMD); wdt 116 drivers/watchdog/tegra_wdt.c writel(0, wdt->tmr_regs + TIMER_PTV); wdt 123 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); wdt 125 drivers/watchdog/tegra_wdt.c writel(WDT_CMD_START_COUNTER, wdt->wdt_regs + WDT_CMD); wdt 145 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); wdt 150 drivers/watchdog/tegra_wdt.c val = readl(wdt->wdt_regs + WDT_STS); wdt 186 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt; wdt 199 drivers/watchdog/tegra_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 200 drivers/watchdog/tegra_wdt.c if (!wdt) wdt 204 drivers/watchdog/tegra_wdt.c wdt->wdt_regs = regs + WDT_BASE; wdt 205 drivers/watchdog/tegra_wdt.c wdt->tmr_regs = regs + WDT_TIMER_BASE; wdt 208 drivers/watchdog/tegra_wdt.c wdd = &wdt->wdd; wdt 216 drivers/watchdog/tegra_wdt.c watchdog_set_drvdata(wdd, wdt); wdt 225 drivers/watchdog/tegra_wdt.c platform_set_drvdata(pdev, wdt); wdt 236 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt = dev_get_drvdata(dev); wdt 238 drivers/watchdog/tegra_wdt.c if (watchdog_active(&wdt->wdd)) wdt 239 drivers/watchdog/tegra_wdt.c tegra_wdt_stop(&wdt->wdd); wdt 246 drivers/watchdog/tegra_wdt.c struct tegra_wdt *wdt = dev_get_drvdata(dev); wdt 248 drivers/watchdog/tegra_wdt.c if (watchdog_active(&wdt->wdd)) wdt 249 drivers/watchdog/tegra_wdt.c tegra_wdt_start(&wdt->wdd); wdt 59 drivers/watchdog/ts4800_wdt.c static void ts4800_write_feed(struct ts4800_wdt *wdt, u32 val) wdt 61 drivers/watchdog/ts4800_wdt.c regmap_write(wdt->regmap, wdt->feed_offset, val); wdt 66 drivers/watchdog/ts4800_wdt.c struct ts4800_wdt *wdt = watchdog_get_drvdata(wdd); wdt 68 drivers/watchdog/ts4800_wdt.c ts4800_write_feed(wdt, wdt->feed_val); wdt 74 drivers/watchdog/ts4800_wdt.c struct ts4800_wdt *wdt = watchdog_get_drvdata(wdd); wdt 76 drivers/watchdog/ts4800_wdt.c ts4800_write_feed(wdt, TS4800_WDT_DISABLE); wdt 83 drivers/watchdog/ts4800_wdt.c struct ts4800_wdt *wdt = watchdog_get_drvdata(wdd); wdt 92 drivers/watchdog/ts4800_wdt.c wdt->feed_val = ts4800_wdt_map[i].regval; wdt 115 drivers/watchdog/ts4800_wdt.c struct ts4800_wdt *wdt; wdt 132 drivers/watchdog/ts4800_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 133 drivers/watchdog/ts4800_wdt.c if (!wdt) wdt 137 drivers/watchdog/ts4800_wdt.c wdt->feed_offset = reg; wdt 138 drivers/watchdog/ts4800_wdt.c wdt->regmap = syscon_node_to_regmap(syscon_np); wdt 140 drivers/watchdog/ts4800_wdt.c if (IS_ERR(wdt->regmap)) { wdt 142 drivers/watchdog/ts4800_wdt.c return PTR_ERR(wdt->regmap); wdt 146 drivers/watchdog/ts4800_wdt.c wdd = &wdt->wdd; wdt 153 drivers/watchdog/ts4800_wdt.c watchdog_set_drvdata(wdd, wdt); wdt 177 drivers/watchdog/ts4800_wdt.c platform_set_drvdata(pdev, wdt); wdt 29 drivers/watchdog/twl4030_wdt.c static int twl4030_wdt_start(struct watchdog_device *wdt) wdt 31 drivers/watchdog/twl4030_wdt.c return twl4030_wdt_write(wdt->timeout + 1); wdt 34 drivers/watchdog/twl4030_wdt.c static int twl4030_wdt_stop(struct watchdog_device *wdt) wdt 39 drivers/watchdog/twl4030_wdt.c static int twl4030_wdt_set_timeout(struct watchdog_device *wdt, wdt 42 drivers/watchdog/twl4030_wdt.c wdt->timeout = timeout; wdt 61 drivers/watchdog/twl4030_wdt.c struct watchdog_device *wdt; wdt 63 drivers/watchdog/twl4030_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 64 drivers/watchdog/twl4030_wdt.c if (!wdt) wdt 67 drivers/watchdog/twl4030_wdt.c wdt->info = &twl4030_wdt_info; wdt 68 drivers/watchdog/twl4030_wdt.c wdt->ops = &twl4030_wdt_ops; wdt 69 drivers/watchdog/twl4030_wdt.c wdt->status = 0; wdt 70 drivers/watchdog/twl4030_wdt.c wdt->timeout = 30; wdt 71 drivers/watchdog/twl4030_wdt.c wdt->min_timeout = 1; wdt 72 drivers/watchdog/twl4030_wdt.c wdt->max_timeout = 30; wdt 73 drivers/watchdog/twl4030_wdt.c wdt->parent = dev; wdt 75 drivers/watchdog/twl4030_wdt.c watchdog_set_nowayout(wdt, nowayout); wdt 76 drivers/watchdog/twl4030_wdt.c platform_set_drvdata(pdev, wdt); wdt 78 drivers/watchdog/twl4030_wdt.c twl4030_wdt_stop(wdt); wdt 80 drivers/watchdog/twl4030_wdt.c return devm_watchdog_register_device(dev, wdt); wdt 86 drivers/watchdog/twl4030_wdt.c struct watchdog_device *wdt = platform_get_drvdata(pdev); wdt 87 drivers/watchdog/twl4030_wdt.c if (watchdog_active(wdt)) wdt 88 drivers/watchdog/twl4030_wdt.c return twl4030_wdt_stop(wdt); wdt 95 drivers/watchdog/twl4030_wdt.c struct watchdog_device *wdt = platform_get_drvdata(pdev); wdt 96 drivers/watchdog/twl4030_wdt.c if (watchdog_active(wdt)) wdt 97 drivers/watchdog/twl4030_wdt.c return twl4030_wdt_start(wdt); wdt 606 drivers/watchdog/watchdog_dev.c __ATTRIBUTE_GROUPS(wdt); wdt 29 drivers/watchdog/wm831x_wdt.c struct watchdog_device wdt; wdt 209 drivers/watchdog/wm831x_wdt.c wm831x_wdt = &driver_data->wdt; wdt 270 drivers/watchdog/wm831x_wdt.c return devm_watchdog_register_device(dev, &driver_data->wdt); wdt 26 drivers/watchdog/xen_wdt.c static struct sched_watchdog wdt; wdt 42 drivers/watchdog/xen_wdt.c wdt.timeout = wdd->timeout; wdt 52 drivers/watchdog/xen_wdt.c if (!wdt.id) wdt 53 drivers/watchdog/xen_wdt.c err = HYPERVISOR_sched_op(SCHEDOP_watchdog, &wdt); wdt 57 drivers/watchdog/xen_wdt.c wdt.id = err; wdt 70 drivers/watchdog/xen_wdt.c wdt.timeout = 0; wdt 71 drivers/watchdog/xen_wdt.c if (wdt.id) wdt 72 drivers/watchdog/xen_wdt.c err = HYPERVISOR_sched_op(SCHEDOP_watchdog, &wdt); wdt 74 drivers/watchdog/xen_wdt.c wdt.id = 0; wdt 85 drivers/watchdog/xen_wdt.c if (wdt.id) wdt 86 drivers/watchdog/xen_wdt.c err = HYPERVISOR_sched_op(SCHEDOP_watchdog, &wdt); wdt 152 drivers/watchdog/xen_wdt.c typeof(wdt.id) id = wdt.id; wdt 155 drivers/watchdog/xen_wdt.c wdt.id = id; wdt 161 drivers/watchdog/xen_wdt.c if (!wdt.id) wdt 163 drivers/watchdog/xen_wdt.c wdt.id = 0; wdt 54 drivers/watchdog/zx2967_wdt.c static inline u32 zx2967_wdt_readl(struct zx2967_wdt *wdt, u16 reg) wdt 56 drivers/watchdog/zx2967_wdt.c return readl_relaxed(wdt->reg_base + reg); wdt 59 drivers/watchdog/zx2967_wdt.c static inline void zx2967_wdt_writel(struct zx2967_wdt *wdt, u16 reg, u32 val) wdt 61 drivers/watchdog/zx2967_wdt.c writel_relaxed(val | ZX2967_WDT_WRITEKEY, wdt->reg_base + reg); wdt 64 drivers/watchdog/zx2967_wdt.c static void zx2967_wdt_refresh(struct zx2967_wdt *wdt) wdt 68 drivers/watchdog/zx2967_wdt.c val = zx2967_wdt_readl(wdt, ZX2967_WDT_REFRESH_REG); wdt 76 drivers/watchdog/zx2967_wdt.c zx2967_wdt_writel(wdt, ZX2967_WDT_REFRESH_REG, wdt 83 drivers/watchdog/zx2967_wdt.c struct zx2967_wdt *wdt = watchdog_get_drvdata(wdd); wdt 91 drivers/watchdog/zx2967_wdt.c zx2967_wdt_writel(wdt, ZX2967_WDT_CFG_REG, wdt 93 drivers/watchdog/zx2967_wdt.c zx2967_wdt_writel(wdt, ZX2967_WDT_LOAD_REG, wdt 95 drivers/watchdog/zx2967_wdt.c zx2967_wdt_refresh(wdt); wdt 101 drivers/watchdog/zx2967_wdt.c static void __zx2967_wdt_start(struct zx2967_wdt *wdt) wdt 105 drivers/watchdog/zx2967_wdt.c val = zx2967_wdt_readl(wdt, ZX2967_WDT_START_REG); wdt 107 drivers/watchdog/zx2967_wdt.c zx2967_wdt_writel(wdt, ZX2967_WDT_START_REG, wdt 111 drivers/watchdog/zx2967_wdt.c static void __zx2967_wdt_stop(struct zx2967_wdt *wdt) wdt 115 drivers/watchdog/zx2967_wdt.c val = zx2967_wdt_readl(wdt, ZX2967_WDT_START_REG); wdt 117 drivers/watchdog/zx2967_wdt.c zx2967_wdt_writel(wdt, ZX2967_WDT_START_REG, wdt 123 drivers/watchdog/zx2967_wdt.c struct zx2967_wdt *wdt = watchdog_get_drvdata(wdd); wdt 126 drivers/watchdog/zx2967_wdt.c __zx2967_wdt_start(wdt); wdt 133 drivers/watchdog/zx2967_wdt.c struct zx2967_wdt *wdt = watchdog_get_drvdata(wdd); wdt 135 drivers/watchdog/zx2967_wdt.c __zx2967_wdt_stop(wdt); wdt 142 drivers/watchdog/zx2967_wdt.c struct zx2967_wdt *wdt = watchdog_get_drvdata(wdd); wdt 144 drivers/watchdog/zx2967_wdt.c zx2967_wdt_refresh(wdt); wdt 198 drivers/watchdog/zx2967_wdt.c struct zx2967_wdt *wdt; wdt 202 drivers/watchdog/zx2967_wdt.c wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); wdt 203 drivers/watchdog/zx2967_wdt.c if (!wdt) wdt 206 drivers/watchdog/zx2967_wdt.c platform_set_drvdata(pdev, wdt); wdt 208 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.info = &zx2967_wdt_ident; wdt 209 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.ops = &zx2967_wdt_ops; wdt 210 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.timeout = ZX2967_WDT_DEFAULT_TIMEOUT; wdt 211 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.max_timeout = ZX2967_WDT_MAX_TIMEOUT; wdt 212 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.min_timeout = ZX2967_WDT_MIN_TIMEOUT; wdt 213 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.parent = dev; wdt 215 drivers/watchdog/zx2967_wdt.c wdt->reg_base = devm_platform_ioremap_resource(pdev, 0); wdt 216 drivers/watchdog/zx2967_wdt.c if (IS_ERR(wdt->reg_base)) wdt 217 drivers/watchdog/zx2967_wdt.c return PTR_ERR(wdt->reg_base); wdt 221 drivers/watchdog/zx2967_wdt.c wdt->clock = devm_clk_get(dev, NULL); wdt 222 drivers/watchdog/zx2967_wdt.c if (IS_ERR(wdt->clock)) { wdt 224 drivers/watchdog/zx2967_wdt.c return PTR_ERR(wdt->clock); wdt 227 drivers/watchdog/zx2967_wdt.c ret = clk_prepare_enable(wdt->clock); wdt 233 drivers/watchdog/zx2967_wdt.c wdt->clock); wdt 236 drivers/watchdog/zx2967_wdt.c clk_set_rate(wdt->clock, ZX2967_WDT_CLK_FREQ); wdt 247 drivers/watchdog/zx2967_wdt.c watchdog_set_drvdata(&wdt->wdt_device, wdt); wdt 248 drivers/watchdog/zx2967_wdt.c watchdog_init_timeout(&wdt->wdt_device, wdt 250 drivers/watchdog/zx2967_wdt.c watchdog_set_nowayout(&wdt->wdt_device, WATCHDOG_NOWAYOUT); wdt 252 drivers/watchdog/zx2967_wdt.c ret = devm_watchdog_register_device(dev, &wdt->wdt_device); wdt 257 drivers/watchdog/zx2967_wdt.c wdt->wdt_device.timeout, WATCHDOG_NOWAYOUT); wdt 23 include/linux/bcm47xx_wdt.h static inline void *bcm47xx_wdt_get_drvdata(struct bcm47xx_wdt *wdt) wdt 25 include/linux/bcm47xx_wdt.h return wdt->driver_data; wdt 616 include/linux/mfd/wm8350/core.h struct wm8350_wdt wdt;