From patchwork Tue Mar 28 11:19:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9648861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD91A601E9 for ; Tue, 28 Mar 2017 11:20:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE24C265B9 for ; Tue, 28 Mar 2017 11:20:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2A5A28334; Tue, 28 Mar 2017 11:20:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 983F22815E for ; Tue, 28 Mar 2017 11:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xF0787ZTzozOJXTvdI2unk4c8FMv1p0rc52Hg1b1vUg=; b=Qsc3ZGhsT/Ah0fDIz1GCn8uTqV UBuWi7ZXGlK6f6kNRvKQ3qdhT5l4r/Q+7MCeqmWp9z9KOrD3IuFQq8963M1fvgfdjpW9v6We747s7 PpAyYJ0+7Z+Tz9vZAWrZx/DlwP+S1XCBgmUsAuOb+T4kK/S7uM108aDsifmlyFKC7nwg1hINnNUC/ KzG6d1UZh6JsH+rNA0o2OfBc8NOtNO4rgTUB6hv425XdL00eO7E3hQmcLBDl2wttFgMeXq+tPbB/b cJ+fdNNt/rR5kkTVM+O8tgZfMtqrmCuXYB1xfjohXqSfSo0gDr2q0zYc6HING4pEyRS7ckgazxxzM JcOmfvpQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cspAa-0005CZ-Mu; Tue, 28 Mar 2017 11:20:12 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cspAV-0003yg-P2 for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2017 11:20:10 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id DC8712081C; Tue, 28 Mar 2017 13:19:46 +0200 (CEST) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id B668C20801; Tue, 28 Mar 2017 13:19:46 +0200 (CEST) From: Alexandre Belloni To: Nicolas Ferre Subject: [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c Date: Tue, 28 Mar 2017 13:19:29 +0200 Message-Id: <20170328111938.21297-3-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328111938.21297-1-alexandre.belloni@free-electrons.com> References: <20170328111938.21297-1-alexandre.belloni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170328_042007_994686_D0894321 X-CRM114-Status: GOOD ( 11.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Alexandre Belloni , Wenyou.Yang@microchip.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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