From patchwork Thu Jun 30 14:13:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 9207935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 35C696075A for ; Thu, 30 Jun 2016 14:16:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26AFB2867D for ; Thu, 30 Jun 2016 14:16:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B5F42867E; Thu, 30 Jun 2016 14:16:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9057628682 for ; Thu, 30 Jun 2016 14:16:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIck0-00045T-G4; Thu, 30 Jun 2016 14:14:52 +0000 Received: from bear.ext.ti.com ([198.47.19.11]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIcjY-0003go-Bu for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2016 14:14:25 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5UEE6Ow021826; Thu, 30 Jun 2016 09:14:06 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5UEE6FP004753; Thu, 30 Jun 2016 09:14:06 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 30 Jun 2016 09:14:05 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5UEDnVZ002253; Thu, 30 Jun 2016 09:14:03 -0500 From: Tero Kristo To: , , , , , Subject: [PATCHv3 5/7] clk: ti: am33xx: fix timer3/6 init time setup for module clocks Date: Thu, 30 Jun 2016 17:13:36 +0300 Message-ID: <1467296018-25086-6-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467296018-25086-1-git-send-email-t-kristo@ti.com> References: <1467296018-25086-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160630_071424_604209_5AD9134A X-CRM114-Status: UNSURE ( 6.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP timer*_fck are going to be renamed as timer*_mod_ck:s. Fix the init time configuration of timer3/timer6 to take this into account, and lookup for the module clock in case the lookup for fck fails. Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-33xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c index ef2ec64..c69fed5 100644 --- a/drivers/clk/ti/clk-33xx.c +++ b/drivers/clk/ti/clk-33xx.c @@ -144,9 +144,15 @@ int __init am33xx_dt_clk_init(void) clk1 = clk_get_sys(NULL, "sys_clkin_ck"); clk2 = clk_get_sys(NULL, "timer3_fck"); + if (IS_ERR(clk2)) + clk2 = clk_get_sys(NULL, "timer3_mod_ck"); + clk_set_parent(clk2, clk1); clk2 = clk_get_sys(NULL, "timer6_fck"); + if (IS_ERR(clk2)) + clk2 = clk_get_sys(NULL, "timer6_mod_ck"); + clk_set_parent(clk2, clk1); /* * The On-Chip 32K RC Osc clock is not an accurate clock-source as per