Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751049AbdLMW6O (ORCPT ); Wed, 13 Dec 2017 17:58:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:59618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbdLMW6M (ORCPT ); Wed, 13 Dec 2017 17:58:12 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20619218D1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org X-Google-Smtp-Source: ACJfBotRn/ch9EJxr54aIYN1MHHF66C+H5BC62okkvQeyT4kFLOWqrR3cpbVRu/E8ywu1N3p/55ug8vq643QAkowguM= MIME-Version: 1.0 In-Reply-To: <20171213185313.20017-2-alexandre.belloni@free-electrons.com> References: <20171213185313.20017-1-alexandre.belloni@free-electrons.com> <20171213185313.20017-2-alexandre.belloni@free-electrons.com> From: Rob Herring Date: Wed, 13 Dec 2017 16:57:50 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] dt-bindings: chosen: Add clocksource and clockevent selection To: Alexandre Belloni Cc: Daniel Lezcano , Nicolas Ferre , Mark Rutland , Thomas Gleixner , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1413 Lines: 32 On Wed, Dec 13, 2017 at 12:53 PM, Alexandre Belloni wrote: > The clocksource and clockevent timer are probed early in the boot process. > At that time it is difficult for linux to know whether a particular timer > can be used as the clocksource or the clockevent or by another driver, > especially when they are all identical or have similar features. If all identical, then it shouldn't matter. "similar" means some difference. Describe those differences. > Until now, multiple strategies have been used to solve that: > - use Kconfig option as MXC_USE_EPIT or ATMEL_TCB_CLKSRC_BLOCK Compile time probably means only one option is really used. > - use a kernel parameter as the "clocksource" early_param in mach-omap2 Yeah, OMAP was one of the previous times this came up and also attempted something like this. This parameter predates selecting timers based on features described in DT. Look at commit 2eb03937df3ebc (ARM: OMAP3: Update clocksource timer selection). > - registering the first seen timer as a clockevent and the second one as > a clocksource as in rk_timer_init or dw_apb_timer_init > > Add a linux,clocksource and a linux,clockevent node in chosen with a timer > property pointing to the timer to use. Other properties, like the targeted > precision may be added later. Open ended expansion of this does not help convince me it is needed. Rob