Lines Matching refs:jz4740_wdt
64 } jz4740_wdt; variable
71 writew(0x0, jz4740_wdt.base + JZ_REG_WDT_TIMER_COUNTER); in jz4740_wdt_service()
82 rtc_clk_rate = clk_get_rate(jz4740_wdt.rtc_clk); in jz4740_wdt_set_heartbeat()
96 writeb(0x0, jz4740_wdt.base + JZ_REG_WDT_COUNTER_ENABLE); in jz4740_wdt_set_heartbeat()
97 writew(clock_div, jz4740_wdt.base + JZ_REG_WDT_TIMER_CONTROL); in jz4740_wdt_set_heartbeat()
99 writew((u16)timeout_value, jz4740_wdt.base + JZ_REG_WDT_TIMER_DATA); in jz4740_wdt_set_heartbeat()
100 writew(0x0, jz4740_wdt.base + JZ_REG_WDT_TIMER_COUNTER); in jz4740_wdt_set_heartbeat()
102 jz4740_wdt.base + JZ_REG_WDT_TIMER_CONTROL); in jz4740_wdt_set_heartbeat()
104 writeb(0x1, jz4740_wdt.base + JZ_REG_WDT_COUNTER_ENABLE); in jz4740_wdt_set_heartbeat()
116 writeb(0x0, jz4740_wdt.base + JZ_REG_WDT_COUNTER_ENABLE); in jz4740_wdt_disable()
121 if (test_and_set_bit(WDT_IN_USE, &jz4740_wdt.status)) in jz4740_wdt_open()
135 clear_bit(WDT_OK_TO_CLOSE, &jz4740_wdt.status); in jz4740_wdt_write()
143 set_bit(WDT_OK_TO_CLOSE, &jz4740_wdt.status); in jz4740_wdt_write()
198 if (test_and_clear_bit(WDT_OK_TO_CLOSE, &jz4740_wdt.status)) in jz4740_wdt_release()
201 clear_bit(WDT_IN_USE, &jz4740_wdt.status); in jz4740_wdt_release()
233 jz4740_wdt.mem = request_mem_region(res->start, size, pdev->name); in jz4740_wdt_probe()
234 if (jz4740_wdt.mem == NULL) { in jz4740_wdt_probe()
239 jz4740_wdt.base = ioremap_nocache(res->start, size); in jz4740_wdt_probe()
240 if (jz4740_wdt.base == NULL) { in jz4740_wdt_probe()
246 jz4740_wdt.rtc_clk = clk_get(NULL, "rtc"); in jz4740_wdt_probe()
247 if (IS_ERR(jz4740_wdt.rtc_clk)) { in jz4740_wdt_probe()
249 ret = PTR_ERR(jz4740_wdt.rtc_clk); in jz4740_wdt_probe()
262 clk_put(jz4740_wdt.rtc_clk); in jz4740_wdt_probe()
264 iounmap(jz4740_wdt.base); in jz4740_wdt_probe()
266 release_mem_region(jz4740_wdt.mem->start, in jz4740_wdt_probe()
267 resource_size(jz4740_wdt.mem)); in jz4740_wdt_probe()
276 clk_put(jz4740_wdt.rtc_clk); in jz4740_wdt_remove()
278 iounmap(jz4740_wdt.base); in jz4740_wdt_remove()
279 jz4740_wdt.base = NULL; in jz4740_wdt_remove()
281 release_mem_region(jz4740_wdt.mem->start, in jz4740_wdt_remove()
282 resource_size(jz4740_wdt.mem)); in jz4740_wdt_remove()
283 jz4740_wdt.mem = NULL; in jz4740_wdt_remove()