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

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