From patchwork Wed Dec 16 01:10:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noam Camus X-Patchwork-Id: 557263 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 09C161402ED for ; Wed, 16 Dec 2015 12:14:50 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a90g4-0000lg-4x; Wed, 16 Dec 2015 01:14:48 +0000 Received: from mail-am1on0058.outbound.protection.outlook.com ([157.56.112.58] helo=emea01-am1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a90g1-0000Ks-TK for linux-snps-arc@lists.infradead.org; Wed, 16 Dec 2015 01:14:46 +0000 Received: from HE1PR02CA0012.eurprd02.prod.outlook.com (10.162.33.22) by DB5PR02MB1208.eurprd02.prod.outlook.com (10.162.163.30) with Microsoft SMTP Server (TLS) id 15.1.355.16; Wed, 16 Dec 2015 01:14:22 +0000 Received: from DB3FFO11OLC001.protection.gbl (2a01:111:f400:7e04::117) by HE1PR02CA0012.outlook.office365.com (2a01:111:e400:5149::22) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Wed, 16 Dec 2015 01:14:22 +0000 Authentication-Results: spf=fail (sender IP is 212.179.42.66) smtp.mailfrom=ezchip.com; linaro.org; dkim=none (message not signed) header.d=none; linaro.org; dmarc=none action=none header.from=ezchip.com; Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 212.179.42.66 as permitted sender) receiver=protection.outlook.com; client-ip=212.179.42.66; helo=ezex10.ezchip.com; Received: from ezex10.ezchip.com (212.179.42.66) by DB3FFO11OLC001.mail.protection.outlook.com (10.47.217.129) with Microsoft SMTP Server (TLS) id 15.1.346.13 via Frontend Transport; Wed, 16 Dec 2015 01:14:22 +0000 Received: from localhost.localdomain (10.1.3.132) by ezex10.ezchip.com (10.1.1.4) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 16 Dec 2015 03:14:07 +0200 From: Noam Camus To: Subject: [PATCH v4 10/19] ARC: Add clock from device tree to time_init() Date: Wed, 16 Dec 2015 03:10:29 +0200 Message-ID: <1450228238-4499-11-git-send-email-noamc@ezchip.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1450228238-4499-1-git-send-email-noamc@ezchip.com> References: <1450228238-4499-1-git-send-email-noamc@ezchip.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-22004.003 X-TM-AS-Result: No--7.085200-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11OLC001; 1:TCeC1F30wDQJuDQ1gVnsq98Bm+OdDlK6eX2AP2w68YdgQzzyT2XCSuvUNg0P5PfK5gSQmTC38GlwTEmzy+DwYdhrSeyfPIwZSXoIIcCctDQ6fmmDtp9cX1+90puVI7SJzucmj/tKJVaFPjawjikI7LSeEEbLiWmMDpZD6jWV8RP60XpvDszCUq374SZUTzUg1M/goGsa8QUUi6hUub9Tt1HxqIUMZnINhOVXCxQVadbGYJYoQmbX5IDDQSK74sU9GBKBYrXI1EjRqv+ozkD7PqHkeFh1LUNo1zvVxVyYk9e5j+s468g0hWxJVgmnf9tLyuvESPYVVFz61WCrXBBNrMmAXfgAvG+YrcDkrmyvDSQ2cnfCEy/b5cDDGLlGZ6alvxoFrKMcqysBQPlWoqgFVQ== X-Forefront-Antispam-Report: CIP:212.179.42.66; CTRY:IL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(50226001)(19580395003)(49486002)(92566002)(2950100001)(77096005)(19580405001)(86362001)(5003940100001)(85426001)(586003)(87936001)(1096002)(47776003)(36756003)(229853001)(105606002)(104016004)(5001970100001)(106466001)(50466002)(107886002)(5008740100001)(4001430100002)(48376002)(110136002)(50986999)(33646002)(76176999)(1220700001)(189998001)(6806005)(11100500001)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR02MB1208; H:ezex10.ezchip.com; FPR:; SPF:Fail; PTR:ezmail.ezchip.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5PR02MB1208; 2:+dLKOrWLNuhtKf8QOnO2qK6BPRX1h2cKDpBV1PsJBdm+l5OlY6ipwOQWBOMdpIGQSrdrXcU2pvo/2vHCrD21nBCUQj+oyQK3HZJuUbguwhDd/FF/cTayU7ukEEScuTnlu4c3zr5Oswxb5ajdB2xbQA==; 3:R9zBYodLI+uVWHG15s5KSrQsVvEFtjAU4gSjtlcTPi2gIFNMQyYakbAsoqyqfU4lVtbqqMplbnuL/mgKKaeYpEBJXTIjzqljg6m3/aZNJIkv8uAJMG1we2/IWQcOKaGEeiTRDQACcWebTXEnRaWb2M9L82+1P6cAUHKAZJ+ZuU6mWtaTjzGuDHCHLqhNZC8kYAFFSVar3lxrgRB1p9vLDe5PKWX9cB7rAxwol87BTi0=; 25:2iIvQlv8R6iOpqt506xFSQvtZS4A6K84OVlCsENvcRl+elbcMOwLNRGXW+dL+AVwnoy5O3lEJO7vZnangn1tUzct61dVItgz2NXhb2069afJDEJQdWjSAKLJzQnolJ4rJSwbhR1DSTsUY6ykvsc1GoXLRQOAUQJ+21CEX/8kI7TVe/y3lSDktplXsd7fewYj4NLX7hp6K3ob2fcFn3mNEJUWd6THXBj1/pc+ACJEBARqqFc/sMqriG3Geks6OKWm5Sg4VVe2h4kfUXFhTakO3Q==; 20:g79eKhUcmZvy3VDQ4UkLtRAYlkLxHeLvhTdjKIc1ml+9+o0pGucYMzGpCgHV8Ga0GvNkUX/umivlYd+aSLpFYV2HpCVEbvjAnP00SLnMgcXRprFuTj3J/hok5jcxyBye7mdpvjVD0PpnzgigHo58KPaODhFL5p7M90vrpxdPZn0= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR02MB1208; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046); SRVR:DB5PR02MB1208; BCL:0; PCL:0; RULEID:; SRVR:DB5PR02MB1208; X-Microsoft-Exchange-Diagnostics: 1; DB5PR02MB1208; 4:fg2pdZJjWOrq5N9diBVF3BzfAmsEZXZydqGI2aUkUvipdi5Bf9t8UAcDxSjBX5Zp+sO+C4t1Np1UIpZpvo5ezO0UDHqdznCvBL7PWUbTLoG5oN6BLPxQ1wZPjNkca67GRyeLRqd3heQ8BV6TQ9p0yGRMXHzBcVFgQQmGpKUmyZxOvYKV5zDpwGnT+VQ+KAY6yck1m3+5cG26v9Em6guRkAvF1JzZGMbGnsl72osGH8eJ+7kZ82JNNYptHaMhkIHYq+MTiHX37HQ5cL15v04cNB8Z8FNGQ72CkCWkWORkrEY1PNqcx6yTHKvwoYpP1a0/B8dPUy/dxI/sZqj2Y0UF3fbDNbY6tBEXaVhNsZYM++PyAcHOCVy3kfgN6DGuSSoAyMpNZVaxW6qLlwbFOWYUYN1eNTnzegUHi7VA+69BuJ+P56LqxhF8WMpXxTlqbs9E X-Forefront-PRVS: 0792DBEAD0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR02MB1208; 23:uN1DoI5KtEWiAS+ieUd66Co6uOXLRRD4dHyuBZM9d?= =?us-ascii?Q?ed05yc/eS1xXMaiYbo1pZlsbLYnTvWixDpsyYaNJ+PYbVdFL/QDfpmefQ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Qn34cfdkqf97rd+m+QY8zUd9sY9?= =?us-ascii?Q?NWWKXaP1KBgKHTPGPhGaC0NRSy0DEBvbORysTKj+U/TqPcfkTAxk9aXPs24K?= =?us-ascii?Q?GXpbmXLK2vie4zGrzQICwfvRVVkHCnhSO/q5iudfOkfnpTYtw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB5PR02MB1208; 5:bZSbKm/ICbeNxRBatCTkmoouA+ZPKBT2iUzWkf913/fzT6vG+ZvPrIdprD7Ok2r6rEWAx5/65bQU5wFmQSNTtVzbCgZufoxQloi1NBZyRWkIUtGr9GLw0/vFcwflzrT9CmIgwv4jONEJ5t2IJi8tOw==; 24:YUb21ZkvJNuOJkiCVraxXYfFdNPcm30gWGwppkjpLP0moBc5LD3ed4NV2X3b0yiuUHxPR7PHTTeUSI7WcdzB6XHeATC6ty3kdzjWou2csYs= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2015 01:14:22.2860 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3; Ip=[212.179.42.66]; Helo=[ezex10.ezchip.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR02MB1208 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151215_171446_422219_DA8EE08B X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [157.56.112.58 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [157.56.112.58 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cmetcalf@ezchip.com, daniel.lezcano@linaro.org, Noam Camus , linux-kernel@vger.kernel.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Noam Camus External clock source can be used if included by one of DTS file of a chosen platform. Clocksource may be depend on some clk from DTS as the real source of this clock. Signed-off-by: Noam Camus Acked-by: Vineet Gupta --- arch/arc/kernel/time.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c index dfad287..8b9acf3 100644 --- a/arch/arc/kernel/time.c +++ b/arch/arc/kernel/time.c @@ -29,6 +29,8 @@ * which however is currently broken */ +#include +#include #include #include #include @@ -38,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -283,6 +284,13 @@ void __init time_init(void) */ clocksource_register_hz(&arc_counter, arc_get_core_freq()); +#ifdef CONFIG_COMMON_CLK + of_clk_init(NULL); +#endif +#ifdef CONFIG_CLKSRC_OF + clocksource_probe(); +#endif + /* sets up the periodic event timer */ arc_local_timer_setup(); }