Lines Matching refs:tco

111 	struct sp5100_tco *tco = watchdog_get_drvdata(wdd);  in tco_timer_start()  local
114 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_start()
116 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_start()
120 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_start()
127 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_stop() local
130 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_stop()
132 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_stop()
139 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_ping() local
142 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_ping()
144 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_ping()
152 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_set_timeout() local
155 writel(t, SP5100_WDT_COUNT(tco->tcobase)); in tco_timer_set_timeout()
164 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_get_timeleft() local
166 return readl(SP5100_WDT_COUNT(tco->tcobase)); in tco_timer_get_timeleft()
186 static void tco_timer_enable(struct sp5100_tco *tco) in tco_timer_enable() argument
190 switch (tco->tco_reg_layout) { in tco_timer_enable()
255 static u32 sp5100_tco_prepare_base(struct sp5100_tco *tco, in sp5100_tco_prepare_base() argument
260 struct device *dev = tco->wdd.parent; in sp5100_tco_prepare_base()
279 tco->tcobase = devm_ioremap(dev, mmio_addr, SP5100_WDT_MEM_MAP_SIZE); in sp5100_tco_prepare_base()
280 if (!tco->tcobase) { in sp5100_tco_prepare_base()
291 static int sp5100_tco_timer_init(struct sp5100_tco *tco) in sp5100_tco_timer_init() argument
293 struct watchdog_device *wdd = &tco->wdd; in sp5100_tco_timer_init()
297 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in sp5100_tco_timer_init()
315 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in sp5100_tco_timer_init()
354 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in sp5100_tco_setupdevice_mmio() local
407 ret = sp5100_tco_prepare_base(tco, mmio_addr, alt_mmio_addr, dev_name); in sp5100_tco_setupdevice_mmio()
410 ret = sp5100_tco_timer_init(tco); in sp5100_tco_setupdevice_mmio()
426 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in sp5100_tco_setupdevice() local
432 if (tco->tco_reg_layout == efch_mmio) in sp5100_tco_setupdevice()
446 switch (tco->tco_reg_layout) { in sp5100_tco_setupdevice()
493 ret = sp5100_tco_prepare_base(tco, mmio_addr, alt_mmio_addr, dev_name); in sp5100_tco_setupdevice()
496 tco_timer_enable(tco); in sp5100_tco_setupdevice()
497 ret = sp5100_tco_timer_init(tco); in sp5100_tco_setupdevice()
522 struct sp5100_tco *tco; in sp5100_tco_probe() local
525 tco = devm_kzalloc(dev, sizeof(*tco), GFP_KERNEL); in sp5100_tco_probe()
526 if (!tco) in sp5100_tco_probe()
529 tco->tco_reg_layout = tco_reg_layout(sp5100_tco_pci); in sp5100_tco_probe()
531 wdd = &tco->wdd; in sp5100_tco_probe()
543 watchdog_set_drvdata(wdd, tco); in sp5100_tco_probe()