Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clocksource/drivers/vf-pit: Use the node name for the interrupt and timer names

In order to differentiate from userspace the pit timer given the
device tree, let's use the node name for the interrupt and the timer
names.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20250804152344.1109310-13-daniel.lezcano@linaro.org

+11 -9
+11 -9
drivers/clocksource/timer-vf-pit.c
··· 79 79 return (u64)~readl(PITCVAL(pit->clksrc_base)); 80 80 } 81 81 82 - static int __init pit_clocksource_init(struct pit_timer *pit, void __iomem *base, 83 - unsigned long rate) 82 + static int __init pit_clocksource_init(struct pit_timer *pit, const char *name, 83 + void __iomem *base, unsigned long rate) 84 84 { 85 85 /* 86 86 * The channels 0 and 1 can be chained to build a 64-bit ··· 88 88 * the channels 0 and 1 unused for anyone else who needs them 89 89 */ 90 90 pit->clksrc_base = base + PIT_CH(2); 91 - pit->cs.name = "vf-pit"; 91 + pit->cs.name = name; 92 92 pit->cs.rating = 300; 93 93 pit->cs.read = pit_timer_clocksource_read; 94 94 pit->cs.mask = CLOCKSOURCE_MASK(32); ··· 162 162 return IRQ_HANDLED; 163 163 } 164 164 165 - static int __init pit_clockevent_init(struct pit_timer *pit, void __iomem *base, 166 - unsigned long rate, int irq, unsigned int cpu) 165 + static int __init pit_clockevent_init(struct pit_timer *pit, const char *name, 166 + void __iomem *base, unsigned long rate, 167 + int irq, unsigned int cpu) 167 168 { 168 169 /* 169 170 * The channels 0 and 1 can be chained to build a 64-bit ··· 179 178 pit_irq_acknowledge(pit); 180 179 181 180 BUG_ON(request_irq(irq, pit_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL, 182 - "VF pit timer", &pit->ced)); 181 + name, &pit->ced)); 183 182 184 183 pit->ced.cpumask = cpumask_of(cpu); 185 184 pit->ced.irq = irq; 186 185 187 - pit->ced.name = "VF pit timer"; 186 + pit->ced.name = name; 188 187 pit->ced.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; 189 188 pit->ced.set_state_shutdown = pit_shutdown; 190 189 pit->ced.set_state_periodic = pit_set_periodic; ··· 209 208 struct pit_timer *pit; 210 209 struct clk *pit_clk; 211 210 void __iomem *timer_base; 211 + const char *name = of_node_full_name(np); 212 212 unsigned long clk_rate; 213 213 int irq, ret; 214 214 ··· 246 244 /* enable the pit module */ 247 245 writel(~PITMCR_MDIS, timer_base + PITMCR); 248 246 249 - ret = pit_clocksource_init(pit, timer_base, clk_rate); 247 + ret = pit_clocksource_init(pit, name, timer_base, clk_rate); 250 248 if (ret) 251 249 goto out_disable_unprepare; 252 250 253 - ret = pit_clockevent_init(pit, timer_base, clk_rate, irq, 0); 251 + ret = pit_clockevent_init(pit, name, timer_base, clk_rate, irq, 0); 254 252 if (ret) 255 253 goto out_pit_clocksource_unregister; 256 254