From patchwork Mon Jun 13 19:04:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 9173969 X-Patchwork-Delegate: sboyd@codeaurora.org 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 987826044F for ; Mon, 13 Jun 2016 19:06:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D0E4252D5 for ; Mon, 13 Jun 2016 19:06:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 820E627BC3; Mon, 13 Jun 2016 19:06:37 +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=-5.9 required=2.0 tests=BAYES_00,FSL_HELO_HOME, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4636E252D5 for ; Mon, 13 Jun 2016 19:06:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423178AbcFMTGd (ORCPT ); Mon, 13 Jun 2016 15:06:33 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:35572 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424227AbcFMTGa (ORCPT ); Mon, 13 Jun 2016 15:06:30 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5DJ69hw022388; Mon, 13 Jun 2016 14:06:09 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5DJ69LL017840; Mon, 13 Jun 2016 14:06:09 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Mon, 13 Jun 2016 14:06:09 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5DJ56T9004255; Mon, 13 Jun 2016 14:06:07 -0500 From: Tero Kristo To: , , , , CC: Subject: [RESEND PATCHv2 21/28] clk: ti: am33xx: fix timer3/6 init time setup for module clocks Date: Mon, 13 Jun 2016 22:04:55 +0300 Message-ID: <1465844702-12200-22-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465844702-12200-1-git-send-email-t-kristo@ti.com> References: <1465844702-12200-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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 43847bc..2343a22 100644 --- a/drivers/clk/ti/clk-33xx.c +++ b/drivers/clk/ti/clk-33xx.c @@ -66,9 +66,15 @@ int __init am33xx_dt_clk_init(void) clk1 = ti_clk_get("sys_clkin_ck"); clk2 = ti_clk_get("timer3_fck"); + if (IS_ERR(clk2)) + clk2 = ti_clk_get("timer3_mod_ck"); + clk_set_parent(clk2, clk1); clk2 = ti_clk_get("timer6_fck"); + if (IS_ERR(clk2)) + clk2 = ti_clk_get("timer6_mod_ck"); + clk_set_parent(clk2, clk1); /* * The On-Chip 32K RC Osc clock is not an accurate clock-source as per