Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723AbbFENzc (ORCPT ); Fri, 5 Jun 2015 09:55:32 -0400 Received: from mail-bn1on0097.outbound.protection.outlook.com ([157.56.110.97]:56426 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751765AbbFENz2 (ORCPT ); Fri, 5 Jun 2015 09:55:28 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; alien8.de; dkim=none (message not signed) header.d=none; Authentication-Results: alien8.de; dkim=none (message not signed) header.d=none; From: To: CC: , , , , , , , Dinh Nguyen Subject: [PATCH] EDAC, altera: wrap edac pm with a CONFIG_PM Date: Fri, 5 Jun 2015 08:49:15 -0500 Message-ID: <1433512155-9906-1-git-send-email-dinguyen@opensource.altera.com> X-Mailer: git-send-email 2.2.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BN1PR02CA0035.namprd02.prod.outlook.com (10.141.56.35) To CY1PR03MB1374.namprd03.prod.outlook.com (25.163.16.28) X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1374;2:ZM/ULsC4y7d9YaBDZk4Li59B6GYhNpsiTQG9mhoVMcYh85vwGEdlpao/y4StZXcH;2:WH0G/TSN7XISGUbptZ+uPVnqfzVr6+N9OTGeCy7SOHEfPIjB/dIQ2uR51pSYkTDioZSIMH3W0lh2HlUKuu00zL+r7WNqfSKRvpIJlpiFPH0VXm60TtGjeroUFLRen6ECwgvN0B0rNkCCMDP0qurYFg==;6:usYAqq1WP+vldfPrlCHWK2C/8mTsu3g7QYD8O29rjV9hYJjP6/1Uu6QUXfRisrsATDZCklfFNsnhHxF8NZ1UlQIhmivCeVKDLAzFh80OJJV3uKlHn6fmKNxZgGBAu8VyctpYH4NO8uEVIGYM+eFPGw==;3:vbosSYwvT4ROgN00OQSm1yPNANNT9VEko7uMG0CeArxwjztov9grMJ9oLzCh/XkhBd7Avp8dtGJeEc/+QFy3OR7rXLLy9b7aI9BP8e5FH/dC1KhyyxC7rlL89rZA9u+pmn008pUv2M2sQG5GGj7LmdL5Jy6ytTtFqINcuagJFsartr3YNJyLCS6ZKYgmgPyRZ4TylwFUuSE2SrStU9m5I9SVb8F5YDcQeHMUSDF65x79QK8LMtd1eifBW4Xhw3RdV45l8ryP6Xq+UkgGQb/jhgheoddUyPDM1Op8Hx1OuyNhygulBJ2hcONWOBnEX2EY X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1374;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB240; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:CY1PR03MB1374;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1374;BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:BY2PR03MB240;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB240; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(6009001)(164054003)(87976001)(86152002)(47776003)(50226001)(62966003)(77156002)(77096005)(66066001)(92566002)(86362001)(53416004)(2351001)(42186005)(19580405001)(19580395003)(50986999)(50466002)(122386002)(229853001)(48376002)(33646002)(107886002)(189998001)(46102003)(40100003)(5001960100002)(5001920100001)(110136002)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1374;H:linux-builds1.altera.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1374;9:wenNBjxp6dLI2qUb1U96vfh+od6Y6HbzJqUnd+RE5fVw40mKe3gP+I1Mdx52pliIWvijgALBjIxwf9BQJgZdv0eqdjg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ojEFkB3PW8MpQNRExOWdIcX3tZzpNkBaza+/Jb/BhvCX8s78M7b+9UEU5VnN37l7oNE1WaTmM6LU30E/giv149YVHYBFsD7zY/sw4Zn7m1C+nyb5yzEwo8/Ba63YxFgxX5ygghUvteyvyx/svmTMYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1374 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BL2FFO11FD039.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD039;1:8YQ1LpfeMCEVXB/vDO/T1xGvyjjj0izJgzJwIbHLmkBGsvJpWKDeKsQYU+OUyvkoeU5TqI5HRZMpft6ouRVR8vjs/X4FpyLs1/Pq1AO8JEsf4QTAuKywsCEQVwnn8vmP/Wg34Qw5S2lv2eAjPpd5WXaYi3/u7POtPBuWGn4ybsCB82H3AHX/NmV0Qk8CQV+20/Pn1iMs/I/q0ExWSRnTzzEnOV07zn1zS4owf/a00XvoQV/2tiQvzgATOTf/S9CvY3vSB3XVe6EAxp43qSF0lQ== X-Forefront-Antispam-Report: CIP:66.35.236.236;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(339900001)(164054003)(189002)(199003)(50986999)(92566002)(50226001)(86152002)(87936001)(6806004)(19580395003)(19580405001)(85426001)(86362001)(46102003)(189998001)(47776003)(106466001)(77096005)(66066001)(105606002)(53416004)(62966003)(77156002)(33646002)(40100003)(2351001)(48376002)(122386002)(110136002)(16796002)(50466002)(229853001)(107886002)(5001960100002)(7099028)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR03MB240;H:sj-itexedge04.altera.priv.altera.com;FPR:;SPF:Fail;MLV:ovrnspm;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB240;2:KSG950Bylyk6nNYE2/5kRLrnN9OKixBQpyUh8DoRcXT+KlU3z1KGBhb9O6y9P6jP;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Fcz08iiNiEqSB8nD+WsrWCcgazThf5C5Ag38QtGbR0Q15PWulN3zg==;10:9lrwI1o2dirX+mP7UYfQgEHo+X9pL5MgIKuQffC0xbU/2xv3isTsH2fIMNCq8DBgE5FcQr6Y6iWhYiYBK0uB7S5Mo1/i4gsj/32JW5Uf9Gg=;6:y4P0UBUxw9TKyWOQ4cSFmo+s2vT+AOKIsc1bcdJ5vwjFLJapOyasZCdNBk9T+t9qFPG46Eh8GOuAUzV2fLVZ/U9OQ3M7oHzxWMLGFcmEdWinox9kTSP7Us0Ix4gm49N5uSTRQNyzzAEO7Jv3dgsXdg== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2015 13:55:24.8461 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.236];Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB240 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1845 Lines: 67 From: Alan Tull Suspend-to-RAM and EDAC support are mutually exclusive on SOCFPGA. If the EDAC is enabled, it will prevent the platform from going into suspend. Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen Acked-by: Borislav Petkov --- Hi Boris, Please apply this patch to your for-next? This was part of Alan Tull's suspend-to-ram patch that I was going to take through arm-soc. But if I left the patch as it was, it would have caused a merge conflict for v4.2. Thanks, Dinh --- drivers/edac/altera_edac.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 182c741..23ef091 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -477,11 +477,31 @@ static int altr_sdram_remove(struct platform_device *pdev) return 0; } +/* + * If you want to suspend, need to disable EDAC by removing it + * from the device tree or defconfig. + */ +#ifdef CONFIG_PM +static int altr_sdram_prepare(struct device *dev) +{ + pr_err("Suspend not allowed when EDAC is enabled.\n"); + + return -EPERM; +} + +static const struct dev_pm_ops altr_sdram_pm_ops = { + .prepare = altr_sdram_prepare, +}; +#endif + static struct platform_driver altr_sdram_edac_driver = { .probe = altr_sdram_probe, .remove = altr_sdram_remove, .driver = { .name = "altr_sdram_edac", +#ifdef CONFIG_PM + .pm = &altr_sdram_pm_ops, +#endif .of_match_table = altr_sdram_ctrl_of_match, }, }; -- 2.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/