Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbdC2Eur (ORCPT ); Wed, 29 Mar 2017 00:50:47 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:48873 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbdC2Euq (ORCPT ); Wed, 29 Mar 2017 00:50:46 -0400 X-IronPort-AV: E=Sophos;i="5.36,239,1486450800"; d="scan'208";a="673169" From: To: , CC: , , Subject: RE: [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c Thread-Topic: [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c Thread-Index: AQHSp7U22LcdbBDyR02Hf3cLjAI51qGrQGAQ Date: Wed, 29 Mar 2017 04:50:18 +0000 Message-ID: References: <20170328111938.21297-1-alexandre.belloni@free-electrons.com> <20170328111938.21297-3-alexandre.belloni@free-electrons.com> In-Reply-To: <20170328111938.21297-3-alexandre.belloni@free-electrons.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.76.4] Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v2T4ou3T006358 Content-Length: 2013 Lines: 62 > -----Original Message----- > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com] > Sent: 2017??3??28?? 19:19 > To: Nicolas Ferre - M43238 > Cc: linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Boris > Brezillon ; Wenyou Yang - A41535 > ; Alexandre Belloni electrons.com> > Subject: [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c > > Those macros are only used in pm.c, move them there so we can remove the test > on __ASSEMBLY__. > > Signed-off-by: Alexandre Belloni Acked-by: Wenyou Yang > --- > arch/arm/mach-at91/pm.c | 6 ++++++ > arch/arm/mach-at91/pm.h | 8 -------- > 2 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index > 9e2b5c1e503e..41789aa4df86 100644 > --- a/arch/arm/mach-at91/pm.c > +++ b/arch/arm/mach-at91/pm.c > @@ -45,6 +45,12 @@ static struct { > } at91_pm_data; > > static void __iomem *at91_ramc_base[2]; > +#define at91_ramc_read(id, field) \ > + __raw_readl(at91_ramc_base[id] + field) > + > +#define at91_ramc_write(id, field, value) \ > + __raw_writel(value, at91_ramc_base[id] + field) > + > > static int at91_pm_valid_state(suspend_state_t state) { diff --git > a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index > bf980c6ef294..8eed156ef19a 100644 > --- a/arch/arm/mach-at91/pm.h > +++ b/arch/arm/mach-at91/pm.h > @@ -17,14 +17,6 @@ > #include > #include > > -#ifndef __ASSEMBLY__ > -#define at91_ramc_read(id, field) \ > - __raw_readl(at91_ramc_base[id] + field) > - > -#define at91_ramc_write(id, field, value) \ > - __raw_writel(value, at91_ramc_base[id] + field) > -#endif > - > #define AT91_MEMCTRL_MC 0 > #define AT91_MEMCTRL_SDRAMC 1 > #define AT91_MEMCTRL_DDRSDR 2 > -- > 2.11.0