From patchwork Tue Jan 8 13:30:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 10752017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0446D6C5 for ; Tue, 8 Jan 2019 13:31:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7A3828CC7 for ; Tue, 8 Jan 2019 13:31:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5A2728CB5; Tue, 8 Jan 2019 13:31:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 791AC28CFD for ; Tue, 8 Jan 2019 13:31:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NQL/4rpDElPUjSLm7+8juz+6hp3mM1DkYserdBPpRf4=; b=GkloSs1Rp8GsPa gu8L90V5zjuUyfZ3jjOfeQzeYQaTcpEg4tXB9ESlubya2v4N+RufJXiev7uwt6aSjRLk1Q4c2Lmio 1XN+ojB+H/+AUMtq5RfYICdJwcpCn5P5vKe0SqIjP8X4stqfmI7ZNI2gav3R3hWWGs8qYkJNmFW9l Xse9nLHcjABBfupsa/ZHMtSYf5lfVmc44tEnNlHBXNJD4x7KuBCdXkF3ecWJJeMAvJ8wLVk26V0yU Dx+SW7fCd7qlRXZZ0NxVASBYJsMRr5YR4TOkcLB8rJaGgnbpVcewjOir/Itwvlj1z3IhAaFcTlRsm mb3cGj1RzIr8q+vxPT0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggrTj-0007kI-Bl; Tue, 08 Jan 2019 13:31:35 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggrTg-0007jg-11 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jan 2019 13:31:33 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x08DVTUu075124; Tue, 8 Jan 2019 07:31:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1546954289; bh=u/6FEYlxM96pwJ1Qm+SkmI5JogO6aWRB2nRQmlpOFAE=; h=From:To:Subject:Date:In-Reply-To:References; b=gMmRvNkgGIPsXslnbXAMXJt9F3y3xSnCzwnd10zH41j3BFIXlDlm+eQ7VyZ5a092w VS4ZeyPskbL+du/fXBpt9iZW1na6aXyBHyLKLgfYqpspp+WNgQExqLGFhRaZRK+PXD m3HvJujol3vGQFJEw99d5YDZCwWVdlSKCX9eQyIk= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x08DVT5i120695 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Jan 2019 07:31:29 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 8 Jan 2019 07:31:27 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Tue, 8 Jan 2019 07:31:27 -0600 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x08DVMuf011668; Tue, 8 Jan 2019 07:31:25 -0600 From: Tero Kristo To: , , , , , , Subject: [PATCH 1/3] dt-bindings: clock: ti, sci-clk: Add support for parsing clock info from DT Date: Tue, 8 Jan 2019 15:30:21 +0200 Message-ID: <1546954223-9738-2-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1546954223-9738-1-git-send-email-t-kristo@ti.com> References: <1546954223-9738-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190108_053132_167595_17020B45 X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP By default, the available clock info is queried from firmware, which can be quite a lengthy operation if there is a very large amount of clocks available. Add option for parsing the used clocks from DT instead, and only register these which can improve the boot time of the device quite a lot. Signed-off-by: Tero Kristo --- Documentation/devicetree/bindings/clock/ti,sci-clk.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/ti,sci-clk.txt b/Documentation/devicetree/bindings/clock/ti,sci-clk.txt index 4e59dc6..c757ae1 100644 --- a/Documentation/devicetree/bindings/clock/ti,sci-clk.txt +++ b/Documentation/devicetree/bindings/clock/ti,sci-clk.txt @@ -18,6 +18,13 @@ Required properties: and clocks IDs for 66AK2G SoC are documented at http://processors.wiki.ti.com/index.php/TISCI#66AK2G02_Data +Optional properties: +------------------- +- ti,scan-clocks-from-dt: Scan clock tree info from DT. By default, + clocks are queried from firmware, which can be rather slow operation, + especially if there is a really large number of clocks available out + of which only a handful are ever used by kernel. + Examples: -------- From patchwork Tue Jan 8 13:30:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 10752029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6BF71399 for ; Tue, 8 Jan 2019 13:32:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D557928D42 for ; Tue, 8 Jan 2019 13:32:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D35AA28D1F; Tue, 8 Jan 2019 13:32:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF0F028D0E for ; Tue, 8 Jan 2019 13:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VRN6cKgqQoskPgeuyjDegaSWKX3KJhOHSu5yIyP3pVM=; b=Mqiqv7vhUZsOtQ 4EkJKu4JRrJqTafBsvCbDyGwvKy1HkSNGGtAF8mUVLSqRaULuLoKxcq7Mt3ILSVIs71+nK5ZTm0zD k5MVodkmeV2EbTC8bPts4vuqP1bnPNOtCrL9TtMzdRGHm0lNBgf+lk2CsWuwTh6NLrSr48fsrKa04 yEleKoI7tN0DCITjhaxZ1AzYq6xNNwm0wFhhj13uihax4DJM8LPGyyYfYH7T+zagHoc7oNFVRrWpF b2egILP1+OdTb5DBpTsrJ9AKHkg9Ow9WSjfGwmeaM0v+8Y38R++yhnxu+vO8PdM/3/qC46wnNlYzA EYBrfyiTQ5Qe9cA1mwBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggrUO-0008Rf-70; Tue, 08 Jan 2019 13:32:16 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggrTl-0007lG-34 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jan 2019 13:31:45 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x08DVYKl070017; Tue, 8 Jan 2019 07:31:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1546954294; bh=KLUDPgiqB2RNqQgymE+6+90cu36gYyuW3rKexeJElss=; h=From:To:Subject:Date:In-Reply-To:References; b=iqCPygxknmCdN6bSCSj8Uoh9A128i0gpGf4cRaEQnNk/a/5GK4l5TfNUCpb0HA51v FgRALXB/HSmHJG6TnZWtfkOkor8h8eceQPQ8kMDDXHmWfV2WDLPY8dbALZcbNZomzx UHgmsrEHTAGHCdTh8WnA3gi27DazHx7g1RbZkSrM= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x08DVX5S120735 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Jan 2019 07:31:34 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 8 Jan 2019 07:31:32 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Tue, 8 Jan 2019 07:31:32 -0600 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x08DVMug011668; Tue, 8 Jan 2019 07:31:28 -0600 From: Tero Kristo To: , , , , , , Subject: [PATCH 2/3] clk: keystone: sci-clk: add support from parsing clock info from DT Date: Tue, 8 Jan 2019 15:30:22 +0200 Message-ID: <1546954223-9738-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1546954223-9738-1-git-send-email-t-kristo@ti.com> References: <1546954223-9738-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190108_053137_664347_E06D4D11 X-CRM114-Status: GOOD ( 20.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the sci-clk driver queries clock data from the firmware, which can be pretty slow operation in certain cases. Add an option for the driver to probe the available clocks from DT also, in this case the number of clocks probed from firmware gets cut down drastically. To enable the feature, a new flag ti,scan-clocks-from-dt can be added under the clock provider node. Signed-off-by: Tero Kristo Tested-by: Andreas Dannenberg --- drivers/clk/keystone/sci-clk.c | 188 ++++++++++++++++++++++++++++++++++------- 1 file changed, 159 insertions(+), 29 deletions(-) diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c index 4cb70be..d1d6dc8 100644 --- a/drivers/clk/keystone/sci-clk.c +++ b/drivers/clk/keystone/sci-clk.c @@ -23,6 +23,7 @@ #include #include #include +#include #define SCI_CLK_SSC_ENABLE BIT(0) #define SCI_CLK_ALLOW_FREQ_CHANGE BIT(1) @@ -52,6 +53,7 @@ struct sci_clk_provider { * @num_parents: Number of parents for this clock * @provider: Master clock provider * @flags: Flags for the clock + * @node: Link for handling clocks probed via DT */ struct sci_clk { struct clk_hw hw; @@ -60,6 +62,7 @@ struct sci_clk { u8 num_parents; struct sci_clk_provider *provider; u8 flags; + struct list_head node; }; #define to_sci_clk(_hw) container_of(_hw, struct sci_clk, hw) @@ -353,6 +356,15 @@ static int _cmp_sci_clk(const void *a, const void *b) return -1; } +static int _cmp_sci_clk_list(void *priv, struct list_head *a, + struct list_head *b) +{ + struct sci_clk *ca = container_of(a, struct sci_clk, node); + struct sci_clk *cb = container_of(b, struct sci_clk, node); + + return _cmp_sci_clk(ca, &cb); +} + /** * sci_clk_get - Xlate function for getting clock handles * @clkspec: device tree clock specifier @@ -404,22 +416,8 @@ static int ti_sci_init_clocks(struct sci_clk_provider *p) }; MODULE_DEVICE_TABLE(of, ti_sci_clk_of_match); -/** - * ti_sci_clk_probe - Probe function for the TI SCI clock driver - * @pdev: platform device pointer to be probed - * - * Probes the TI SCI clock device. Allocates a new clock provider - * and registers this to the common clock framework. Also applies - * any required flags to the identified clocks via clock lists - * supplied from DT. Returns 0 for success, negative error value - * for failure. - */ -static int ti_sci_clk_probe(struct platform_device *pdev) +static int ti_sci_scan_clocks_from_fw(struct sci_clk_provider *provider) { - struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; - struct sci_clk_provider *provider; - const struct ti_sci_handle *handle; int ret; int num_clks = 0; struct sci_clk **clks = NULL; @@ -430,18 +428,7 @@ static int ti_sci_clk_probe(struct platform_device *pdev) int dev_id = 0; u8 num_parents; int gap_size = 0; - - handle = devm_ti_sci_get_handle(dev); - if (IS_ERR(handle)) - return PTR_ERR(handle); - - provider = devm_kzalloc(dev, sizeof(*provider), GFP_KERNEL); - if (!provider) - return -ENOMEM; - - provider->sci = handle; - provider->ops = &handle->ops.clk_ops; - provider->dev = dev; + struct device *dev = provider->dev; while (1) { ret = provider->ops->get_num_parents(provider->sci, dev_id, @@ -502,13 +489,156 @@ static int ti_sci_clk_probe(struct platform_device *pdev) devm_kfree(dev, clks); + return 0; +} + +static int ti_sci_scan_clocks_from_dt(struct sci_clk_provider *provider) +{ + struct device *dev = provider->dev; + struct device_node *np = NULL; + int ret; + int index; + struct of_phandle_args args; + struct list_head clks; + struct sci_clk *sci_clk, *prev; + int num_clks = 0; + int num_parents; + int clk_id; + + INIT_LIST_HEAD(&clks); + + while (1) { + np = of_find_node_with_property(np, "clocks"); + if (!np) + break; + + index = 0; + + do { + ret = of_parse_phandle_with_args(np, "clocks", + "#clock-cells", index, + &args); + if (ret) + break; + + if (args.args_count == 2 && args.np == dev->of_node) { + sci_clk = devm_kzalloc(dev, sizeof(*sci_clk), + GFP_KERNEL); + if (!sci_clk) + return -ENOMEM; + + sci_clk->dev_id = args.args[0]; + sci_clk->clk_id = args.args[1]; + sci_clk->provider = provider; + provider->ops-> + get_num_parents(provider->sci, + sci_clk->dev_id, + sci_clk->clk_id, + &sci_clk->num_parents); + list_add_tail(&sci_clk->node, &clks); + + num_clks++; + + num_parents = sci_clk->num_parents; + if (num_parents == 1) + num_parents = 0; + + clk_id = args.args[1] + 1; + + while (num_parents--) { + sci_clk = devm_kzalloc(dev, + sizeof(*sci_clk), + GFP_KERNEL); + if (!sci_clk) + return -ENOMEM; + sci_clk->dev_id = args.args[0]; + sci_clk->clk_id = clk_id++; + sci_clk->provider = provider; + list_add_tail(&sci_clk->node, &clks); + + num_clks++; + } + } + + index++; + } while (args.np); + } + + list_sort(NULL, &clks, _cmp_sci_clk_list); + + provider->clocks = devm_kmalloc_array(dev, num_clks, sizeof(sci_clk), + GFP_KERNEL); + if (!provider->clocks) + return -ENOMEM; + + num_clks = 0; + prev = NULL; + + list_for_each_entry(sci_clk, &clks, node) { + if (prev && prev->dev_id == sci_clk->dev_id && + prev->clk_id == sci_clk->clk_id) + continue; + + provider->clocks[num_clks++] = sci_clk; + prev = sci_clk; + } + + provider->num_clocks = num_clks; + + return 0; +} + +/** + * ti_sci_clk_probe - Probe function for the TI SCI clock driver + * @pdev: platform device pointer to be probed + * + * Probes the TI SCI clock device. Allocates a new clock provider + * and registers this to the common clock framework. Also applies + * any required flags to the identified clocks via clock lists + * supplied from DT. Returns 0 for success, negative error value + * for failure. + */ +static int ti_sci_clk_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + struct sci_clk_provider *provider; + const struct ti_sci_handle *handle; + int ret; + + handle = devm_ti_sci_get_handle(dev); + if (IS_ERR(handle)) + return PTR_ERR(handle); + + provider = devm_kzalloc(dev, sizeof(*provider), GFP_KERNEL); + if (!provider) + return -ENOMEM; + + provider->sci = handle; + provider->ops = &handle->ops.clk_ops; + provider->dev = dev; + + if (of_property_read_bool(np, "ti,scan-clocks-from-dt")) { + ret = ti_sci_scan_clocks_from_dt(provider); + if (ret) { + dev_err(dev, "scan clocks from DT failed: %d\n", ret); + return ret; + } + } else { + ret = ti_sci_scan_clocks_from_fw(provider); + if (ret) { + dev_err(dev, "scan clocks from FW failed: %d\n", ret); + return ret; + } + } + ret = ti_sci_init_clocks(provider); if (ret) { - pr_err("ti-sci-init-clocks failed.\n"); + dev_err(dev, "init-clocks failed: %d\n", ret); return ret; } - return of_clk_add_hw_provider(np, sci_clk_get, provider); + return of_clk_add_hw_provider(dev->of_node, sci_clk_get, provider); } /** From patchwork Tue Jan 8 13:30:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 10752027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A375B1399 for ; Tue, 8 Jan 2019 13:32:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 928E628D25 for ; Tue, 8 Jan 2019 13:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86E7E28D3B; Tue, 8 Jan 2019 13:32:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5FC728D25 for ; Tue, 8 Jan 2019 13:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VgrSADCtoKGpZgzHmbNDJ5Bb6ABjLVBubzKY45gyqEs=; b=PuC0n2ZW2Yoznj tJwz9LqGPnN+N9isRynoGbfELAtDr6+C6exFB4aQSy1FKhFx5fQOpoK6a6NclEjgr6YkAEz4rbcsj VCYaQgofJqhiBkkCiVu/KO5iB37EltK2TmtaEXVmiiAx5+J2qbAP0ZjaebnAxQsdvnbrOF8ZsCdVr ybVYCgfu6LostlMD9PEpnIPNi0groyjf3GlB5WuiNdmgSH/PUD28IL9S6n3p+g4yxgY1C3N2oh5LS gODiE8LtbiiDu9X/FYErjZuPb4+GgpA/Jjt37LFfCqY6HqVewGfUq56Qr86eBTBDwafC1EGPtgZSX 0QF2CPScUSmt1HBSNx/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggrU9-0008Bz-0k; Tue, 08 Jan 2019 13:32:01 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggrTm-0007n3-H7 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jan 2019 13:31:45 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x08DVa4s030076; Tue, 8 Jan 2019 07:31:36 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1546954296; bh=eAmFgPhGva96tsSGYPDLO5HO50MYtplOHJgyz1RyOhE=; h=From:To:Subject:Date:In-Reply-To:References; b=SL0UsEMn3V89g+/zYOzydPvpgPnVABOFxm/na3R9J9TMEHBk46yF2FbVmFdy2cJA5 1RWV0MxNPa2+0Bc1kuyT7yv3Ar/yJFwKZUgIQDjpkYJUiluVtKqMmSKqrb9g1q1KZz lv9VCLig9P2Rm++AIEQKZaz3yOM+5pEq1J0XFh2s= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x08DVa4S120766 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Jan 2019 07:31:36 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 8 Jan 2019 07:31:34 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Tue, 8 Jan 2019 07:31:34 -0600 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x08DVMuh011668; Tue, 8 Jan 2019 07:31:32 -0600 From: Tero Kristo To: , , , , , , Subject: [PATCH 3/3] clk: keystone: sci-clk: use shorter names for clocks Date: Tue, 8 Jan 2019 15:30:23 +0200 Message-ID: <1546954223-9738-4-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1546954223-9738-1-git-send-email-t-kristo@ti.com> References: <1546954223-9738-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190108_053139_089182_F307255C X-CRM114-Status: GOOD ( 15.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the full device name of the clock provider is used as the initial part of the registered clock name. This is pretty long and completely unnecessary info in generic case, so shorten it up. Now, we only contain the short name of the clock provider node (pOFn.) Signed-off-by: Tero Kristo --- drivers/clk/keystone/sci-clk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c index d1d6dc8..57b7d02 100644 --- a/drivers/clk/keystone/sci-clk.c +++ b/drivers/clk/keystone/sci-clk.c @@ -283,7 +283,7 @@ static int _sci_clk_build(struct sci_clk_provider *provider, int i; int ret = 0; - name = kasprintf(GFP_KERNEL, "%s:%d:%d", dev_name(provider->dev), + name = kasprintf(GFP_KERNEL, "%pOFn:%d:%d", provider->dev->of_node, sci_clk->dev_id, sci_clk->clk_id); init.name = name; @@ -309,8 +309,8 @@ static int _sci_clk_build(struct sci_clk_provider *provider, for (i = 0; i < sci_clk->num_parents; i++) { char *parent_name; - parent_name = kasprintf(GFP_KERNEL, "%s:%d:%d", - dev_name(provider->dev), + parent_name = kasprintf(GFP_KERNEL, "%pOFn:%d:%d", + provider->dev->of_node, sci_clk->dev_id, sci_clk->clk_id + 1 + i); if (!parent_name) {