From patchwork Thu Nov 30 11:54:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10084693 X-Patchwork-Delegate: rjw@sisk.pl 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 C96B960586 for ; Thu, 30 Nov 2017 11:54:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6D4429F6A for ; Thu, 30 Nov 2017 11:54:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB7BC29F74; Thu, 30 Nov 2017 11:54:40 +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, RCVD_IN_DNSWL_HI, TVD_SUBJ_WIPE_DEBT 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 7182D29F6A for ; Thu, 30 Nov 2017 11:54:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbdK3Lyi (ORCPT ); Thu, 30 Nov 2017 06:54:38 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:41774 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbdK3Lyi (ORCPT ); Thu, 30 Nov 2017 06:54:38 -0500 Received: from ayla.of.borg ([84.195.106.246]) by xavier.telenet-ops.be with bizsmtp id gBuc1w0035JzmfG01BucX1; Thu, 30 Nov 2017 12:54:36 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1eKNQJ-0004ZR-PE; Thu, 30 Nov 2017 12:54:35 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1eKNQJ-000600-IE; Thu, 30 Nov 2017 12:54:35 +0100 From: Geert Uytterhoeven To: "Rafael J . Wysocki" , Kevin Hilman , Ulf Hansson , Kukjin Kim , Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] PM / Domains: Remove obsolete "samsung, power-domain" check Date: Thu, 30 Nov 2017 12:54:28 +0100 Message-Id: <1512042868-23017-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the generic PM Domain code code checks for the presence of both (generic) "power-domains" and (Samsung Exynos legacy) "samsung,power-domain" properties in all device tree nodes representing devices. There are two issues with this: 1. This imposes a small boot-time penalty on all platforms using DT, 2. Platform-specific checks do not really belong in core framework code. Remove the platform-specific check, as the last user of "samsung,power-domain" was removed in commit 46dcf0ff0de35da8 ("ARM: dts: exynos: Remove exynos4415.dtsi"). All other users were converted before in commit 0da6587041363033 ("ARM: dts: convert to generic power domain bindings for exynos DT"). Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Acked-by: Krzysztof Kozlowski --- This is v2 of 'PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS'. "samsung,power-domain" was only ever used in: - arch/arm/boot/dts/exynos4415.dtsi: Removed - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3 - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4 - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4 - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5 - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5 v2: - Remove the check completely instead of restricting it to ARCH_EXYNOS, as suggested Javier Martinez Canillas one year ago ("Removing the support for the deprecated property sound sensible to me", http://lists.infradead.org/pipermail/linux-arm-kernel/2016-October/462868.html). --- drivers/base/power/domain.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 0c80bea05bcb92be..f9dcc981b6b9328c 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2199,20 +2199,8 @@ int genpd_dev_pm_attach(struct device *dev) ret = of_parse_phandle_with_args(dev->of_node, "power-domains", "#power-domain-cells", 0, &pd_args); - if (ret < 0) { - if (ret != -ENOENT) - return ret; - - /* - * Try legacy Samsung-specific bindings - * (for backwards compatibility of DT ABI) - */ - pd_args.args_count = 0; - pd_args.np = of_parse_phandle(dev->of_node, - "samsung,power-domain", 0); - if (!pd_args.np) - return -ENOENT; - } + if (ret < 0) + return ret; mutex_lock(&gpd_list_lock); pd = genpd_get_from_provider(&pd_args);