Lines Matching +full:cpu +full:- +full:cfg
1 // SPDX-License-Identifier: GPL-2.0-or-later
31 void __iomem *cfg; in sibyte_shutdown() local
33 cfg = IOADDR(A_SCD_TIMER_REGISTER(smp_processor_id(), R_SCD_TIMER_CFG)); in sibyte_shutdown()
36 __raw_writeq(0, cfg); in sibyte_shutdown()
43 unsigned int cpu = smp_processor_id(); in sibyte_set_periodic() local
44 void __iomem *cfg, *init; in sibyte_set_periodic() local
46 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_set_periodic()
47 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); in sibyte_set_periodic()
49 __raw_writeq(0, cfg); in sibyte_set_periodic()
50 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init); in sibyte_set_periodic()
51 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, cfg); in sibyte_set_periodic()
58 unsigned int cpu = smp_processor_id(); in sibyte_next_event() local
59 void __iomem *cfg, *init; in sibyte_next_event() local
61 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_next_event()
62 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); in sibyte_next_event()
64 __raw_writeq(0, cfg); in sibyte_next_event()
65 __raw_writeq(delta - 1, init); in sibyte_next_event()
66 __raw_writeq(M_SCD_TIMER_ENABLE, cfg); in sibyte_next_event()
73 unsigned int cpu = smp_processor_id(); in sibyte_counter_handler() local
75 void __iomem *cfg; in sibyte_counter_handler() local
84 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_counter_handler()
85 ____raw_writeq(tmode, cfg); in sibyte_counter_handler()
87 cd->event_handler(cd); in sibyte_counter_handler()
97 unsigned int cpu = smp_processor_id(); in sb1250_clockevent_init() local
98 unsigned int irq = K_INT_TIMER_0 + cpu; in sb1250_clockevent_init()
99 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); in sb1250_clockevent_init()
100 unsigned char *name = per_cpu(sibyte_hpt_name, cpu); in sb1250_clockevent_init()
104 BUG_ON(cpu > 2); in sb1250_clockevent_init()
106 sprintf(name, "sb1250-counter-%d", cpu); in sb1250_clockevent_init()
107 cd->name = name; in sb1250_clockevent_init()
108 cd->features = CLOCK_EVT_FEAT_PERIODIC | in sb1250_clockevent_init()
111 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); in sb1250_clockevent_init()
112 cd->max_delta_ticks = 0x7fffff; in sb1250_clockevent_init()
113 cd->min_delta_ns = clockevent_delta2ns(2, cd); in sb1250_clockevent_init()
114 cd->min_delta_ticks = 2; in sb1250_clockevent_init()
115 cd->rating = 200; in sb1250_clockevent_init()
116 cd->irq = irq; in sb1250_clockevent_init()
117 cd->cpumask = cpumask_of(cpu); in sb1250_clockevent_init()
118 cd->set_next_event = sibyte_next_event; in sb1250_clockevent_init()
119 cd->set_state_shutdown = sibyte_shutdown; in sb1250_clockevent_init()
120 cd->set_state_periodic = sibyte_set_periodic; in sb1250_clockevent_init()
121 cd->set_state_oneshot = sibyte_shutdown; in sb1250_clockevent_init()
124 sb1250_mask_irq(cpu, irq); in sb1250_clockevent_init()
127 * Map the timer interrupt to IP[4] of this cpu in sb1250_clockevent_init()
130 IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) + in sb1250_clockevent_init()
133 sb1250_unmask_irq(cpu, irq); in sb1250_clockevent_init()
135 irq_set_affinity(irq, cpumask_of(cpu)); in sb1250_clockevent_init()