Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610594

[PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c

From Alexandre Belloni <alexandre.belloni@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c
Date 2017-03-28 13:30 +0200
Message-ID <tpXu2-6Nb-33@gated-at.bofh.it> (permalink)
References <tpXu1-6Nb-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Those macros are only used in pm.c, move them there so we can remove the
test on __ASSEMBLY__.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 <soc/at91/at91sam9_ddrsdr.h>
 #include <soc/at91/at91sam9_sdramc.h>
 
-#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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/11] ARM: at91: pm: cleanup Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-28 13:30 +0200
  [PATCH v2 07/11] ARM: at91: pm: Tie the memory controller type to the ramc id Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-28 13:30 +0200
    RE: [PATCH v2 07/11] ARM: at91: pm: Tie the memory controller type  to the ramc id <Wenyou.Yang@microchip.com> - 2017-03-29 07:10 +0200
  [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to pm.c Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-28 13:30 +0200
    RE: [PATCH v2 02/11] ARM: at91: pm: Move at91_ramc_read/write to  pm.c <Wenyou.Yang@microchip.com> - 2017-03-29 07:00 +0200
  [PATCH v2 09/11] ARM: at91: pm: Merge all at91sam9*_pm_init Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-28 13:30 +0200
    RE: [PATCH v2 09/11] ARM: at91: pm: Merge all at91sam9*_pm_init <Wenyou.Yang@microchip.com> - 2017-03-29 07:00 +0200
  [PATCH v2 06/11] ARM: at91: pm: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-28 13:30 +0200
    RE: [PATCH v2 06/11] ARM: at91: pm: Workaround DDRSDRC self-refresh  bug with LPDDR1 memories. <Wenyou.Yang@microchip.com> - 2017-03-29 07:10 +0200
  [PATCH v2 10/11] ARM: at91: pm: Remove at91_pm_set_standby Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-28 13:30 +0200
    RE: [PATCH v2 10/11] ARM: at91: pm: Remove at91_pm_set_standby <Wenyou.Yang@microchip.com> - 2017-03-29 07:00 +0200

csiph-web