From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755449AbbCBQyR (ORCPT ); Mon, 2 Mar 2015 11:54:17 -0500 Received: from 3.mo69.mail-out.ovh.net ([188.165.52.203]:51370 "EHLO 3.mo69.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754678AbbCBQyN convert rfc822-to-8bit (ORCPT ); Mon, 2 Mar 2015 11:54:13 -0500 X-Greylist: delayed 2340 seconds by postgrey-1.27 at vger.kernel.org; Mon, 02 Mar 2015 11:54:12 EST Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: [PATCH] ARM: at91: pm: fix SRAM allocation From: Jean-Christophe PLAGNIOL-VILLARD In-Reply-To: <20150302105736.GL4094@piout.net> Date: Tue, 3 Mar 2015 00:14:57 +0800 Cc: Jean-Christophe PLAGNIOL-VILLARD , Nicolas FERRE , Wenyou Yang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <1425292978-28135-1-git-send-email-alexandre.belloni@free-electrons.com> <7E7AE962-1BBE-4B33-9563-B91351494005@jcrosoft.com> <20150302105736.GL4094@piout.net> To: Alexandre Belloni X-Mailer: Apple Mail (2.2070.6) X-Ovh-Tracer-Id: 10124936387887475603 X-Ovh-Remote: 80.15.34.121 (lmontsouris-656-1-34-121.w80-15.abo.wanadoo.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeejledrfeelucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeejledrfeelucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 2, 2015, at 6:57 PM, Alexandre Belloni wrote: > > On 02/03/2015 at 18:50:27 +0800, Jean-Christophe PLAGNIOL-VILLARD wrote : >> >>> On Mar 2, 2015, at 6:42 PM, Alexandre Belloni wrote: >>> >>> On some platforms, there are multiple SRAM nodes defined in the device tree but >>> some of them are disabled, leading to allocation failure. Try to find the first >>> enabled SRAM node and allocate from it. >>> >>> Signed-off-by: Alexandre Belloni >>> --- >>> arch/arm/mach-at91/pm.c | 20 +++++++++----------- >>> 1 file changed, 9 insertions(+), 11 deletions(-) >>> >>> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c >>> index 5e34fb143309..97cc529b6fa0 100644 >>> --- a/arch/arm/mach-at91/pm.c >>> +++ b/arch/arm/mach-at91/pm.c >>> @@ -272,35 +272,33 @@ static void __init at91_pm_sram_init(void) >>> struct device_node *node; >>> struct platform_device *pdev; >> >> pdev not initialised at NULL > > Indeed, I'll fix that. It doesn't really matter for now as all the > at91 DT have at least one sram node. except if we drop it or when we add a new SoC and forget it Best Regards, J. > > Wenyou, can you test it? If it works, I'll send v2. > > -- > Alexandre Belloni, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com