Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753698AbdDFCge (ORCPT ); Wed, 5 Apr 2017 22:36:34 -0400 Received: from mail-bl2nam02on0054.outbound.protection.outlook.com ([104.47.38.54]:45059 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752635AbdDFCgT (ORCPT ); Wed, 5 Apr 2017 22:36:19 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Yuantian Tang To: , CC: , , , Yuantian Tang Subject: [PATCH 2/2] clk: qoriq: add pll clock to clock lookup table Date: Thu, 6 Apr 2017 10:21:23 +0800 Message-ID: <1491445283-13053-2-git-send-email-andy.tang@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1491445283-13053-1-git-send-email-andy.tang@nxp.com> References: <1491445283-13053-1-git-send-email-andy.tang@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131359197763024799;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39410400002)(39400400002)(39860400002)(39380400002)(39850400002)(39840400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(54906002)(53936002)(38730400002)(50986999)(36756003)(6666003)(8656002)(2950100002)(77096006)(105606002)(4326008)(8676002)(106466001)(5660300001)(76176999)(33646002)(189998001)(5003940100001)(104016004)(50226002)(8936002)(81166006)(47776003)(305945005)(356003)(48376002)(50466002)(85426001)(86362001)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB280;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD032;1:J0Ba2kz/L1pgUSYqt6NUwbFzfaHrHH/mkNI+A4rLN8C/4Qzpk1GFil31dsbvcs6D6kpwzmVA/LQPojIIqpBLJKi9Dh9pr6SRTMxDNHvrn2JieIPjeRmPSkdwUYBpA4VqkByaKzlDGMaeynBlvfpmp4e0RVCtqa0moR9+4OSF5KHFsRkDJevCZI6hNA2yPeFcJAY0PT3/C6iCq/ws1h8m7CUnxGysCckkXcc0y+9D40EcqUxPgxrPchwiiwtrs1GoR6iMcvcoYVA1tJbPiPmueXDB9PuNBQCD7XBMPmQdMYXOU2h/9RsSJdFizpjRMPqQ3OGKa5PBjcPIfNrpWZc1Tgo1ikSa0J+4XG3JYdW2xSKQwiJS5W+Evwn7A2PctC/5J/dQ+klAI2l3NX+MOzabKyFUOlHBwmjA/f2r2ZojyjjKm8sDHZI+1reCDEz0UIYq7i8bT3wDyL9o9lkaqYENGEZLj1chI0px1WISxoMsnAE+9Yl9fl2pHZ+9BdLAMf+IOEOrEbDVnl3GoKVcMtvoONjSjjywGW+XUSniitvdV8dDEjB7e7dDHk46uYfKLE6tm0N7OX6XdKGA4U5B3b78tW4JkW0HRTl1Qy4tUG7Fv/KniH5jIJCMvWb0icLkF+hOurgpvnz87Mwq5TT2fD+SZnsO8N45zPuCIiCOgmIVaKU8QWETgf/dm6cHK/fUaL5X+TUYlevK2CxguFJWSvgyUBxxMflVBFco7+v0pkZAcGE= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6e57c075-806a-4f25-2c97-08d47c95b309 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BLUPR03MB280; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;3:bdSgJeYGqCRUfWXEU8Roa1yJLAqd8ziPL2zkv6k0y2bheF6gcNlTnJl/Dx9kpQOrW6ayqlE3LpwjMwgyfotzUMBOzGw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qs5FAVGmBSzxW4pqMN4pPjkPInfxRF6BcBGnH9/o61KLtw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(601004)(2401047)(13015025)(8121501046)(5005006)(13017025)(13023025)(13024025)(13018025)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123563025)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259075)(20161123565025);SRVR:BLUPR03MB280;BCL:0;PCL:0;RULEID:(400006);SRVR:BLUPR03MB280; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;4:ftSV/sYMNB4on+OgIgStIusvHz7oXD/Db7rjCp6dN38vMRN72y1JOq0BrfouDTQpbdPu+0wQ+lqd2OeETCEpNj2sX49UbgfjBPyBuU6u4Op8DsL3dRB4VcFIeayQGzRSN9LF4E3kekWZRzoARAVd0ypx8bFtt3gUhCH6f1LJzfAXMd/wtLIOCqYXKb2Y+DRojhVnjoTWxNqr5Cac0OPoYnwGKaJjGE+PmRfSitscs4k47uzhkCaeB/1sf/RLYhSWdQEssHuvR1vP45G9EnU5E31psMM+8oqNI4eb47b+g/8S8AUmVEPoiZ5HI+lh58FdCeUUFzo8lNxG5QW1dJy+yoAfv5+5qgL6M9ezdsik0t/TQcYSwZUHaPkLa5cK+0zDnV2v3fseDlb2PCsdNRl9hF9UWOTxVfHs4PBO8VRsfko3qFTo7Pd97UNDcKWZX/h3qnbDoy6JkxZg4wZnBa+tQfDdJTc0m8vNk0uRdGmh0LBQHXK5xbVuFIv/czA2E3vvqP/JAzzHYd/jsqlITCuX0CH+CqZ5Y/MtwNMsiq6GzTTwklCHvsP2+4As/APkX+kzrOu/rzySf9mjoV6wPbfYf86rjC5aSyaSzfwI3cGW1gjUWpJs1XMWOEOakWpfyQqYcr7AIDxqcGlzr+RLpzsbLcn/5JKUfu0By5t82/67C/XX1xpUbNMP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z3ew8IAaWwbMR/hH9DFGPWeIBPJclJUeLKfcfbu4tMAoVnXPyiEptCOWJsoB+e6xUsbkUOOg==;5:ITy597+XLa85lNBdtIEHz1js0GmaKgYQ0h7NyZzxXfrpHWpsWqhfZbDhihmzdw7lFBevtmNnRa6cFq4mcVctgP5wlAJcUjcckl+qbutXKHJc21PGeGtwKRDAL7Rql34xMlGMR2TqOEQkTsMFWQmH7LI16jSKjq4LNCWP4OYYT7aXKKQajM13c3ewUar749nd;24:YA71GAmRVAk/LWk+ER1D2GyAdG9aUDXcfY3tHtpGkAg9fmLz2o+gpH22Lg1p2ZS8I4xZ+x0krKlpvN3tPXKuci2EaJ0QZXIkZsh/Mh0SspM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;7:/7gQbAhmwSBwfoTcR9LKY0belF/2EKmY6mqQ/F0NvNKFBZea7ekQJDOxX0MniJTyBqlU1xlmOcEOwRxD3MCoW0cKTSNvbZJyDVlzAquCOeNOuqQy+2a6tQFU7rN+S7Xb0NtstX1f11AtsArar7xmO6H3BlXZwf8tZ5GdMh4pgv9GLhdG++IMBlZ5RaLsRU9v2vRywmrKqA3yHTsTVQYTcPA4FLlthPquhtNSlIWQXJFqiDwCK8n14sDnumFWaTranawxrjf8/c1UQo/VzfDzVlC/Yt3fbwq5rLLR/RaaMeijTXeT4v7r4VdOULAL92t2QPkDckSLDVkIFYzW6a8p5w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2017 02:36:15.9904 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB280 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 43 Register each PLL and its division clocks to clock lookup table to facilitate the clock look up for clock consumer. Signed-off-by: Tang Yuantian --- drivers/clk/clk-qoriq.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 62cf32f..1bb691a 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -1124,6 +1125,7 @@ static void __init create_one_pll(struct clockgen *cg, int idx) for (i = 0; i < ARRAY_SIZE(pll->div); i++) { struct clk *clk; + int ret; snprintf(pll->div[i].name, sizeof(pll->div[i].name), "cg-pll%d-div%d", idx, i + 1); @@ -1137,6 +1139,11 @@ static void __init create_one_pll(struct clockgen *cg, int idx) } pll->div[i].clk = clk; + ret = clk_register_clkdev(clk, pll->div[i].name, NULL); + if (ret != 0) + pr_err("%s: %s: register to lookup table failed %ld\n", + __func__, pll->div[i].name, PTR_ERR(clk)); + } } -- 2.1.0.27.g96db324