Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521AbbEZNte (ORCPT ); Tue, 26 May 2015 09:49:34 -0400 Received: from mail-bn1on0097.outbound.protection.outlook.com ([157.56.110.97]:47328 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754269AbbEZNt2 (ORCPT ); Tue, 26 May 2015 09:49:28 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.227) smtp.mailfrom=opensource.altera.com; gmail.com; dkim=none (message not signed) header.d=none; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=dinguyen@opensource.altera.com; Message-ID: <556479C9.5070208@opensource.altera.com> Date: Tue, 26 May 2015 08:48:57 -0500 From: Dinh Nguyen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Alan Tull , Rob Herring CC: Pavel Machek , Arnd Bergmann , "Steffen Trumtrar" , Pawel Moll , "Mark Rutland" , Ian Campbell , Kumar Gala , , , Russell King , , Delicious Quinoq Subject: Re: [PATCH v4 1/2] ARM: socfpga: support suspend to ram References: <1432317735-29413-1-git-send-email-atull@opensource.altera.com> <1432317735-29413-2-git-send-email-atull@opensource.altera.com> In-Reply-To: <1432317735-29413-2-git-send-email-atull@opensource.altera.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [107.207.142.246] X-ClientProxiedBy: SN1PR0701CA0018.namprd07.prod.outlook.com (25.162.96.28) To CY1PR03MB1376.namprd03.prod.outlook.com (25.163.16.30) X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1376;2:rheOINFRudBt1LvcADaKYnpsyFJHHOutmx6VWtsQ/s8CSVjJAacJDQRhL9QnG3Wi;2:KCF+I/ZpPLYZGef9Q9j9lmXceHprtUG0Pkx1J8Gzx7fOoNl9RlMDoc0ogRK9reC0bJUN/kmApjdmpOVHKHt2KtEMJD4LYt6G/62rhVQT/hvewbJocloV3LfvlIz4pcvoo00Q560JYz0MacuTpllV3w==;6:UD3cQb1y3r18H1fcZ/chJbcQcl6ruVB+05BItMBeu0X2nQE8Q3/FlCpSJKPVG7cjhjV7DBEO8eBj0baYE0vDCES5Ymcx2dPxk480U1e+9d/4zSJlpYtSji1nRPJv4Re+YOHOCblyt9WJMvZfTHtiWg==;3:LiDTQGD7tIlZEnGXNyMHCg6Q27J9obbE8zyVgds4ZFVAKtIOy4nfwoPhGDiDbj6D5WrO0PeHSw9FsdA4Pm/JWpZhmUSPjfkD4F+YdeJlmDr1f2UwknD5Ls5WIhakzBCcM5eoByIMHMU0qcABRlgEwgZ5G4cSWfy+ZZEJmPFRB5zukbkSwrseX9lgxVQkPE9DJxPMn3Gcvm6Xn6oCUGL1fDwSkw6QCu55S++khPC/hWE+A/aJ/zeduaIqU+f9L3smS+RZirvvM7ZBOBRCHKHNUkaaUCN73n/bGIPSn/RPywiuPnRknpFe0pBFoB2b0gbG X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1376;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1502; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(520002)(3002001);SRVR:CY1PR03MB1376;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1376;BCL:0;PCL:0;RULEID:(601004)(5005006)(520002)(3002001);SRVR:CY1PR03MB1502;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1502; X-Forefront-PRVS: 0588B2BD96 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(199003)(479174004)(377454003)(51704005)(189002)(122386002)(40100003)(19580405001)(106356001)(50466002)(87976001)(80316001)(99136001)(77156002)(42186005)(105586002)(62966003)(97736004)(4001350100001)(59896002)(68736005)(77096005)(2950100001)(81156007)(19580395003)(4001540100001)(5001770100001)(5001960100002)(76176999)(46102003)(54356999)(47776003)(65816999)(66066001)(65956001)(87266999)(65806001)(189998001)(50986999)(64706001)(101416001)(86362001)(5001830100001)(33656002)(5001860100001)(64126003)(83506001)(92566002)(23746002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1376;H:Dinhs-MacBook-Pro.local;FPR:;SPF:None;PTR:InfoNoRecords;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?Windows-1252?Q?1;CY1PR03MB1376;9:7tuAkVjLjdyGzM9LpS3I8PUqF4TT5NZtS9jGjV?= =?Windows-1252?Q?7TPBLXP9Zpl4Svl/XtNsjYJ7SLeXGHq3go8zjMfFTRM944kAlyv+4hw3?= =?Windows-1252?Q?ZKlbRsqfN5uJn0utMqIxABTtH0CcabPh4gITfOTCGLD5Wfo1lR8eWEW+?= =?Windows-1252?Q?wQVzduL2pL78/mvqWtcDylAzKxEs9jmJRv87nuBlAT1+W37r25vsv5uy?= =?Windows-1252?Q?8F59b2JVygy6lpwmPZA/m+PMw/RPZst3+o0FRWC5DvCZGDtyFPVGkrLM?= =?Windows-1252?Q?KBFPlxVRQHbQ8bGgqUhjQPTTYPcrAa4bheaCOU6QDIgEBDqM+DqkZniY?= =?Windows-1252?Q?ICXDD4X2h+8ey3AVuezLvCZNxgk7d0ERtqiqfvo7MxuQZ7ZN0MDKwAaw?= =?Windows-1252?Q?MPJyrKD5P2Fz6lITbtsVN7mIzW+KeKP7EGuBnk/nonF/eygePFanQjtP?= =?Windows-1252?Q?lnM/oKbExkPOfuqgd3irkJqBgVTa8R09IBS4VNIRR3u5GNIp8zHOGmNS?= =?Windows-1252?Q?E1/U7gO2XnL99Aclpza4C9bqGdma7WMwqoGumEaAaiCZPrMzG5e4irPW?= =?Windows-1252?Q?AEjkm5KWX14klTFiQ7vKqj2ChSt5fX1qA79tBuopa1r+rfskXAh8v8bt?= =?Windows-1252?Q?sXPTVMrWKr9gR2O5ENTrAIkrY2dobDyGrO8wD/knv/X1caAp6Hm3w3xE?= =?Windows-1252?Q?LiL61Z0z7PgXIVQcR2iHJf40geaRbaht6wCqVzsrm2oSlJApehLHgZFU?= =?Windows-1252?Q?BHzriwKWEdvcjKR8sTqgvQQSCaksB6EOj5TdB62T3oY8zKh0JxS414M/?= =?Windows-1252?Q?ZUBc3LPJI6np0ufwlyx9Hwm5ijeANArki8YLb0G6vBkgC8nz6ls0O6Nf?= =?Windows-1252?Q?QbH0jnqFl9Sy/Gf4tz3PNptZx8syRoIzsjOJ7LDWsRSbtQgyXTmOOD6C?= =?Windows-1252?Q?8qp1azyRWqIDK1prgw70OxlGwNYmlZo8Bk1XAPV3tVNa0BQRs2tXLKcg?= =?Windows-1252?Q?hRU/KTrgnsmE2WqQ67tiiSiQ6cGvEmvYJmJEU8G2KpnRuDJsPmFn79Db?= =?Windows-1252?Q?wlH8HHGf4ZxHxUAeuhe4X4GS72vrxJc+Fax3lPe6HiiI3Pku9NRLuB5l?= =?Windows-1252?Q?6HpArSkcH+22W+eSxm0WXg1zZYREO3q9GEmZWRzhRxln87L3t1/ajrMF?= =?Windows-1252?Q?9SlopKCrQsSlFKVLU8SUR9N0MYfi1PtY8YPeVZH0KUYAEiOeD1mzi1jo?= =?Windows-1252?Q?qmyVCYMZ2tBAhnX69RoDtzc3gQn2jWRY7QaD3zdlCH9db32ngIHVtA7V?= =?Windows-1252?Q?eH/wHdt/UZH7bzdJmQs9Vnkf7wWn7RVYRJHDlrd+5LHVrwmFP2yJpJ7u?= =?Windows-1252?Q?TdhPFXhRdK6NFLjCt9uM7BoQSouYakYrEf7ib5fV1UTsHQ4u5GJt2BCq?= =?Windows-1252?Q?fBYC5V/YsnLLA4c6c6?= X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1376;3:/+TE77Zb9uZD78wbObxdOsicAhyRpflFNI8GBxgPbSTwlM2s0nlQk+VG2IDPpgr1pvWNS/G6NHwxbWJmWdYN+ui9Op///rV0qPjKoB6o3vNXoNKjbL6tXL3CJrGjd5yLsIDmWCcWfU1BzZ9HQ51uJA==;10:8pGUlbL5cK1gFo9eiZ79+umwyKFn4E/8YC09aa0opZ5+VFt5o4Cj8EWVnUXnUiwTtBRSNHxsV4q+YfH62pjSB5X6IWqE+JTexvssC2egQzE=;6:Uzqj/4WMa8PSUh9UBVnBYGFF7IVwMsRRGEHZT2xIFzwkHHtRvLmZb5C7/jYYK9FJrZMTpu/XQ/OO7MJsFMa+5wWNYZSaRfrXOCC+WUbHlZHG3HnOIGjV2G3euy7qn2S69Oxz4dD+LGFkV/XKCHDqXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1376 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1AFFO11FD029.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD029;1:pXl9+67wqe/VFU7QV2BCuTk6KKhmrGYodSUgMTWi+araiaR1D2fvpideIFpZn7ts/X93nIsnKzeRfNXy7uNFevtQYf9zG+VnhnpgstqZ1I48EE+qoZYvkKTdZq1IZJCGNFjsrIB3LJzdlJBAPLe6dtU8p/M8V27Wuz1XG9ZJTXgJ9HAGzMXSjagG661M+7I+jaPQ3uaApNVJVc6iRKKODI6rkHbfQRK7CwWdZ9uea13uxxkwM+diJv5hYmH0jcv3F9gXkrivg+/eyd2E71XRlc+5gqYUVgJNAu55nRWu+Vrh2CH/bPtoXl8UZ8TW8g7m X-Forefront-Antispam-Report: CIP:66.35.236.227;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(339900001)(51704005)(479174004)(189002)(199003)(24454002)(377454003)(6806004)(99136001)(54356999)(64126003)(85426001)(33656002)(65956001)(66066001)(50986999)(76176999)(83506001)(65816999)(19580395003)(19580405001)(80316001)(106466001)(87266999)(86362001)(46102003)(23746002)(50466002)(16796002)(77156002)(62966003)(81156007)(6070500001)(5001770100001)(4001540100001)(4001350100001)(97736004)(5001860100001)(59896002)(5001920100001)(40100003)(189998001)(47776003)(87936001)(64706001)(5001830100001)(65806001)(5001960100002)(92566002)(77096005)(68736005)(122386002)(2950100001)(105606002)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1502;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB1502;2:VGbsG5mWM4VT4+N8lc/UAGLabAQfnQKnQiQ9FG+bffjwzXlhozVX/f8npmnW0HzB;2:Zjgf22s6ZUItgLJgWICqU2LrSmo/xBXS4LYzG8k0OVyZtDj1RsY7r8kO4BaFy0ihr+55DJObh6zcmEPDMqhyjk+S/lX5dHqySvz4zUvVgWufXbrT+yeRwIyUqOMnFhohJEakuv16II6BBQ6ow7pWZY5Nwa4TaSdpkwEEmjcj2fbz53UGAn8O4qwv8MDkSsqkOTYcvKfPXelFaQoNefSpecY5Uq863AtOTVnJh6FvHmg=;6:i55K5YIARLEGRZxOrYpWcU5/m9TR0SfRYRXyXtt9Z4tQSqO39DAM1ltMaMp/wJejrRfVtD91a/kWreAE/LZG8aPAv/hiEVPpgIM66JaeVlUAalYy2LxdAVEHr0/b6oKGNBsztEuqN3CtOI21SAKMcg==;3:bsHS+/5wyGb8gHGRDfGKWANxwjbvxU57vgkEMWHji/TPplX52GaWJV/WXz6Qv5M3K7sn8GB0qXXZadQwWCSYhWRtOO72XoHhCRxRrgvvRxQ38z1q0SMneXJlVhRNp3ADcAb4gHS63onal8nncEY5x7b9+p+xK2wtcknJGpp3ZgoSBX4LYHarM1NATpwtUebyubU4B3LgjyZYlYfn3cNvTzd6B2eefjs59ztf1vmAP2KeDMSfsf/hXNqCIerUCOs9l7B5vryffd0BqlShkMAMr0qWUtaaut55NNKA5TABK1i5wAQOgGvCWqtVSfQmBVwI X-Forefront-PRVS: 0588B2BD96 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY1PR03MB1502;9:/FtdRBXd8jkJqQBXwLiW4bm6hgDgUJJ8h7Kl9g?= =?Windows-1252?Q?CX+2xjhkP9I/BXH9flnZjfOt0+qPEvDDvmGPxZcE51MHjZ+zKmZ7BP3F?= =?Windows-1252?Q?P6jn6MmK9hC/o28aqjDcCj0WDooqYXD7DmLZ8nQfQWACoZZIvoOAYIgi?= =?Windows-1252?Q?y+rfP+QHpLpiZsaB8B4qXTZx9HBQo3lQ3GNJne0oHxg+BqmFkJl1gASy?= =?Windows-1252?Q?m41B5mWWVLt/1w+x4DzQZdBktQMGmG88ruZFFJ2rNy2rVGuTs3VtjFdC?= =?Windows-1252?Q?E1YqUNqXBgOwBYHXsokDlD500op1kUas8PjnLxyHrS8+z8SgHVL/4ea/?= =?Windows-1252?Q?YSLLd5SyYYEwTtutZEBWtNnNQG8hjD9VWsZVGR2HcmsZrckCYpqzEAG9?= =?Windows-1252?Q?PivNkZofPkUC+ad7MYKbZmKn1JcMCOi/+eEg/LCiZxtx/bN4QKFU6hAI?= =?Windows-1252?Q?BFVqWQdkp1uVdvBNxZdtFtCEAbwusz10BqOsjErWiYnu9YLUt/Fv74M9?= =?Windows-1252?Q?PkdlYe5Q8ktidj97NjJ09Cb9a9cn9Z470RFBO/aWjNhMHmYUfo/TzNDs?= =?Windows-1252?Q?AyfPVadvXBln1zK//i2Ku6eLGDiNZdR5ovYg5zWU2/+bU41q6TzcFpJc?= =?Windows-1252?Q?stfuanYSCmwxNYpolIt70S8VAEKAkw2JahsgjCOF4pCYQHo5j+CK0zLg?= =?Windows-1252?Q?32zFyndPzfe6JbzD8urozbiJ9bXQL4/KGWTI7kRqTQpDdwCLwbqVVgUG?= =?Windows-1252?Q?POEaKFZZr7mdgFRfk9ggXwIRlnK0vYyzlunBHVgs0LJ6aZE25sLK4gL8?= =?Windows-1252?Q?xHsvv5hQMWOrw1w99ga7APqiQkm1v0HUgdPONIfsXsVYlxJM2wnrYv3h?= =?Windows-1252?Q?DHKu4hq+rglD6pT6fua8qsGKWs2WFN9PTNxjRlRrfyr7czGyo+hGKE5T?= =?Windows-1252?Q?F3/+kDsbXfbTA6V+Ihm+V1KQSXUTNkPh7PF7aGs43bGeiDhiW2GEZRVC?= =?Windows-1252?Q?WZiWYgBZhXqUDfP7wY6Jx0MSYBoNm+8KtOQTxNeeosdiZC6g1exH5RVM?= =?Windows-1252?Q?4KTGGfLtkhftuB70a7XaqSTX94bG5e6NOQGRV+7LtrmzuJ6bubj/W3mu?= =?Windows-1252?Q?nLlfJZvil4Mti1noBysqApUnAP1lZYLN3x2EYcBezp3F+G+QTrC3n30K?= =?Windows-1252?Q?MiKB7vPnV4sCOfI8+A6K+8znRoQiOHbjMsp5PdFakBaiPMBA7nbSFwXL?= =?Windows-1252?Q?lPWwMNp9Y4FwbC37AQJInC0Ol0/35rTMPNlWCYeV4u97FlSe3c3drPMd?= =?Windows-1252?Q?VDDUqVRhSwBBB8Tuxz2OxxG4bQM+HwqAqAD4mIiMe+hTa/m6ERMOMEEj?= =?Windows-1252?Q?p1FsPWNKFlmjbAgcHUF1mVdHfAVbhFC1bpFexul3yooh9ngJcNIrMDaF?= =?Windows-1252?Q?oPpKIeITSlU12rx25+dDI6QiikJhyR0lMmoU4PWrC1WYF4KlYyNgq2Rb?= =?Windows-1252?Q?vCYBYxe+u0Ri69mLySw7gd1bWDQenBAChq2yCK3QMiTZGN6UPuydYnwx?= =?Windows-1252?Q?t37ERUlA+1IzA=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB1502;3:BhQjhJbBt2TEDb6WRwBXCd1brkiXBxgKKq6P7+ccDwPMDavda+N7IDAPSAkq6tZkJ5NmoJd4IvxzDE1ZrWhEPO0V8J5+fnm93dgH9Nlbz/4ta1aJLAUC2xCm0GhswNB3i5m8JzZfzsPD9Va+NjbDCA==;10:uvy4fAKPtcYNp/tejMo5S5NnalMbZweUt6wLV06S7pbHN4lHgn/LBdCjnUIrqIALSp7f90MGq+lqrkGa/uL8JBaBmpSNSfYLCQ+cBD9KvmM=;6:ki+o2e0atwg4GiURVSyHZcSijleAD0gbe+W0o9LdrAlvQTAuqtEUt3nqBByWPmCtX3qkDd8+QPBIaKZ7NMF6dcD6BINp5MygahdSbw8OIV4i9UTabA9jYP/jttDc3jm0p9TZojzOx0h3HVh2fpoQ1A== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2015 13:49:19.5985 (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.227];Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1502 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2496 Lines: 76 Hi Alan, On 5/22/15 1:02 PM, Alan Tull wrote: > Add code that requests that the sdr controller go into > self-refresh mode. This code is run from ocram. > > This patch assumes that u-boot has already configured sdr: > sdr.ctrlcfg.lowpwreq.selfrfshmask = 3 > sdr.ctrlcfg.lowpwrtiming.clkdisablecycles = 8 > sdr.ctrlcfg.dramtiming4.selfrfshexit = 512 > > Suspend-to-RAM and EDAC support are mutually exclusive on SOCFPGA > platforms. CONFIG_SOCFPGA_SUSPEND enables suspend-to-RAM and > prevents selecting CONFIG_EDAC_ALTERA_MC. > > How to suspend to ram: > $ echo enabled > \ > /sys/devices/soc/ffc02000.serial0/tty/ttyS0/power/wakeup > > $ echo -n mem > /sys/power/state > > Signed-off-by: Alan Tull > Cc: Pavel Machek > Cc: Arnd Bergmann > Cc: Dinh Nguyen > Cc: Steffen Trumtrar > --- > v2: use Generic on-chip SRAM driver to allocate ocram > rm fncpy_align since generic allocator handles alignment > check __arm_ioremap_exec return code > check for NULL pointers > add a comment regarding sdram controller configuration > v3: fix renamed #define > propagate socfpga_setup_ocram_self_refresh error code > v4: Kconfig: don't need to select GENERIC_ALLOCATER > add CONFIG_SOCFPGA_SUSPEND > make s2r and EDAC support mutually exclusive > socfpga.c: add sdr_ctl_base_addr > return error if ocram not available in device tree > update copyright years > --- > + > +static int socfpga_pm_suspend(unsigned long arg) > +{ > + u32 ret; > + > + if (!sdr_ctl_base_addr || !socfpga_scu_base_addr) > + return -EFAULT; > + > + ret = socfpga_sdram_self_refresh_in_ocram( > + (u32)sdr_ctl_base_addr, (u32)socfpga_scu_base_addr); > + I had a patch that removed socfpga_scu_base_addr from being a global and just a local variable in: f6e14376fb20 ARM: socfpga: use of_iomap to map the SCU This patch will be in v4.2 and is currently in arm-soc/next or at my fork: kernel/git/dinguyen/linux.git socfpga_for_next_arria10 So you will either need to make socfpga_scu_base_addr global again, or you can use the asm instruction to get the SCU base addr. Sorry about that.. Dinh -- 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/