Received: by 10.192.165.148 with SMTP id m20csp103320imm; Thu, 26 Apr 2018 17:00:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqMvu8qAyn0RA3CISHPwfjX7Ac4zmLQNRp2ZySTqhGbqyiyTNtQH079inlMm2yk/XurT3mU X-Received: by 2002:a17:902:bc48:: with SMTP id t8-v6mr103148plz.133.1524787244784; Thu, 26 Apr 2018 17:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524787244; cv=none; d=google.com; s=arc-20160816; b=C+EGzxlri6f4/EaJ9xzJdiPnqfbPgM5qVYfFdHwBCPYPIYTrqtmhokfBbjmeEwsMdA jYbtWcadAsYIFLPuubW2YcDhOO1XtGjX6rw1nAUCSEbktvuLtIsNEi1IELoUeeFvVsfN UaKipYurIprMrQ9gPzMZi7xmlagJkAKCQDpG+ay8joFfkUgjtM1f0O5x/s1LO23QwLYL GB3RGGc/17a47qPuw74Smon28TTn/TxeU+Ht6mPLPLOVJEeMUgUDdQ+BDraZuuxZ0oVM XMiLboYcl/3aGgCin7vqAvvCmg2Lqh8AP8SgJ8N+802zm8TfCCkEVuuoS6cc6MQSlbSY 8Kwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LG5gNuVPlG35naIdcfMfx0bncq+CZT9XZE7OYxjtMro=; b=GTmx3jjhDhKC9T59Zs1T3C73zqP+ckfuKleZTismYaIFJqcx6z7p+2Rgp4+F3YQjtS QQTqA4unCqdwUZHhYQaAdjoG2D765CFUfoDXNU3xNsBBKDGE+FrSAltkHqQDfk+mH2nV 5W9J1Qj2985X+hyQ/hplM0YqG1tujKlU2aaC8oHK36ZUtZqIZol0K0L3cBJD2EWwnp+1 KCExDboS6FkTmnAH/DIRT1GVSyErrxdr2Q8sVLS/ZBkzfOfU3fecpbInjhgoylafW2Vs fAoTGAFK0hIw6Er4SEE0DU54EMk3HLU+K3isc+hkVhVBluGlSDaRGphDKOFOKEWzazm7 OeEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dmlZ7fnw; 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 v11-v6si32993pgo.643.2018.04.26.17.00.30; Thu, 26 Apr 2018 17:00:44 -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=dmlZ7fnw; 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 S1757214AbeDZX7B (ORCPT + 99 others); Thu, 26 Apr 2018 19:59:01 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:39312 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780AbeDZX65 (ORCPT ); Thu, 26 Apr 2018 19:58:57 -0400 Received: by mail-lf0-f67.google.com with SMTP id j193-v6so141470lfg.6; Thu, 26 Apr 2018 16:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LG5gNuVPlG35naIdcfMfx0bncq+CZT9XZE7OYxjtMro=; b=dmlZ7fnwNVAd1wIELFTyzOna6fsHOKEJjImzhmSPPpRoYBK/peUU/1uB/UJ7vAjk8t +0odtUCq76A8Il3Filyu8MkRoqpW6m52qjAo72IzLHf+8XLLL0lCd4HrgsVZblNFWZ2P wrFvq0MNHXZAdJGHQ8bjWWc8hveaDUBBBxELdrN7w85sDkovwtdzB//xnUuDxKUv5ESc UWTYDtUaHTEFPj4pY2tjXxVXJcSsU/u4okLAhph9Ym+xpD8tlvY1932NayHPSGADSGzz Qvpl9AiePEddfwPmH8kI4VR4Jm8kWI79ydrFA6XkS8Zk6FSRgiRPAomAkCJaba6NEuW7 dp4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LG5gNuVPlG35naIdcfMfx0bncq+CZT9XZE7OYxjtMro=; b=V6a9yqabD4t3AWh43lsQM0FpvoEJXqd+75jM49o8QOzLzpIiQFob81Npq9tZxNb8Is M/KQbBMHNlCHWmSKykQooDhYlu7h1oToxGunY0wy66O7TPa6xExwI8WEkikcwbTGteIR 8ruKM1cEgRpMD4UpAfWCtGF9BPTuTNRiqmMIDvTSUUGl0Y1gJ6IyC11ppyBEVrwhLMyQ ECK/hWjzV/6f+dPnwKkT58O55HxJSFEzKes6nrQZitCtetIlgXdmb30yQ654gisKhecH AFvMv7MyutO2BQkM4ZHCg53IDhtDjBcfJ36y7snAvEx5E1U0mx05yOQypWEcdWa6Fs0h fiSQ== X-Gm-Message-State: ALQs6tDCne3Hr84XRES1qZvx0wX3fM9mF6SqFENjaBU/pjS9TNd14bSl 3uXA/tNJHxKfAPUvKO45YTc= X-Received: by 2002:a2e:700c:: with SMTP id l12-v6mr70868ljc.68.1524787135529; Thu, 26 Apr 2018 16:58:55 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-130.pppoe.spdop.ru. [109.252.91.130]) by smtp.gmail.com with ESMTPSA id o4-v6sm7420ljh.39.2018.04.26.16.58.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 16:58:54 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Prashant Gaikwad , Stephen Boyd , Michael Turquette , Linus Walleij , Marcel Ziswiler , Marc Dietrich Cc: linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/4] clk: tegra20: Add DEV1/DEV2 OSC dividers Date: Fri, 27 Apr 2018 02:58:15 +0300 Message-Id: <20180426235818.10018-2-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180426235818.10018-1-digetx@gmail.com> References: <20180426235818.10018-1-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, + 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, + 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, -- 2.17.0