From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D7A3FA3728 for ; Wed, 16 Oct 2019 14:48:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F36572168B for ; Wed, 16 Oct 2019 14:47:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393108AbfJPOrx (ORCPT ); Wed, 16 Oct 2019 10:47:53 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:37068 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbfJPOrx (ORCPT ); Wed, 16 Oct 2019 10:47:53 -0400 Received: from ramsan ([84.194.98.4]) by xavier.telenet-ops.be with bizsmtp id EEnq2100X05gfCL01EnqeS; Wed, 16 Oct 2019 16:47:50 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iKkac-0003rY-Fq; Wed, 16 Oct 2019 16:47:50 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iKkac-0007hO-Dp; Wed, 16 Oct 2019 16:47:50 +0200 From: Geert Uytterhoeven To: Daniel Lezcano , Thomas Gleixner Cc: Chris Brandt , Rob Herring , Jacopo Mondi , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v4 4/4] clocksource/drivers/renesas-ostm: Use unique device name instead of ostm Date: Wed, 16 Oct 2019 16:47:47 +0200 Message-Id: <20191016144747.29538-5-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191016144747.29538-1-geert+renesas@glider.be> References: <20191016144747.29538-1-geert+renesas@glider.be> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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@fcfec400: used for clock events ... -clocksource: Switched to clocksource ostm +clocksource: Switched to clocksource timer@fcfec000 Signed-off-by: Geert Uytterhoeven --- v4: - Rebase on top of timer_of conversion, and use np->full_name or %pOF, like the timer-of core does, v3: - Make the name format similar to the one used for platform devices, - Use kasprintf() instead of buffer size guessing, - Use a real example from rskrza1. v2 (by Jacopo): - Use np->fullname. --- drivers/clocksource/renesas-ostm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c index 46012d905604bc43..3d06ba66008c7029 100644 --- a/drivers/clocksource/renesas-ostm.c +++ b/drivers/clocksource/renesas-ostm.c @@ -64,9 +64,9 @@ static int __init ostm_init_clksrc(struct timer_of *to) writeb(CTL_FREERUN, timer_of_base(to) + OSTM_CTL); writeb(TS, timer_of_base(to) + OSTM_TS); - return clocksource_mmio_init(timer_of_base(to) + OSTM_CNT, "ostm", - timer_of_rate(to), 300, 32, - clocksource_mmio_readl_up); + return clocksource_mmio_init(timer_of_base(to) + OSTM_CNT, + to->np->full_name, timer_of_rate(to), 300, + 32, clocksource_mmio_readl_up); } static u64 notrace ostm_read_sched_clock(void) @@ -190,13 +190,13 @@ static int __init ostm_init(struct device_node *np) goto err_cleanup; ostm_init_sched_clock(to); - pr_info("ostm: used for clocksource\n"); + pr_info("%pOF: used for clocksource\n", np); } else { ret = ostm_init_clkevt(to); if (ret) goto err_cleanup; - pr_info("ostm: used for clock events\n"); + pr_info("%pOF: used for clock events\n", np); } return 0; -- 2.17.1