From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756034AbbLHNA2 (ORCPT ); Tue, 8 Dec 2015 08:00:28 -0500 Received: from mail-db3on0062.outbound.protection.outlook.com ([157.55.234.62]:13822 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751854AbbLHNA1 (ORCPT ); Tue, 8 Dec 2015 08:00:27 -0500 From: Noam Camus To: Daniel Lezcano , "linux-snps-arc@lists.infradead.org" CC: "linux-kernel@vger.kernel.org" , "Chris Metcalf" , Rob Herring , "Thomas Gleixner" , John Stultz Subject: RE: [PATCH v3 03/18] clocksource: Add NPS400 timers driver Thread-Topic: [PATCH v3 03/18] clocksource: Add NPS400 timers driver Thread-Index: AQHRLDjqFrSZ737A3kOvBnIhoAKa1J66j4yAgAaH7WA= Date: Tue, 8 Dec 2015 13:00:23 +0000 Message-ID: References: <1448974985-11487-1-git-send-email-noamc@ezchip.com> <1448974985-11487-4-git-send-email-noamc@ezchip.com> <56615927.30201@linaro.org> In-Reply-To: <56615927.30201@linaro.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=noamc@ezchip.com; x-originating-ip: [212.179.42.66] x-microsoft-exchange-diagnostics: 1;DB3PR02MB124;5:8d42is9M6bkx8wWDbJrXEk8yZT9nDSGViYn8fu0JzCf+xddD5PjLibi84gzuuOYv8k18pi7WsgRrCCL00/OJI7W/nkLq+yO9eyISje+i/vTPs4AbylprNCeSxSWz3DYxVE5yHP7bmkj0G3srMWCQnw==;24:vuVRUmS2pFRdUowroJL5bUc9lpe9/oecMPSpdcUGRHAMFrzYnXz2GqQNde7IWOXBN1F8hjGrPBIU7SnsG6vfqJOYFfjG0U427tqL4/rvEwQ= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB124; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046);SRVR:DB3PR02MB124;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB124; x-forefront-prvs: 0784C803FD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(189002)(199003)(5001960100002)(81156007)(5002640100001)(87936001)(2950100001)(2900100001)(92566002)(106116001)(97736004)(105586002)(189998001)(66066001)(5001770100001)(101416001)(106356001)(5004730100002)(40100003)(2501003)(33656002)(10400500002)(122556002)(74316001)(77096005)(5008740100001)(102836003)(76576001)(86362001)(1220700001)(6116002)(50986999)(76176999)(3846002)(1096002)(586003)(19580395003)(54356999)(19580405001)(5003600100002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR02MB124;H:DB5PR02MB1141.eurprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2015 13:00:23.7630 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR02MB124 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tB8D12hU016356 From: Daniel Lezcano [mailto:daniel.lezcano@linaro.org] Sent: Friday, December 04, 2015 11:13 AM >It would be cleaner to define a fixed clock and then add a phandle in the DT. > timer_clk: timer_clk { > #clock-cells = <0>; > compatible = "fixed-clock"; > clock-frequency = <123456789>; > }; > timer { > compatible = "ezchip,nps400-timer"; > clocks = <&timer_clk>; > } >That will result in the same code than the other drivers. > clk = of_clk_get(np, 0); > if (IS_ERR(clk)) { > pr_err("%s: invalid clock\n", np->full_name); > return; > } > rate = clk_get_rate(clk); Seem like my driver comes before "fixed-clock" driver so I failed since I got no clocksource provider. How can this be solved? -Noam {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I From mboxrd@z Thu Jan 1 00:00:00 1970 From: noamc@ezchip.com (Noam Camus) Date: Tue, 8 Dec 2015 13:00:23 +0000 Subject: [PATCH v3 03/18] clocksource: Add NPS400 timers driver In-Reply-To: <56615927.30201@linaro.org> References: <1448974985-11487-1-git-send-email-noamc@ezchip.com> <1448974985-11487-4-git-send-email-noamc@ezchip.com> <56615927.30201@linaro.org> List-ID: Message-ID: To: linux-snps-arc@lists.infradead.org From: Daniel Lezcano [mailto:daniel.lezcano@linaro.org] Sent: Friday, December 04, 2015 11:13 AM >It would be cleaner to define a fixed clock and then add a phandle in the DT. > timer_clk: timer_clk { > #clock-cells = <0>; > compatible = "fixed-clock"; > clock-frequency = <123456789>; > }; > timer { > compatible = "ezchip,nps400-timer"; > clocks = <&timer_clk>; > } >That will result in the same code than the other drivers. > clk = of_clk_get(np, 0); > if (IS_ERR(clk)) { > pr_err("%s: invalid clock\n", np->full_name); > return; > } > rate = clk_get_rate(clk); Seem like my driver comes before "fixed-clock" driver so I failed since I got no clocksource provider. How can this be solved? -Noam