Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938792AbcKXMRm (ORCPT ); Thu, 24 Nov 2016 07:17:42 -0500 Received: from gloria.sntech.de ([95.129.55.99]:47982 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936406AbcKXMRk (ORCPT ); Thu, 24 Nov 2016 07:17:40 -0500 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Alexander Kochetkov Cc: daniel.lezcano@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH 7/9] clocksource/drivers/rockchip_timer: implement clocksource timer Date: Thu, 24 Nov 2016 13:17:05 +0100 Message-ID: <1800621.EhepfMxccR@diego> User-Agent: KMail/4.14.10 (Linux/4.6.0-1-amd64; KDE/4.14.22; x86_64; ; ) In-Reply-To: References: <1479922177-20136-1-git-send-email-al.kochet@gmail.com> <1479922177-20136-7-git-send-email-al.kochet@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1452 Lines: 34 Am Donnerstag, 24. November 2016, 12:36:20 schrieb Alexander Kochetkov: > > In order to use the patch you have to setup the timer using > > 'rockchip,clocksource' device tree property > > Just came in mind, that it is better to replace 'rockchip,clocksource' > device tree property with KConfig option in order to enable clocksource on > dedicated timer? > > Someting like: > [ ] enable clocksource > clocksource timer name: That would mean recompiling the kernel for a maybe board-specific setting and is definitly not how things are handled these days :-) . I.e. the overall goal is to have one kernel image that can actually run on multiple arm architectures (rockchip, imx, etc) and only gets configured by the devicetree. In your dts-patch you reuse the rk3288-timer compatible value, which is also non-ideal. What you may want to do is introduce a rockchip,rk3188-timer compatible and then make the timer-driver act accordingly, as you then know you are on a rk3188-board ... see drivers attaching specific structs to the of_device_id entries. From the documentation it also shouldn't really matter which timer you use as clocksource, as on the rk3188 it seems all of them act the same way (except timer3 being always on). When touching devicetree-properties, please also adapt the binding document Documentation/devicetree/bindings/timer,rockchip,rk-timer.txt in this case and also include the devicetree maintainers. Heiko