Lines Matching +full:cpu +full:- +full:cfg

1 // SPDX-License-Identifier: GPL-2.0-or-later
33 unsigned int cpu = smp_processor_id(); in sibyte_set_periodic() local
34 void __iomem *cfg, *init; in sibyte_set_periodic() local
36 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_set_periodic()
37 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); in sibyte_set_periodic()
39 __raw_writeq(0, cfg); in sibyte_set_periodic()
40 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init); in sibyte_set_periodic()
41 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, cfg); in sibyte_set_periodic()
47 unsigned int cpu = smp_processor_id(); in sibyte_shutdown() local
48 void __iomem *cfg; in sibyte_shutdown() local
50 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_shutdown()
53 __raw_writeq(0, cfg); in sibyte_shutdown()
59 unsigned int cpu = smp_processor_id(); in sibyte_next_event() local
60 void __iomem *cfg, *init; in sibyte_next_event() local
62 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_next_event()
63 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); in sibyte_next_event()
65 __raw_writeq(0, cfg); in sibyte_next_event()
66 __raw_writeq(delta - 1, init); in sibyte_next_event()
67 __raw_writeq(M_SCD_TIMER_ENABLE, cfg); in sibyte_next_event()
74 unsigned int cpu = smp_processor_id(); in sibyte_counter_handler() local
76 void __iomem *cfg; in sibyte_counter_handler() local
85 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); in sibyte_counter_handler()
86 ____raw_writeq(tmode, cfg); in sibyte_counter_handler()
88 cd->event_handler(cd); in sibyte_counter_handler()
98 unsigned int cpu = smp_processor_id(); in sb1480_clockevent_init() local
99 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; in sb1480_clockevent_init()
100 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); in sb1480_clockevent_init()
101 unsigned char *name = per_cpu(sibyte_hpt_name, cpu); in sb1480_clockevent_init()
104 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */ in sb1480_clockevent_init()
106 sprintf(name, "bcm1480-counter-%d", cpu); in sb1480_clockevent_init()
107 cd->name = name; in sb1480_clockevent_init()
108 cd->features = CLOCK_EVT_FEAT_PERIODIC | in sb1480_clockevent_init()
111 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); in sb1480_clockevent_init()
112 cd->max_delta_ticks = 0x7fffff; in sb1480_clockevent_init()
113 cd->min_delta_ns = clockevent_delta2ns(2, cd); in sb1480_clockevent_init()
114 cd->min_delta_ticks = 2; in sb1480_clockevent_init()
115 cd->rating = 200; in sb1480_clockevent_init()
116 cd->irq = irq; in sb1480_clockevent_init()
117 cd->cpumask = cpumask_of(cpu); in sb1480_clockevent_init()
118 cd->set_next_event = sibyte_next_event; in sb1480_clockevent_init()
119 cd->set_state_shutdown = sibyte_shutdown; in sb1480_clockevent_init()
120 cd->set_state_periodic = sibyte_set_periodic; in sb1480_clockevent_init()
121 cd->set_state_oneshot = sibyte_shutdown; in sb1480_clockevent_init()
124 bcm1480_mask_irq(cpu, irq); in sb1480_clockevent_init()
127 * Map the timer interrupt to IP[4] of this cpu in sb1480_clockevent_init()
130 IOADDR(A_BCM1480_IMR_REGISTER(cpu, in sb1480_clockevent_init()
133 bcm1480_unmask_irq(cpu, irq); in sb1480_clockevent_init()
135 irq_set_affinity(irq, cpumask_of(cpu)); in sb1480_clockevent_init()