From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFB45C49ED6 for ; Wed, 11 Sep 2019 16:06:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B36C72075C for ; Wed, 11 Sep 2019 16:06:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ShuKoHtS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QWNGM8sN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B36C72075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wcw63Zo/9a65/WEdWXJE7WTHgCmMbeXjvynMY2pa3uQ=; b=ShuKoHtSOuWE5F 3BmuUJ5in1J1a9Qe5GuxXz7SVfOvx6gy3NkmBAqJQn7EAxfWgMsbl/V9FOyTCl9A/5jzXfBkTdOTf j4pte2mm0CwaQTfhtrCVXWFYjYFBb88hiGLronlH2OqKEXlkV72s8ZX1AxGmaqXAsvjeBrTWCdRHt enl5MB3jreVgjrB3+O6C9XKLXeGmxIgc//4voBKAyaRFS+f/FK7DbCEEKjStyoYiehauUsiZKd7CU gSEMoBH5hcbfpNNCYFYlyftW0HPNf4eXHBHdTfXTO5rDzwXL5EYnT6w3XlbeqkDlC3v+jST58Szx1 KrG1fk+En1Fw2vYjzTzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i858R-0002hS-7q; Wed, 11 Sep 2019 16:06:23 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i858J-0002cC-Hj for linux-amlogic@lists.infradead.org; Wed, 11 Sep 2019 16:06:18 +0000 Received: by mail-wm1-x341.google.com with SMTP id t3so144943wmj.1 for ; Wed, 11 Sep 2019 09:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FJJVoiOf8d1fBVlmA2WPx0ovMbhLVMUnVRYpkmmId2Y=; b=QWNGM8sNd2DIqJUVU1OLR1sxZVnOhxhVhHWu6sn3G/HkbQD0a3Uet0ziDi173OygoS WcCdb71vVpMMGSMyODgDg7v3IKgDf+jcLohmqJhvxgRITZz4nTjg9kVPY79Dko6yGRwI 7UB4qyMqR7ARnOknOJewxCb4y85Ikwb+PhhkX+/oC/E4rQZpxLeGuMO8CJ0bYDynNZAm te2Ui37mkNIuuDsWoWjiAyozjSyhLVPQDxNAu4pBSuumnFcQXJUuqopd6dCi8EcH5BuY CIK5/sU5mY617ien2evGACtTIB+KI8R4dlzQ405tx5mrGMqpJZIlUTXC+9Q+34LJuYnC KOCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FJJVoiOf8d1fBVlmA2WPx0ovMbhLVMUnVRYpkmmId2Y=; b=qNkcG+uMSwrFda07q+h3TVTAzy8dyAxGGl9ZeTQ/hryc87cSmRHshhN/GmRW1dNsD3 SZ2BLIru6VNiaIvMVWN30DNpvbmrWHrpLhcMRvcF0yfiL47iRh+cZbpNrBxqGWEdzBCF cNY9EoQOBIzFGpW/EcVHKa1GkZWmeGxrXQTA1ejM2oW1SVmAflgKE+wz+jwk9wIf8xzG TtFmKruXnA6/9s97isKHMPUBMuQwFC4dTFeTKaldGxThu6RkP+tVhODkOlybSM7SMcph A3f37RhW8bC+NF5ySAIIW/1oeSmD0reSV8fYX6KCfG/meYaDRrFeDC6CHJ2gNz1SOcQS 1oRw== X-Gm-Message-State: APjAAAXck/E1W4iecgFhld/CEeAa8TTgjdzi9MPDPQE3lVjGT4JjBgYf IxbcDzeR56HIrMvmoj5chs2/mJut1OZ88DAVNfLguw== X-Google-Smtp-Source: APXvYqxfo4OMflbhF8NmSJjJ2Gu/Ff2Dfhm+/6sbn8+WMGkQs5//gS6kM0XKRfWRoFsRG4rHItMc0Gt2atTI93osxFs= X-Received: by 2002:a1c:7a05:: with SMTP id v5mr4328922wmc.173.1568217973514; Wed, 11 Sep 2019 09:06:13 -0700 (PDT) MIME-Version: 1.0 References: <1568123236-767-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: From: John Stultz Date: Wed, 11 Sep 2019 09:06:01 -0700 Message-ID: Subject: Re: [PATCH 0/7] add support for clocksource/clockevent DT selection To: Claudiu Beznea X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190911_090615_603185_4FDC5FE4 X-CRM114-Status: GOOD ( 21.15 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tmaimon77@gmail.com, Linus Walleij , nsekhar@ti.com, guoren@kernel.org, linux-stm32@st-md-mailman.stormreply.com, =?UTF-8?Q?Heiko_St=C3=BCbner?= , linux-samsung-soc@vger.kernel.org, "open list:ARM/Rockchip SoC..." , Kevin Hilman , Ludovic.Desroches@microchip.com, linux-imx@nxp.com, =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , uclinux-h8-devel@lists.sourceforge.jp, Marc Zyngier , Sascha Hauer , linux-unisoc@lists.infradead.org, =?UTF-8?Q?Krzysztof_Ha=C5=82asa?= , Thomas Gleixner , sbranden@broadcom.com, lkml , Ralf Baechle , Paul Burton , kernel@pengutronix.de, Mark Rutland , Alexandre Belloni , jhogan@kernel.org, palmer@sifive.com, eric@anholt.net, Thierry Reding , Manivannan Sadhasivam , Yoshinori Sato , zhang.lyra@gmail.com, Daniel Lezcano , Jon Hunter , bgolaszewski@baylibre.com, Kukjin Kim , alexandre.torgue@st.com, linux-arm-msm@vger.kernel.org, Sudeep Holla , Florian Fainelli , linux-rpi-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-kernel , baohua@kernel.org, kaloz@openwrt.org, Stephen Boyd , patrice.chotard@st.com, wahrenst@gmx.net, mcoquelin.stm32@gmail.com, Neil Armstrong , linux-tegra@vger.kernel.org, Fabio Estevam , Lorenzo Pieralisi , Benjamin Fair , shc_work@mail.ru, Krzysztof Kozlowski , Nancy Yuen , Chen-Yu Tsai , bcm-kernel-feedback-list@broadcom.com, orsonzhai@gmail.com, linux-snps-arc@lists.infradead.org, rjui@broadcom.com, vz@mleia.com, john@phrozen.org, tali.perry1@gmail.com, avifishman70@gmail.com, Patrick Venture , lftan@altera.com, linux-oxnas@groups.io, Shawn Guo , afaerber@suse.de, Baruch Siach , maxime.ripard@bootlin.com, Liviu Dudau , linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, openbmc@lists.ozlabs.org, Russell King - ARM Linux , Andy Gross , slemieux.tyco@gmail.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , aou@eecs.berkeley.edu, Rob Herring , linux-mediatek@lists.infradead.org, Santosh Shilimkar , Matthias Brugger , Michal Simek , Baolin Wang , vgupta@synopsys.com, Nicolas.Ferre@microchip.com, linux@prisktech.co.nz, nios2-dev@lists.rocketboards.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Tue, Sep 10, 2019 at 11:52 PM wrote: > On 10.09.2019 19:05, John Stultz wrote: > > External E-Mail > > On Tue, Sep 10, 2019 at 6:47 AM Claudiu Beznea > > wrote: > >> > >> This series adds support to permit the selection of clocksource/clockevent > >> via DT. > > > > Sorry about this, but could you try to include more of a rational for > > *why* this would be useful in your cover-letter/commit messages? > > > > Sorry for not being to clear in the cover letter. > > The case I am trying to solve here is as follows: > The timer hardware for which I publish a driver at [1] cannot work at the > same time as a clocksource and clockevent. On some of our platforms we have > more than one such a timer. So we could use one hardware resource as > clocksource and one as clockevent but not one for both. > Due to this, I proposed in the driver at [1] to have 1st probed hardware to > work as clocksource and the 2nd one to work as clockevent. [snip] > Due to this Daniel proposed to have an unified mechanism for this scenario, > see [2], (something like what I proposed in this series), such that to have > a determinism b/w the function that the hardware resources would behave > (either clocksource or clockevent or both). Thanks for the additional explanation! I'd suggest adding something like it to the commit logs for next time. Personally, I tend to think of DT bindings as a big harry ABI, and as such avoid it as much as possible. :) I'd probably favor driver tweaks to ensure the hardware only gets registered once for each, using a minimal DT compatible or flag on the hardware to better describe the underlying hardware quirk that keeps it from being usable for both clocksource and clockevent usage. That way the DT sticks to accurately describing hardware, instead of system/software-abstraction configuration details that just apply for Linux. But, again, I'm not really a DT person, so I'll defer to Rob and Daniel. thanks -john _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic