Lines Matching refs:gwdt

50 static void ftwdt010_enable(struct ftwdt010_wdt *gwdt,  in ftwdt010_enable()  argument
56 writel(timeout * WDT_CLOCK, gwdt->base + FTWDT010_WDLOAD); in ftwdt010_enable()
57 writel(WDRESTART_MAGIC, gwdt->base + FTWDT010_WDRESTART); in ftwdt010_enable()
60 writel(enable, gwdt->base + FTWDT010_WDCR); in ftwdt010_enable()
64 writel(enable, gwdt->base + FTWDT010_WDCR); in ftwdt010_enable()
69 struct ftwdt010_wdt *gwdt = to_ftwdt010_wdt(wdd); in ftwdt010_wdt_start() local
71 ftwdt010_enable(gwdt, wdd->timeout, gwdt->has_irq); in ftwdt010_wdt_start()
77 struct ftwdt010_wdt *gwdt = to_ftwdt010_wdt(wdd); in ftwdt010_wdt_stop() local
79 writel(0, gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_stop()
86 struct ftwdt010_wdt *gwdt = to_ftwdt010_wdt(wdd); in ftwdt010_wdt_ping() local
88 writel(WDRESTART_MAGIC, gwdt->base + FTWDT010_WDRESTART); in ftwdt010_wdt_ping()
112 struct ftwdt010_wdt *gwdt = data; in ftwdt010_wdt_interrupt() local
114 watchdog_notify_pretimeout(&gwdt->wdd); in ftwdt010_wdt_interrupt()
139 struct ftwdt010_wdt *gwdt; in ftwdt010_wdt_probe() local
144 gwdt = devm_kzalloc(dev, sizeof(*gwdt), GFP_KERNEL); in ftwdt010_wdt_probe()
145 if (!gwdt) in ftwdt010_wdt_probe()
148 gwdt->base = devm_platform_ioremap_resource(pdev, 0); in ftwdt010_wdt_probe()
149 if (IS_ERR(gwdt->base)) in ftwdt010_wdt_probe()
150 return PTR_ERR(gwdt->base); in ftwdt010_wdt_probe()
152 gwdt->dev = dev; in ftwdt010_wdt_probe()
153 gwdt->wdd.info = &ftwdt010_wdt_info; in ftwdt010_wdt_probe()
154 gwdt->wdd.ops = &ftwdt010_wdt_ops; in ftwdt010_wdt_probe()
155 gwdt->wdd.min_timeout = 1; in ftwdt010_wdt_probe()
156 gwdt->wdd.max_timeout = 0xFFFFFFFF / WDT_CLOCK; in ftwdt010_wdt_probe()
157 gwdt->wdd.parent = dev; in ftwdt010_wdt_probe()
163 gwdt->wdd.timeout = 13U; in ftwdt010_wdt_probe()
164 watchdog_init_timeout(&gwdt->wdd, 0, dev); in ftwdt010_wdt_probe()
166 reg = readw(gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_probe()
170 writel(reg, gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_probe()
176 "watchdog bark", gwdt); in ftwdt010_wdt_probe()
179 gwdt->has_irq = true; in ftwdt010_wdt_probe()
182 ret = devm_watchdog_register_device(dev, &gwdt->wdd); in ftwdt010_wdt_probe()
187 platform_set_drvdata(pdev, gwdt); in ftwdt010_wdt_probe()
195 struct ftwdt010_wdt *gwdt = dev_get_drvdata(dev); in ftwdt010_wdt_suspend() local
198 reg = readw(gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_suspend()
200 writel(reg, gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_suspend()
207 struct ftwdt010_wdt *gwdt = dev_get_drvdata(dev); in ftwdt010_wdt_resume() local
210 if (watchdog_active(&gwdt->wdd)) { in ftwdt010_wdt_resume()
211 reg = readw(gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_resume()
213 writel(reg, gwdt->base + FTWDT010_WDCR); in ftwdt010_wdt_resume()