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()
123 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_stop() local
126 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_stop()
128 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_stop()
135 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_ping() local
138 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_ping()
140 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in tco_timer_ping()
148 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_set_timeout() local
151 writel(t, SP5100_WDT_COUNT(tco->tcobase)); in tco_timer_set_timeout()
160 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in tco_timer_get_timeleft() local
162 return readl(SP5100_WDT_COUNT(tco->tcobase)); in tco_timer_get_timeleft()
182 static void tco_timer_enable(struct sp5100_tco *tco) in tco_timer_enable() argument
186 switch (tco->tco_reg_layout) { in tco_timer_enable()
251 static u32 sp5100_tco_prepare_base(struct sp5100_tco *tco, in sp5100_tco_prepare_base() argument
256 struct device *dev = tco->wdd.parent; in sp5100_tco_prepare_base()
275 tco->tcobase = devm_ioremap(dev, mmio_addr, SP5100_WDT_MEM_MAP_SIZE); in sp5100_tco_prepare_base()
276 if (!tco->tcobase) { in sp5100_tco_prepare_base()
287 static int sp5100_tco_timer_init(struct sp5100_tco *tco) in sp5100_tco_timer_init() argument
289 struct watchdog_device *wdd = &tco->wdd; in sp5100_tco_timer_init()
293 val = readl(SP5100_WDT_CONTROL(tco->tcobase)); in sp5100_tco_timer_init()
311 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); in sp5100_tco_timer_init()
350 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in sp5100_tco_setupdevice_mmio() local
403 ret = sp5100_tco_prepare_base(tco, mmio_addr, alt_mmio_addr, dev_name); in sp5100_tco_setupdevice_mmio()
406 ret = sp5100_tco_timer_init(tco); in sp5100_tco_setupdevice_mmio()
422 struct sp5100_tco *tco = watchdog_get_drvdata(wdd); in sp5100_tco_setupdevice() local
428 if (tco->tco_reg_layout == efch_mmio) in sp5100_tco_setupdevice()
442 switch (tco->tco_reg_layout) { in sp5100_tco_setupdevice()
489 ret = sp5100_tco_prepare_base(tco, mmio_addr, alt_mmio_addr, dev_name); in sp5100_tco_setupdevice()
492 tco_timer_enable(tco); in sp5100_tco_setupdevice()
493 ret = sp5100_tco_timer_init(tco); in sp5100_tco_setupdevice()
518 struct sp5100_tco *tco; in sp5100_tco_probe() local
521 tco = devm_kzalloc(dev, sizeof(*tco), GFP_KERNEL); in sp5100_tco_probe()
522 if (!tco) in sp5100_tco_probe()
525 tco->tco_reg_layout = tco_reg_layout(sp5100_tco_pci); in sp5100_tco_probe()
527 wdd = &tco->wdd; in sp5100_tco_probe()
539 watchdog_set_drvdata(wdd, tco); in sp5100_tco_probe()