Lines Matching full:at
70 * must be disabled at this point. in arch_timer_mmio_write()
135 struct arch_timer *at = cs_to_arch_timer(cs); in arch_mmio_counter_read() local
137 return arch_counter_mmio_get_cnt(at); in arch_mmio_counter_read()
142 struct arch_timer *at = evt_to_arch_timer(clk); in arch_timer_mmio_shutdown() local
145 ctrl = arch_timer_mmio_read(at, ARCH_TIMER_REG_CTRL); in arch_timer_mmio_shutdown()
147 arch_timer_mmio_write(at, ARCH_TIMER_REG_CTRL, ctrl); in arch_timer_mmio_shutdown()
180 struct arch_timer *at = evt_to_arch_timer(evt); in arch_timer_mmio_handler() local
183 ctrl = arch_timer_mmio_read(at, ARCH_TIMER_REG_CTRL); in arch_timer_mmio_handler()
186 arch_timer_mmio_write(at, ARCH_TIMER_REG_CTRL, ctrl); in arch_timer_mmio_handler()
197 struct arch_timer *at = platform_get_drvdata(pdev); in find_best_frame() local
201 cntctlbase = ioremap(at->gt_block->cntctlbase, at->gt_block->size); in find_best_frame()
204 &at->gt_block->cntctlbase); in find_best_frame()
218 frame = &at->gt_block->frame[i]; in find_best_frame()
231 at->access = VIRT_ACCESS; in find_best_frame()
239 at->access = PHYS_ACCESS; in find_best_frame()
248 static void arch_timer_mmio_setup(struct arch_timer *at, int irq) in arch_timer_mmio_setup() argument
250 at->evt = (struct clock_event_device) { in arch_timer_mmio_setup()
262 at->evt.set_state_shutdown(&at->evt); in arch_timer_mmio_setup()
264 clockevents_config_and_register(&at->evt, at->rate, 0xf, in arch_timer_mmio_setup()
267 enable_irq(at->evt.irq); in arch_timer_mmio_setup()
269 at->cs = (struct clocksource) { in arch_timer_mmio_setup()
277 clocksource_register_hz(&at->cs, at->rate); in arch_timer_mmio_setup()
283 struct arch_timer *at = platform_get_drvdata(pdev); in arch_timer_mmio_frame_register() local
292 at->base = devm_ioremap(&pdev->dev, frame->cntbase, frame->size); in arch_timer_mmio_frame_register()
293 if (!at->base) { in arch_timer_mmio_frame_register()
304 rate = readl_relaxed(at->base + CNTFRQ); in arch_timer_mmio_frame_register()
306 if (!np || of_property_read_u32(np, "clock-frequency", &at->rate)) in arch_timer_mmio_frame_register()
307 at->rate = rate; in arch_timer_mmio_frame_register()
309 if (!at->rate) in arch_timer_mmio_frame_register()
310 at->rate = arch_timer_get_rate(); in arch_timer_mmio_frame_register()
312 irq = at->access == VIRT_ACCESS ? frame->virt_irq : frame->phys_irq; in arch_timer_mmio_frame_register()
315 &at->evt); in arch_timer_mmio_frame_register()
322 arch_timer_mmio_setup(at, irq); in arch_timer_mmio_frame_register()
327 struct arch_timer *at) in of_populate_gt_block() argument
334 at->gt_block->cntctlbase = res.start; in of_populate_gt_block()
335 at->gt_block->size = resource_size(&res); in of_populate_gt_block()
352 frame = &at->gt_block->frame[n]; in of_populate_gt_block()
377 struct arch_timer *at; in arch_timer_mmio_probe() local
383 at = devm_kmalloc(&pdev->dev, sizeof(*at), GFP_KERNEL | __GFP_ZERO); in arch_timer_mmio_probe()
384 if (!at) in arch_timer_mmio_probe()
388 at->gt_block = devm_kmalloc(&pdev->dev, sizeof(*at->gt_block), in arch_timer_mmio_probe()
390 if (!at->gt_block) in arch_timer_mmio_probe()
392 ret = of_populate_gt_block(pdev, at); in arch_timer_mmio_probe()
396 at->gt_block = dev_get_platdata(&pdev->dev); in arch_timer_mmio_probe()
399 platform_set_drvdata(pdev, at); in arch_timer_mmio_probe()
405 &at->gt_block->cntctlbase); in arch_timer_mmio_probe()
412 "mmio timer running at %lu.%02luMHz (%s)\n", in arch_timer_mmio_probe()
413 (unsigned long)at->rate / 1000000, in arch_timer_mmio_probe()
414 (unsigned long)(at->rate / 10000) % 100, in arch_timer_mmio_probe()
415 at->access == VIRT_ACCESS ? "virt" : "phys"); in arch_timer_mmio_probe()