Hi Jacopo, On Wed, Oct 11, 2017 at 3:05 PM, Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> wrote: > From: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > > 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 GR-Peach, the boot log changes like: > > -clocksource: ostm: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57352151442 ns > +clocksource: ostm /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 > +ostm /timer@fcfec000: used for clocksource > +ostm /timer@fcfec400: used for clock events > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> > Tested-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> Thanks for testing! > --- > Hi Geert, > with your original patch boot log looks like: > > clocksource: ostm timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57339246898 ns > ostm timer: used for clocksource > ostm timer: used for clock events > clocksource: Switched to clocksource ostm timer > > Using "np->name" to sprintf the ostm name is not that useful as all ostm > instances will appear as "ostm timer". > > With this v2 I am using "np->full_name" and custom print modifier "%pOF" to > sprintf the node name, and now boot log looks like what I have reported in the > change log (*) > > Thanks > j > > (*) Using %pOF results in "/timer@fcfec000" with the "/" at beginning of > timer name. I used %pOF as it has been recently introduced, but if you > feel like it's better to get rid of the "/" I can fall back to > ("%s", np->full_name) Right, I forgot the unit address is not included. What I really intended was to print "fcfec000.timer", cfr. of_device_make_bus_id() for platform devices. IMHO the full name is a bit long. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds