ostm 55 drivers/clocksource/renesas-ostm.c static void ostm_timer_stop(struct ostm_device *ostm) ostm 57 drivers/clocksource/renesas-ostm.c if (readb(ostm->base + OSTM_TE) & TE) { ostm 58 drivers/clocksource/renesas-ostm.c writeb(TT, ostm->base + OSTM_TT); ostm 65 drivers/clocksource/renesas-ostm.c while (readb(ostm->base + OSTM_TE) & TE) ostm 70 drivers/clocksource/renesas-ostm.c static int __init ostm_init_clksrc(struct ostm_device *ostm, unsigned long rate) ostm 76 drivers/clocksource/renesas-ostm.c ostm_timer_stop(ostm); ostm 78 drivers/clocksource/renesas-ostm.c writel(0, ostm->base + OSTM_CMP); ostm 79 drivers/clocksource/renesas-ostm.c writeb(CTL_FREERUN, ostm->base + OSTM_CTL); ostm 80 drivers/clocksource/renesas-ostm.c writeb(TS, ostm->base + OSTM_TS); ostm 82 drivers/clocksource/renesas-ostm.c return clocksource_mmio_init(ostm->base + OSTM_CNT, ostm 92 drivers/clocksource/renesas-ostm.c static void __init ostm_init_sched_clock(struct ostm_device *ostm, ostm 95 drivers/clocksource/renesas-ostm.c system_clock = ostm->base + OSTM_CNT; ostm 102 drivers/clocksource/renesas-ostm.c struct ostm_device *ostm = ced_to_ostm(ced); ostm 104 drivers/clocksource/renesas-ostm.c ostm_timer_stop(ostm); ostm 106 drivers/clocksource/renesas-ostm.c writel(delta, ostm->base + OSTM_CMP); ostm 107 drivers/clocksource/renesas-ostm.c writeb(CTL_ONESHOT, ostm->base + OSTM_CTL); ostm 108 drivers/clocksource/renesas-ostm.c writeb(TS, ostm->base + OSTM_TS); ostm 115 drivers/clocksource/renesas-ostm.c struct ostm_device *ostm = ced_to_ostm(ced); ostm 117 drivers/clocksource/renesas-ostm.c ostm_timer_stop(ostm); ostm 123 drivers/clocksource/renesas-ostm.c struct ostm_device *ostm = ced_to_ostm(ced); ostm 126 drivers/clocksource/renesas-ostm.c ostm_timer_stop(ostm); ostm 128 drivers/clocksource/renesas-ostm.c writel(ostm->ticks_per_jiffy - 1, ostm->base + OSTM_CMP); ostm 129 drivers/clocksource/renesas-ostm.c writeb(CTL_PERIODIC, ostm->base + OSTM_CTL); ostm 130 drivers/clocksource/renesas-ostm.c writeb(TS, ostm->base + OSTM_TS); ostm 137 drivers/clocksource/renesas-ostm.c struct ostm_device *ostm = ced_to_ostm(ced); ostm 139 drivers/clocksource/renesas-ostm.c ostm_timer_stop(ostm); ostm 146 drivers/clocksource/renesas-ostm.c struct ostm_device *ostm = dev_id; ostm 148 drivers/clocksource/renesas-ostm.c if (clockevent_state_oneshot(&ostm->ced)) ostm 149 drivers/clocksource/renesas-ostm.c ostm_timer_stop(ostm); ostm 152 drivers/clocksource/renesas-ostm.c if (ostm->ced.event_handler) ostm 153 drivers/clocksource/renesas-ostm.c ostm->ced.event_handler(&ostm->ced); ostm 158 drivers/clocksource/renesas-ostm.c static int __init ostm_init_clkevt(struct ostm_device *ostm, int irq, ostm 161 drivers/clocksource/renesas-ostm.c struct clock_event_device *ced = &ostm->ced; ostm 166 drivers/clocksource/renesas-ostm.c "ostm", ostm); ostm 188 drivers/clocksource/renesas-ostm.c struct ostm_device *ostm; ostm 194 drivers/clocksource/renesas-ostm.c ostm = kzalloc(sizeof(*ostm), GFP_KERNEL); ostm 195 drivers/clocksource/renesas-ostm.c if (!ostm) ostm 198 drivers/clocksource/renesas-ostm.c ostm->base = of_iomap(np, 0); ostm 199 drivers/clocksource/renesas-ostm.c if (!ostm->base) { ostm 224 drivers/clocksource/renesas-ostm.c ostm->ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); ostm 231 drivers/clocksource/renesas-ostm.c ret = ostm_init_clksrc(ostm, rate); ostm 234 drivers/clocksource/renesas-ostm.c ostm_init_sched_clock(ostm, rate); ostm 239 drivers/clocksource/renesas-ostm.c ret = ostm_init_clkevt(ostm, irq, rate); ostm 248 drivers/clocksource/renesas-ostm.c iounmap(ostm->base); ostm 249 drivers/clocksource/renesas-ostm.c kfree(ostm); ostm 256 drivers/clocksource/renesas-ostm.c TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);