Lines Matching refs:adev
67 static inline void __iomem *adev_virt_addr(struct apbt_dev *adev) in adev_virt_addr() argument
69 return apbt_virt_address + adev->num * APBTMRS_REG_SIZE; in adev_virt_addr()
137 struct apbt_dev *adev = this_cpu_ptr(&cpu_apbt_dev); in apbt_clockevent_register() local
146 adev->num = smp_processor_id(); in apbt_clockevent_register()
147 adev->timer = dw_apb_clockevent_init(smp_processor_id(), "apbt0", in apbt_clockevent_register()
150 adev_virt_addr(adev), 0, apbt_freq); in apbt_clockevent_register()
152 adev->timer->eoi = NULL; in apbt_clockevent_register()
155 global_clock_event = &adev->timer->ced; in apbt_clockevent_register()
160 dw_apb_clockevent_register(adev->timer); in apbt_clockevent_register()
168 static void apbt_setup_irq(struct apbt_dev *adev) in apbt_setup_irq() argument
170 irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); in apbt_setup_irq()
171 irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); in apbt_setup_irq()
177 struct apbt_dev *adev; in apbt_setup_secondary_clock() local
185 adev = this_cpu_ptr(&cpu_apbt_dev); in apbt_setup_secondary_clock()
186 if (!adev->timer) { in apbt_setup_secondary_clock()
187 adev->timer = dw_apb_clockevent_init(cpu, adev->name, in apbt_setup_secondary_clock()
188 APBT_CLOCKEVENT_RATING, adev_virt_addr(adev), in apbt_setup_secondary_clock()
189 adev->irq, apbt_freq); in apbt_setup_secondary_clock()
190 adev->timer->eoi = NULL; in apbt_setup_secondary_clock()
192 dw_apb_clockevent_resume(adev->timer); in apbt_setup_secondary_clock()
196 cpu, adev->name, adev->cpu); in apbt_setup_secondary_clock()
198 apbt_setup_irq(adev); in apbt_setup_secondary_clock()
199 dw_apb_clockevent_register(adev->timer); in apbt_setup_secondary_clock()
216 struct apbt_dev *adev = &per_cpu(cpu_apbt_dev, cpu); in apbt_cpu_dead() local
218 dw_apb_clockevent_pause(adev->timer); in apbt_cpu_dead()
223 dw_apb_clockevent_stop(adev->timer); in apbt_cpu_dead()
287 struct apbt_dev *adev; in apbt_time_init() local
329 adev = &per_cpu(cpu_apbt_dev, i); in apbt_time_init()
330 adev->num = i; in apbt_time_init()
331 adev->cpu = i; in apbt_time_init()
334 adev->irq = p_mtmr->irq; in apbt_time_init()
337 snprintf(adev->name, sizeof(adev->name) - 1, "apbt%d", i); in apbt_time_init()