Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp644180img; Fri, 22 Mar 2019 05:48:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxu6tahq2znq9IM21uxdla29KLLPoNLjD1mAOmAhChqPsaweCOzYvgqCaQVcBzdVfe1X8/K X-Received: by 2002:a63:1723:: with SMTP id x35mr8491226pgl.364.1553258911004; Fri, 22 Mar 2019 05:48:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553258910; cv=none; d=google.com; s=arc-20160816; b=AdrOP8X7tazCBQ/G1InSdIZycUwgv0G5x/6TrtYCHhzens2RsttMVg+vz2xl5LBpqg DSPIUSJv5IE1kFBWzzvQj5aQI6tF0bOT7zNvlY/PaEB+TzuKyLU26VfJfQFnt3yAE16B dLyqOuAwKtjo+In/PU8+Yi96hj34N7AVbhIGnwxmXW6xwrvFWOZsOfU5KdF4ZNGqDZhy +z/Hxnt3RnZ5ygAddwVxXnJ1WYlJj+F487wiztAw7al/VLHay77ZHdR7mJUsi0ECK2nX jX2Kge8RtsRJKc4iRshd0dSNnZdvY4+ud1W0GwbemFW4FOED6Rnf1AlUssps8xLMTVhm Zkhw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kgVDghDF8v9B8qwU88Ucj1C+bFZbaHE5iWASM1/SD2k=; b=E9Las1W1y6Ci4Ylhlb7cW+qNGtuit6P7iwkrUmH9QqkUYl1L4IwX67TzYVj+t+tALP V8OFkY7Jyka2oLOncas6WjzLjW6Nj8jBZCDR9EOS2Khz717SzyOtg8YSZblJ6xFP8V2f xTjLBEC7qVRn0qW0scj0fj3h6qZFYI6oHEKp1E0s5a8kGA7pfux+qu+HdXynnYDDCYmT GitJxI0dyhwWvfI7IA6Tw7Ir082EIibFInB4O+rpgz1cyhFkZxuEdhAh9l0rMCOLyzMV RbbMKc/F2yjJNxRk9wqms2HbQPX+qh0e0l0+g4IFhsLkdGX2yk7RvQrJxKDGyenVVdWO vE3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uBJqwTPO; 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 s64si6824589pfb.67.2019.03.22.05.48.13; Fri, 22 Mar 2019 05:48:30 -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=@kernel.org header.s=default header.b=uBJqwTPO; 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 S2387793AbfCVL6P (ORCPT + 99 others); Fri, 22 Mar 2019 07:58:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:34798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387779AbfCVL6M (ORCPT ); Fri, 22 Mar 2019 07:58:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CEC7521939; Fri, 22 Mar 2019 11:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553255891; bh=7VieeIoHCGgo+vw6Zaam26iIruZvmZVmE+n5jqxPOOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uBJqwTPOQ0+MEpYVYhap9N9tyDiM0Xqo9cXzbhlecqJks4HhGyCszZRqGJheyux38 fhWAPKOxuAfYWXlRIpw+vbaTSFi1Qz+0qAwDhZCLKqMkHRulTj3pkrJTc42EQFMt/Y 6PXFpG2QqBKBzo+Ot5zlluWuzGNTxcMad2CaK9aI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bartosz Golaszewski , Daniel Lezcano , "H. Nikolaus Schaller" , Keerthy , Ladislav Michl , Pavel Machek , Sebastian Reichel , Tero Kristo , Thierry Reding , Thomas Gleixner , Andreas Kemnade , Tony Lindgren , Sasha Levin Subject: [PATCH 4.19 028/280] clocksource: timer-ti-dm: Fix pwm dmtimer usage of fck reparenting Date: Fri, 22 Mar 2019 12:13:01 +0100 Message-Id: <20190322111307.876230024@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111306.356185024@linuxfoundation.org> References: <20190322111306.356185024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 983a5a43ec254cd5ddf3254db80ca96e8f8bb2a4 ] 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 Tested-By: Andreas Kemnade Tested-By: H. Nikolaus Schaller Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- 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 index 4cce6b224b87..3ecf84706640 100644 --- 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.19.1