Received: by 10.223.185.116 with SMTP id b49csp1107610wrg; Sat, 3 Mar 2018 15:47:19 -0800 (PST) X-Google-Smtp-Source: AG47ELvclkfay1wTnn+J9pID6eURhfP3i2BATeLsY6kmfomGc8hjm23tJtLE9TWFE4gyWuj7ZHLj X-Received: by 10.98.254.6 with SMTP id z6mr10340599pfh.155.1520120839283; Sat, 03 Mar 2018 15:47:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520120839; cv=none; d=google.com; s=arc-20160816; b=SA13i0A5gv8Z0APXUeosi5vn3p907YsDApzlBj7MuACWMTgqfLv+a5Tidp5mj8h2SW QtntsSKUErp2M4tqPoWk0FYA4iFdLSsAhMKWFIRN22bnYyR99P+EPkb+awqNcRxu248F bH4eFKZf7otNDu1EDTeIj8awsa85Qmunh3fYevGn6htOl9r7XMjYo7yd9O2cL5Cn3ChF pCwaRpENwEeiTyIpZX8EVq6J5YhGL9zpy7wLZ/oVuZ9iwOUMmj+jFkXS5EJxHoM37cWe Me4ubGy4naZ6r2qyC+dJXkZg4UwzyIZdnMtTw8KaFbfmSj6oj53ss23NTSjlyvl8LjiE YwSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XTeqwZzqw1C9YjiKYqrbqYZnKyBeG6utEqaE1pmCkJY=; b=TIfJe16uOXIu2NYxEHVonz8vwINPc6UIkUouhL3fIlkSHR2IFNM3jyF9C5AjJ232TZ BHwbeFjhRcfSRMP4remFUTvPJlLBaktEkNXWYIbmOFJOMlxfJWjKPfYxDuykfVLyBDmW /eKWqbHeWn1d+cuNIwqYWmmjjGSXl0+qA2wUx/l+Qac24PbQpkd0NSrRzX2u3agtKlnj IW5B0Fn5Q2nBK0PE9ihHsnS2lvjUT5wg7v3Ezy88C7au+8RnEW9QjLFqbLS2+qkk+1Xg tS86GTyk2+iSXREN76JbZGtJcaKks2n7E/fZ+eQOOYDjMFtBNp2P9Sio22RsNRRpMG1U rfMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=gPr+f8XL; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si7468296pfa.413.2018.03.03.15.47.05; Sat, 03 Mar 2018 15:47:19 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=gPr+f8XL; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934244AbeCCXqQ (ORCPT + 99 others); Sat, 3 Mar 2018 18:46:16 -0500 Received: from mail-bn3nam01on0104.outbound.protection.outlook.com ([104.47.33.104]:36491 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933745AbeCCWeI (ORCPT ); Sat, 3 Mar 2018 17:34:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XTeqwZzqw1C9YjiKYqrbqYZnKyBeG6utEqaE1pmCkJY=; b=gPr+f8XL2uf39RZ5/U6LRyBqn5VbVPpkNH+fychNwxIYJqm76pwL/nImh5JyQn+vLNluw7Ay4/fYuDu3KU72ADj55i0By4OmVS5cJgPoCug+zMKJHeQLuaINTQtp5xwW0fJP2uDmcJ6A12+23hPcj8/QfaZA8QTR5ov3IdCB8Ao= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1065.namprd21.prod.outlook.com (52.132.149.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Sat, 3 Mar 2018 22:34:03 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:34:03 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Arnd Bergmann , Thierry Reding , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 106/219] soc/tegra: Fix link errors with PMC disabled Thread-Topic: [PATCH AUTOSEL for 4.9 106/219] soc/tegra: Fix link errors with PMC disabled Thread-Index: AQHTsz8FzZ/0mX98MEapFnYkA+7s9Q== Date: Sat, 3 Mar 2018 22:28:57 +0000 Message-ID: <20180303222716.26640-106-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MW2PR2101MB1065;7:ZQcDyr0tKDAu30vjoRrGXwdXCdzRC0PEHwa1iKhd8bgI+hEKsmdEmMTbXpjk79b9Ue/wmIDY+YqZ0ybepooNpwCl3ZFHFD68EYzsLOhBfdPFx3gyAEdzMkSqXmUHmZx5DZ4X4zSkMQzEleMBwOHmYmxb9pCq5FtYoW6+o2nnF2Wtf7TPKd3QVFOvQ+Ds9SVDm7HsZMtBUu+me+KncktsAltACqmbxpTZe8wCGVnw0J8OLSzqQLX7EVvY4KP+9vq/ x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4d55e945-35ea-4acf-1d3a-08d58156de2b x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MW2PR2101MB1065; x-ms-traffictypediagnostic: MW2PR2101MB1065: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(18589796830644); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231220)(944501244)(52105095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MW2PR2101MB1065;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1065; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(376002)(396003)(39380400002)(39860400002)(189003)(199004)(6506007)(22452003)(54906003)(25786009)(6666003)(186003)(2950100002)(102836004)(5250100002)(2501003)(110136005)(97736004)(316002)(2900100001)(36756003)(76176011)(6436002)(59450400001)(6486002)(26005)(4326008)(99286004)(68736007)(6512007)(6116002)(10090500001)(106356001)(105586002)(478600001)(66066001)(107886003)(3660700001)(305945005)(86612001)(14454004)(81166006)(7736002)(86362001)(1076002)(72206003)(2906002)(10290500003)(8676002)(8936002)(81156014)(3846002)(5660300001)(3280700002)(53936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1065;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: vgLAMzLH2IBOKmFAs3vx1t+PHzAo3NFLGaLsFvIjK0QratAlN03rjgXTQirlXyExJDH697M9Uuh5ldvx6Z3IZtixugeZsAlOwsPW5bTJsEgCVso/MK3p/dU7KTy3hREIVPvz2JsXBurGKKfcFQAvb1j/8WQ1T5rRu7ZmeE8P5Ok= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d55e945-35ea-4acf-1d3a-08d58156de2b X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:28:57.4475 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1065 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit bd737038d555468198495230f4233b9ba92e774c ] With the new Tegra186 PMC driver merged, anything that relies on the previo= us 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_sus= pend_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] undefi= ned! 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 --- include/soc/tegra/pmc.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h index e9e53473a63e..6d2fe5045b13 100644 --- a/include/soc/tegra/pmc.h +++ b/include/soc/tegra/pmc.h @@ -26,12 +26,6 @@ struct clk; struct reset_control; =20 -#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(unsigned int cpuid); #define TEGRA_IO_RAIL_LVDS 57 #define TEGRA_IO_RAIL_SYS_DDC 58 =20 -#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(unsigned int id,= struct clk *clk, =20 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_off(unsigned int= id) { 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 mo= de) +{ +} + +#endif /* CONFIG_SOC_TEGRA_PMC */ =20 #endif /* __SOC_TEGRA_PMC_H__ */ --=20 2.14.1