Received: by 10.213.65.68 with SMTP id h4csp1759770imn; Mon, 19 Mar 2018 12:29:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELvFkKV0elIDkl4ZAMIwyEphCZT8HbEUgBKkwH3UHxCjD48x0O8Wb5Q4nlcuxyt7+ZAaa99g X-Received: by 2002:a17:902:22a:: with SMTP id 39-v6mr13834947plc.128.1521487772211; Mon, 19 Mar 2018 12:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521487772; cv=none; d=google.com; s=arc-20160816; b=khO9X5iWwSVT4cV6gbLTgkSSCJGJr53xtdyqDrestVpTRR3RgSL4uMTfOGRpHeAZaW SoqCKidlja9ijGA1rEFMr0+QI04BZEk/dHEtfsIQkQfkjlKkqoOXa1p1IKAapQPCQiXP ItYND62c246bIGGc1Ll4hnnRUjKQ/V5HWfCqBkbOywYIqSbv08R5pQ8IlrdSQXvuUl2k 0QMsS8zZJ9qCqPMxTxB4DpG+1dgVo16jwCrU2L82MdXbakkDHgbj5AkDnVu01ot2T0RF hXD8DSHP2LKk0bYuMTcZonqWMVk4f8K8pRZkD1JkDobgdRwvgjJPqG6NGWrBJayRNDV5 /SIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3m7jHsj3KfzoX/PNg/GNv3U0g+SnETgzcY7oFeP+r8c=; b=nXHrCI3QbkrwRYcTyX0IeLcdc/TXfwXigUC0FQno7PVSz8B1ROTwjFlxu4uHJ0OU3v vLLzf72PwewvnO4q394rcX83JM9Ith5kn7oyrR/AlsbrpMYS2RS3mQUPqa9e9fwbx+1h s3mZQU7fHeH+zGXO9/euCqO8H5GwIG6Xc4wZlJROz5H6+O0fjxQJMEx+skR5remX1mHC kklOivd0gm+LeZ6FQmKbBaXeqs8ZV4OPG9gfET4ozfe7mRdzN1aKYp9PrRBgLyAjN5gs NpVSGMinV8cXm9pRLahWjozKaNwmeuROdna6TkN8XRPIO7y1wpxPNkvYtQEG+kRCqLG/ 82LA== 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 o12-v6si505955plk.449.2018.03.19.12.29.16; Mon, 19 Mar 2018 12:29:32 -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; 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 S936030AbeCST1q (ORCPT + 99 others); Mon, 19 Mar 2018 15:27:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49822 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969599AbeCSSYJ (ORCPT ); Mon, 19 Mar 2018 14:24:09 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C9805F46; Mon, 19 Mar 2018 18:24:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Arnd Bergmann , Thierry Reding , Sasha Levin Subject: [PATCH 4.9 103/241] soc/tegra: Fix link errors with PMC disabled Date: Mon, 19 Mar 2018 19:06:08 +0100 Message-Id: <20180319180755.465427055@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit bd737038d555468198495230f4233b9ba92e774c ] With the new Tegra186 PMC driver merged, anything that relies on the previous PMC driver fails to link when that is disabled: arch/arm/mach-tegra/pm.o: In function `tegra_pm_set': pm.c:(.text.tegra_pm_set+0x3c): undefined reference to `tegra_pmc_enter_suspend_mode' arch/arm/mach-tegra/pm.o: In function `tegra_suspend_enter': pm.c:(.text.tegra_suspend_enter+0x4): undefined reference to `tegra_pmc_get_suspend_mode' arch/arm/mach-tegra/pm.o: In function `tegra_init_suspend': pm.c:(.init.text+0x1c): undefined reference to `tegra_pmc_get_suspend_mode' pm.c:(.init.text+0x74): undefined reference to `tegra_pmc_set_suspend_mode' ERROR: tegra_powergate_sequence_power_up [drivers/ata/ahci_tegra.ko] undefined! ERROR: tegra_powergate_power_off [drivers/ata/ahci_tegra.ko] undefined! Making the definition depend on the presence of the driver makes it build again, though that might not be the correct fix. Reported-by: Krzysztof Kozlowski Fixes: 854014236290 ("soc/tegra: Implement Tegra186 PMC support") Signed-off-by: Arnd Bergmann Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/soc/tegra/pmc.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) --- a/include/soc/tegra/pmc.h +++ b/include/soc/tegra/pmc.h @@ -26,12 +26,6 @@ struct clk; struct reset_control; -#ifdef CONFIG_PM_SLEEP -enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void); -void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode); -void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode); -#endif /* CONFIG_PM_SLEEP */ - #ifdef CONFIG_SMP bool tegra_pmc_cpu_is_powered(unsigned int cpuid); int tegra_pmc_cpu_power_on(unsigned int cpuid); @@ -108,7 +102,7 @@ int tegra_pmc_cpu_remove_clamping(unsign #define TEGRA_IO_RAIL_LVDS 57 #define TEGRA_IO_RAIL_SYS_DDC 58 -#ifdef CONFIG_ARCH_TEGRA +#ifdef CONFIG_SOC_TEGRA_PMC int tegra_powergate_is_powered(unsigned int id); int tegra_powergate_power_on(unsigned int id); int tegra_powergate_power_off(unsigned int id); @@ -120,6 +114,11 @@ int tegra_powergate_sequence_power_up(un int tegra_io_rail_power_on(unsigned int id); int tegra_io_rail_power_off(unsigned int id); + +enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void); +void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode); +void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode); + #else static inline int tegra_powergate_is_powered(unsigned int id) { @@ -157,6 +156,20 @@ static inline int tegra_io_rail_power_of { return -ENOSYS; } -#endif /* CONFIG_ARCH_TEGRA */ + +static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void) +{ + return TEGRA_SUSPEND_NONE; +} + +static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode) +{ +} + +static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode) +{ +} + +#endif /* CONFIG_SOC_TEGRA_PMC */ #endif /* __SOC_TEGRA_PMC_H__ */