Lines Matching refs:iwdt

53 	struct ixp4xx_wdt *iwdt = to_ixp4xx_wdt(wdd);  in ixp4xx_wdt_start()  local
55 __raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_start()
56 __raw_writel(0, iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_start()
57 __raw_writel(wdd->timeout * iwdt->rate, in ixp4xx_wdt_start()
58 iwdt->base + IXP4XX_OSWT_OFFSET); in ixp4xx_wdt_start()
60 iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_start()
61 __raw_writel(0, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_start()
68 struct ixp4xx_wdt *iwdt = to_ixp4xx_wdt(wdd); in ixp4xx_wdt_stop() local
70 __raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_stop()
71 __raw_writel(0, iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_stop()
72 __raw_writel(0, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_stop()
90 struct ixp4xx_wdt *iwdt = to_ixp4xx_wdt(wdd); in ixp4xx_wdt_restart() local
92 __raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_restart()
93 __raw_writel(0, iwdt->base + IXP4XX_OSWT_OFFSET); in ixp4xx_wdt_restart()
95 iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_restart()
124 struct ixp4xx_wdt *iwdt; in ixp4xx_wdt_probe() local
133 iwdt = devm_kzalloc(dev, sizeof(*iwdt), GFP_KERNEL); in ixp4xx_wdt_probe()
134 if (!iwdt) in ixp4xx_wdt_probe()
136 iwdt->base = (void __iomem *)dev->platform_data; in ixp4xx_wdt_probe()
150 iwdt->rate = clk_get_rate(clk); in ixp4xx_wdt_probe()
152 if (!iwdt->rate) in ixp4xx_wdt_probe()
153 iwdt->rate = IXP4XX_TIMER_FREQ; in ixp4xx_wdt_probe()
155 iwdt->wdd.info = &ixp4xx_wdt_info; in ixp4xx_wdt_probe()
156 iwdt->wdd.ops = &ixp4xx_wdt_ops; in ixp4xx_wdt_probe()
157 iwdt->wdd.min_timeout = 1; in ixp4xx_wdt_probe()
158 iwdt->wdd.max_timeout = U32_MAX / iwdt->rate; in ixp4xx_wdt_probe()
159 iwdt->wdd.parent = dev; in ixp4xx_wdt_probe()
161 iwdt->wdd.timeout = 60U; in ixp4xx_wdt_probe()
162 watchdog_init_timeout(&iwdt->wdd, 0, dev); in ixp4xx_wdt_probe()
164 if (__raw_readl(iwdt->base + IXP4XX_OSST_OFFSET) & in ixp4xx_wdt_probe()
166 iwdt->wdd.bootstatus = WDIOF_CARDRESET; in ixp4xx_wdt_probe()
168 ret = devm_watchdog_register_device(dev, &iwdt->wdd); in ixp4xx_wdt_probe()