From patchwork Tue Oct 25 12:34:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 79167 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp3087886qge; Tue, 25 Oct 2016 05:35:26 -0700 (PDT) X-Received: by 10.98.198.132 with SMTP id x4mr39390574pfk.23.1477398926897; Tue, 25 Oct 2016 05:35:26 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 75si20482004pfa.10.2016.10.25.05.35.26; Tue, 25 Oct 2016 05:35:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754077AbcJYMfZ (ORCPT + 4 others); Tue, 25 Oct 2016 08:35:25 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:33698 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753881AbcJYMfY (ORCPT ); Tue, 25 Oct 2016 08:35:24 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OFL009MKSAWIR60@mailout4.w1.samsung.com>; Tue, 25 Oct 2016 13:35:21 +0100 (BST) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161025123520eucas1p27268432803cd81bdfb940c23be08b272~Axn2WjiEN3075130751eucas1p2t; Tue, 25 Oct 2016 12:35:20 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 57.04.19540.8815F085; Tue, 25 Oct 2016 13:35:20 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161025123519eucas1p1f8d2efba82ebd101e8fa0697a5708a28~Axn1qPqei3221532215eucas1p1s; Tue, 25 Oct 2016 12:35:19 +0000 (GMT) X-AuditID: cbfec7f5-f79ce6d000004c54-ed-580f5188f94d Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 0E.8A.07726.B715F085; Tue, 25 Oct 2016 13:35:07 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OFL00KZ0SAP5S00@eusync3.samsung.com>; Tue, 25 Oct 2016 13:35:19 +0100 (BST) From: Marek Szyprowski To: linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Stephen Boyd , Michael Turquette , Sylwester Nawrocki , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas Subject: [PATCH] clk/samsung: Clear OF_POPULATED flag from clkout node in init callback Date: Tue, 25 Oct 2016 14:34:21 +0200 Message-id: <1477398861-2270-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLIsWRmVeSWpSXmKPExsWy7djPc7odgfwRBo8+8lhsnLGe1eL6l+es Fm/ermGyOH9+A7vFx557rBYzzu9jslh75C67xcVTrhaH37SzWvw4083iwOXx/kYru8flvl4m j02rOtk8tvTfZffo27KK0ePzJrkAtigum5TUnMyy1CJ9uwSujH/r21gLXvBW/GgLamA8w93F yMkhIWAicX1dMxOELSZx4d56ti5GLg4hgaWMEn/3T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Th6bzDqBkXsB I8MqRpHU0uLc9NxiQ73ixNzi0rx0veT83E2MwADeduzn5h2MlzYGH2IU4GBU4uFdocsXIcSa WFZcmXuIUYKDWUmEt9SHP0KINyWxsiq1KD++qDQntfgQoynQ8onMUqLJ+cDoyiuJNzQxNLc0 NDK2sDA3MlIS5y35cCVcSCA9sSQ1OzW1ILUIpo+Jg1OqgbFHo3zthUOXvbUKBfNqSq7euq5n q777vPfkrd7B2yLO3v1Y++JEm/i+T3WCsds7Ftgre7h7z59k9F/2Stv/6V9KG7XOvJy4tD47 4eaGHaZmskLhc67bC7zK/eZf33bqaonpef6fErYn1odzdm+9c3Tub4XT4uq8ZXP5e248O+N9 /Ov0a+JbDJcrsRRnJBpqMRcVJwIAPy6wpXYCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161025123519eucas1p1f8d2efba82ebd101e8fa0697a5708a28 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161025123519eucas1p1f8d2efba82ebd101e8fa0697a5708a28 X-RootMTR: 20161025123519eucas1p1f8d2efba82ebd101e8fa0697a5708a28 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The Exynos PMU node is an interrupt, clock and PMU (Power Management Unit) controller, and these functionalities are supported by different drivers that matches the same compatible strings. Since commit 989eafd0b609 ("clk: core: Avoid double initialization of clocks") the OF core flags clock controllers registered with the CLK_OF_DECLARE() macro as OF_POPULATED, so platform devices with the same compatible string as the interrupt controller will not be registered. This prevents the PMU platform device to be registered so the Exynos PMU driver is never probed. This breaks (among other things) Suspend-to-RAM. Fix this by clearing the OF_POPULATED flag in the clkout driver init callback, to allow the Exynos PMU platform driver to be probed. The patch is based on similar patch from Javier Martinez Canillas: b030485220ca "ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback". Fixes: 989eafd0b609 ("clk: core: Avoid double initialization of clocks") Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-exynos-clkout.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c index 96fab6cfb202..57303cfec7d4 100644 --- a/drivers/clk/samsung/clk-exynos-clkout.c +++ b/drivers/clk/samsung/clk-exynos-clkout.c @@ -116,6 +116,12 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask) register_syscore_ops(&exynos_clkout_syscore_ops); + /* + * Clear the OF_POPULATED flag set in of_irq_init so that + * later the Exynos PMU platform device won't be skipped. + */ + of_node_clear_flag(node, OF_POPULATED); + return; err_clk_unreg: