Received: by 10.192.165.148 with SMTP id m20csp682555imm; Fri, 27 Apr 2018 05:56:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZocogAdRhfdR6cHKQlV5KFdN9mpJ3fIWQiNuOdRuXlrr2Wq2RoH2aH5zR8dk/9+5JCXdFw8 X-Received: by 10.98.190.2 with SMTP id l2mr2159475pff.224.1524833774519; Fri, 27 Apr 2018 05:56:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524833774; cv=none; d=google.com; s=arc-20160816; b=i7INCZ3zetJKfRLPXfHX3aP0ulKHD07I+xoeqoeg3Gv5fH4u+xdvqRF4WUZ0zVGJLk q9kCo8COvMEuwkQvYFZtu/+5SagEgvxmzKmnh7moVg3xSRns+uWKk64seThXtBRnCWg3 ck2ximln6lI87rbpI1Faf/uyDfARpkadu3jbAeM5djgtg7L9RY0nsFqyV2Edr+n7JI// CQ2U3UkVqDICn1cdVWPa9nuA3ZluK29meRR6/tEZHA5jW+KXPMM7ixp/iEtzVQ0RRZUV fGcejnK7FjGACutnre1bUCrsxUvAhFOUfqcRchR0e0BaAzCnQFUBJoz/qwjNPGZu8N+R nNYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=WNbqB79HDKYEVxZvg+ppsCuyO0oU+NNua1hGa3sQZ1s=; b=qjsROIV9+IIAJNYyH+yDw5C6f3W4gjcz8keEOODr9N4LyK3JHocq+4IOFc4O/FLB/T o0vyICiBSVuHnhUrFh16in4cLZKmDawmL559sA7h7mA6//WJ8D7J1Fn9BU9epyrdAjx0 iyXJTi/GOLMp4pB5mokRoR4G7nqVsXSZRVGralWtmW+3CXiYCjSY5bxyps/RFVUd734Y Tpprvns/l5bVyzHzJnilv7rXmM8UUyEYjI2Dy1RTAimgG37K1xgHU1BzVhQZrQ9nxOqB O+pLBE4tHQPlFPSuxYY7CPSG6Q56GAAUPdenq4xa8IVnweHqtf9GtDr0tZVA0eJtlTOm g/jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Rwy1E+B4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14-v6si1185754pgu.612.2018.04.27.05.55.59; Fri, 27 Apr 2018 05:56:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Rwy1E+B4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932265AbeD0Myv (ORCPT + 99 others); Fri, 27 Apr 2018 08:54:51 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:42918 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757241AbeD0Mys (ORCPT ); Fri, 27 Apr 2018 08:54:48 -0400 Received: by mail-lf0-f66.google.com with SMTP id u21-v6so2538541lfu.9; Fri, 27 Apr 2018 05:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WNbqB79HDKYEVxZvg+ppsCuyO0oU+NNua1hGa3sQZ1s=; b=Rwy1E+B4q4/H46T8G9KWLtUH4Bd9+05RCsAvvSQ7np/7KnaBdd08Uin62kyd4+6XEc 1pxjJOGTArg81tsLGbW7n1oywsGcbdF24dRmsGTKGZvhNrFuSzZ/OZBchNGQrBDhm+EF s9BWCiEkMwie03JydkLV6e3+ZWtrMrlV6zOLSYy5ggv5IWnw+mj96iIetY4zG+/okHk2 zgDVsGzOX+IiGy2BphdD3vrok3U3W/ySkEDDLPbnuaqtXflG3YTdwJRQMuyVMrTzjjjU 6ODxtfIsIBTjJdv+jaSxxV6q+QPVERUhaEi83P0ENSSisCgKwRjtVUfpWJLtcDkS59uT PFdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=WNbqB79HDKYEVxZvg+ppsCuyO0oU+NNua1hGa3sQZ1s=; b=WpY4/zCGDJ9Wj+X4fRjWC5mdfX0zEZ2TZo28E3hgJLDX/eAeJxzpdUEfQjBragCwlT ero9JXPhtN13SKsvoXvn/F+9oCeVqp6N3Wrnzx//90zp/hu5Zuf5NfMIld3BJyh/N9AN koyNDAFt2KD03sM5xq8fw4oExw63BY9rCeaTfakOI7xr7OpdgLyJGbJWagSCuW/9b1CH rSa6Mjpwj8wjGiNFBkw4BWF9jUFzcZ0Y+bfpm2RSBDURagsfWbPaeMgtJFVsCh4+knln 1diCx4zF5ZllUmX/2Md6bZw/pCTKQciuT1lLx7YiCiBqdJ4EgZffXYMF6YaHDp1voU1O T0gg== X-Gm-Message-State: ALQs6tCh0cMghmuDBF4tBZyF/iEEqIzQcsyyLvuVKweYLFUxwEdlZjJ3 eqtKzrd5m/wBMOAbGwvN3S1R6xiX X-Received: by 2002:a2e:96d2:: with SMTP id d18-v6mr1615144ljj.21.1524833685935; Fri, 27 Apr 2018 05:54:45 -0700 (PDT) Received: from [192.168.1.145] (ppp109-252-91-130.pppoe.spdop.ru. [109.252.91.130]) by smtp.googlemail.com with ESMTPSA id a189-v6sm256580lfb.12.2018.04.27.05.54.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Apr 2018 05:54:45 -0700 (PDT) Subject: Re: [PATCH v1 1/4] clk: tegra20: Add DEV1/DEV2 OSC dividers To: Marcel Ziswiler , Thierry Reding , Jonathan Hunter , Peter De Schrijver , Prashant Gaikwad , Stephen Boyd , Michael Turquette , Linus Walleij , Marc Dietrich Cc: linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180426235818.10018-1-digetx@gmail.com> <20180426235818.10018-2-digetx@gmail.com> <1524832404.6979.9.camel@ziswiler.com> From: Dmitry Osipenko Openpgp: preference=signencrypt Autocrypt: addr=digetx@gmail.com; prefer-encrypt=mutual; keydata= xsBNBFpX5TwBCADQhg+lBnTunWSPbP5I+rM9q6EKPm5fu2RbqyVAh/W3fRvLyghdb58Yrmjm KpDYUhBIZvAQoFLEL1IPAgJBtmPvemO1XUGPxfYNh/3BlcDFBAgERrI3BfA/6pk7SAFn8u84 p+J1TW4rrPYcusfs44abJrn8CH0GZKt2AZIsGbGQ79O2HHXKHr9V95ZEPWH5AR0UtL6wxg6o O56UNG3rIzSL5getRDQW3yCtjcqM44mz6GPhSE2sxNgqureAbnzvr4/93ndOHtQUXPzzTrYB z/WqLGhPdx5Ouzn0Q0kSVCQiqeExlcQ7i7aKRRrELz/5/IXbCo2O+53twlX8xOps9iMfABEB AAHNIkRtaXRyeSBPc2lwZW5rbyA8ZGlnZXR4QGdtYWlsLmNvbT7CwJQEEwEIAD4WIQSczHcO 3uc4K1eb3yvTNNaPsNRzvAUCWlflPAIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIX gAAKCRDTNNaPsNRzvFjTCACqAh1M9/YPq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VWyiJ/t9JHT4S5mdyLfcKm7ddc9 Message-ID: Date: Fri, 27 Apr 2018 15:54:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524832404.6979.9.camel@ziswiler.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel, On 27.04.2018 15:33, Ziswiler wrote: > Hi Dmitry > > Isn't the CLK_RST_CONTROLLER_MISC_CLK_ENB_0 the other way around e.g. > DEV1_OSC_DIV_SEL at bit 23:22 and DEV2_OSC_DIV_SEL at 21:20? > > On Fri, 2018-04-27 at 02:58 +0300, Dmitry Osipenko wrote: >> CDEV1/CDEV2 clocks could have corresponding oscillator clock divider >> as >> a parent. Add these dividers in order to be able to provide that >> parent >> option. >> >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/clk/tegra/clk-tegra20.c | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk- >> tegra20.c >> index 0ee56dd04cec..16cf4108f2ff 100644 >> --- a/drivers/clk/tegra/clk-tegra20.c >> +++ b/drivers/clk/tegra/clk-tegra20.c >> @@ -26,6 +26,8 @@ >> #include "clk.h" >> #include "clk-id.h" >> >> +#define MISC_CLK_ENB 0x48 >> + >> #define OSC_CTRL 0x50 >> #define OSC_CTRL_OSC_FREQ_MASK (3<<30) >> #define OSC_CTRL_OSC_FREQ_13MHZ (0<<30) >> @@ -831,6 +833,16 @@ static void __init tegra20_periph_clk_init(void) >> periph_clk_enb_refcnt); >> clks[TEGRA20_CLK_PEX] = clk; >> >> + /* cdev1 OSC divider */ >> + clk_register_divider(NULL, "cdev1_osc_div", "clk_m", >> + 0, clk_base + MISC_CLK_ENB, 20, 2, > > So it would be: > > + 0, clk_base + MISC_CLK_ENB, 22, 2, > >> + CLK_DIVIDER_POWER_OF_TWO, NULL); >> + >> + /* cdev2 OSC divider */ >> + clk_register_divider(NULL, "cdev2_osc_div", "clk_m", >> + 0, clk_base + MISC_CLK_ENB, 22, 2, > > And: > > + 0, clk_base + MISC_CLK_ENB, 20, 2, > >> + CLK_DIVIDER_POWER_OF_TWO, NULL); >> + >> /* cdev1 */ >> clk = clk_register_fixed_rate(NULL, "cdev1_fixed", NULL, 0, >> 26000000); >> clk = tegra_clk_register_periph_gate("cdev1", "cdev1_fixed", >> 0, Indeed, good catch! I'll wait for more comments and then re-spin patchset with the fix. Thank you.