Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7693080imu; Tue, 22 Jan 2019 09:59:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5dnp0uyQXsNonzjTN9IGz22NjXW0+nWfb7/GyhVA0EaBR5H/cc54uN5VRJ8Rj/0jowzLrt X-Received: by 2002:a62:4851:: with SMTP id v78mr34565446pfa.97.1548179982289; Tue, 22 Jan 2019 09:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548179982; cv=none; d=google.com; s=arc-20160816; b=VWPyXBbzDPX816FNg6yp3peidwQRmolwGotPWVOH8WQUtzdNgEFjTPXyRUztOQ91UR 7oiE5qG6p090mLcN0Rh2UyB83kqkdzD71ldfUnhqt3ess0J6u3LHS2dzHq5DEb0uaFI8 zbfJNSoVqJ1iaLHeIioZyT5RiMHPiSJIL0OfeCRs/t6O57GstfzQ7wJL7pgWJ8qv9k8j R7eKhmXy66Bgjpe1uLsSRhFMukxHMHWuTUT2heZbkTpjv0GSbehGquud5rLfbgYwH06B nGeG99m1yjq3eyhf1lUuosKIs6Ry+ijGWG2DjjI/1N1QlVGsUdbBVnj8xACHEDsLSCyb D5ww== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aH8OXFD2k2GY1lWy0ZyNja8w7MtU0/acVcwtNYeB5dk=; b=OffDALYhjd2rFW9DAfReVK1O+UfKxnv1a+G/TLNPla+cJKXmLkV3r8dj6V3ZDYDw1r VZhOGGiwdoT6H5WcweG6Buq2XC/8hUJ/PHctNTngzOaqVLJly0BZXWt6+cHom/iHPwum nLMmTrCVtOoIo9HZIaim/m28PGh12RMwPkkUmfTIb+D54eWBUAolchs8cv/qbfnY6Nk/ Tv4jP661xrIK7Okn2W5LME0ymEYi8bua4QNQJqCWS3Dbhod0IiUEILr4hmIB7/tOeGcP FNYiYHVtLLyScPQhgpvuTVsKi7Hbnc8Nh3wnmLt5trNSp0eFN8s9H0RxoyhQ2+rkNupY 2Zyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f35si17045503pgf.449.2019.01.22.09.59.26; Tue, 22 Jan 2019 09:59:42 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726630AbfAVR5b (ORCPT + 99 others); Tue, 22 Jan 2019 12:57:31 -0500 Received: from muru.com ([72.249.23.125]:34700 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbfAVR53 (ORCPT ); Tue, 22 Jan 2019 12:57:29 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id F2B578125; Tue, 22 Jan 2019 17:57:35 +0000 (UTC) From: Tony Lindgren To: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski , Daniel Lezcano , "H . Nikolaus Schaller" , Keerthy , Ladislav Michl , Pavel Machek , Sebastian Reichel , Tero Kristo , Thierry Reding , Thomas Gleixner , Andy Shevchenko Subject: [PATCH 1/3] clocksource: timer-ti-dm: Fix pwm dmtimer usage of fck reparenting Date: Tue, 22 Jan 2019 09:57:15 -0800 Message-Id: <20190122175717.13428-2-tony@atomide.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122175717.13428-1-tony@atomide.com> References: <20190122175717.13428-1-tony@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") moved some omap4 timers to probe with ti-sysc interconnect target module. Turns out this broke pwm-omap-dmtimer where we now try to reparent the clock to itself with the following: omap_dm_timer_of_set_source: failed to set parent With ti-sysc, we can now configure the clock sources in the dts with assigned-clocks and assigned-clock-parents. So we should be able to remove omap_dm_timer_of_set_source with clean-up patches later on. But for now, let's just fix it first by checking if parent and fck are the same and bail out of so. Fixes: 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") Cc: Bartosz Golaszewski Cc: Daniel Lezcano Cc: H. Nikolaus Schaller Cc: Keerthy Cc: Ladislav Michl Cc: Pavel Machek Cc: Sebastian Reichel Cc: Tero Kristo Cc: Thierry Reding Cc: Thomas Gleixner Reported-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren --- drivers/clocksource/timer-ti-dm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -154,6 +154,10 @@ static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer) if (IS_ERR(parent)) return -ENODEV; + /* Bail out if both clocks point to fck */ + if (clk_is_match(parent, timer->fclk)) + return 0; + ret = clk_set_parent(timer->fclk, parent); if (ret < 0) pr_err("%s: failed to set parent\n", __func__); -- 2.20.1