Skip to content

Commit b35a5e5

Browse files
geertudlezcano
authored andcommitted
clocksource/drivers/renesas-ostm: Use unique device name instead of ostm
Currently all OSTM devices are called "ostm", also in kernel messages. As there can be multiple instances in an SoC, this can confuse the user. Hence construct a unique name from the DT node name, like is done for platform devices. On RSK+RZA1, the boot log changes like: -clocksource: ostm: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57352151442 ns +clocksource: timer@fcfec000: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57352151442 ns sched_clock: 32 bits at 33MHz, resolution 30ns, wraps every 64440619504ns -ostm: used for clocksource -ostm: used for clock events +/soc/timer@fcfec000: used for clocksource +/soc/timer@fcfec40: used for clock events ... -clocksource: Switched to clocksource ostm +clocksource: Switched to clocksource timer@fcfec000 Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2273142 commit b35a5e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/clocksource/renesas-ostm.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ static int __init ostm_init_clksrc(struct timer_of *to)
6464
writeb(CTL_FREERUN, timer_of_base(to) + OSTM_CTL);
6565
writeb(TS, timer_of_base(to) + OSTM_TS);
6666

67-
return clocksource_mmio_init(timer_of_base(to) + OSTM_CNT, "ostm",
68-
timer_of_rate(to), 300, 32,
69-
clocksource_mmio_readl_up);
67+
return clocksource_mmio_init(timer_of_base(to) + OSTM_CNT,
68+
to->np->full_name, timer_of_rate(to), 300,
69+
32, clocksource_mmio_readl_up);
7070
}
7171

7272
static u64 notrace ostm_read_sched_clock(void)
@@ -190,13 +190,13 @@ static int __init ostm_init(struct device_node *np)
190190
goto err_cleanup;
191191

192192
ostm_init_sched_clock(to);
193-
pr_info("ostm: used for clocksource\n");
193+
pr_info("%pOF: used for clocksource\n", np);
194194
} else {
195195
ret = ostm_init_clkevt(to);
196196
if (ret)
197197
goto err_cleanup;
198198

199-
pr_info("ostm: used for clock events\n");
199+
pr_info("%pOF: used for clock events\n", np);
200200
}
201201

202202
return 0;

0 commit comments

Comments
 (0)