Lines Matching refs:dw_cs

327 void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs)  in dw_apb_clocksource_start()  argument
333 u32 ctrl = apbt_readl(&dw_cs->timer, APBTMR_N_CONTROL); in dw_apb_clocksource_start()
336 apbt_writel(&dw_cs->timer, ctrl, APBTMR_N_CONTROL); in dw_apb_clocksource_start()
337 apbt_writel(&dw_cs->timer, ~0, APBTMR_N_LOAD_COUNT); in dw_apb_clocksource_start()
341 apbt_writel(&dw_cs->timer, ctrl, APBTMR_N_CONTROL); in dw_apb_clocksource_start()
343 dw_apb_clocksource_read(dw_cs); in dw_apb_clocksource_start()
349 struct dw_apb_clocksource *dw_cs = in __apbt_read_clocksource() local
352 current_count = apbt_readl_relaxed(&dw_cs->timer, in __apbt_read_clocksource()
360 struct dw_apb_clocksource *dw_cs = in apbt_restart_clocksource() local
363 dw_apb_clocksource_start(dw_cs); in apbt_restart_clocksource()
382 struct dw_apb_clocksource *dw_cs = kzalloc(sizeof(*dw_cs), GFP_KERNEL); in dw_apb_clocksource_init() local
384 if (!dw_cs) in dw_apb_clocksource_init()
387 dw_cs->timer.base = base; in dw_apb_clocksource_init()
388 dw_cs->timer.freq = freq; in dw_apb_clocksource_init()
389 dw_cs->cs.name = name; in dw_apb_clocksource_init()
390 dw_cs->cs.rating = rating; in dw_apb_clocksource_init()
391 dw_cs->cs.read = __apbt_read_clocksource; in dw_apb_clocksource_init()
392 dw_cs->cs.mask = CLOCKSOURCE_MASK(32); in dw_apb_clocksource_init()
393 dw_cs->cs.flags = CLOCK_SOURCE_IS_CONTINUOUS; in dw_apb_clocksource_init()
394 dw_cs->cs.resume = apbt_restart_clocksource; in dw_apb_clocksource_init()
396 return dw_cs; in dw_apb_clocksource_init()
404 void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs) in dw_apb_clocksource_register() argument
406 clocksource_register_hz(&dw_cs->cs, dw_cs->timer.freq); in dw_apb_clocksource_register()
414 u64 dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs) in dw_apb_clocksource_read() argument
416 return (u64)~apbt_readl(&dw_cs->timer, APBTMR_N_CURRENT_VALUE); in dw_apb_clocksource_read()