All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch v3 07/23] ARM: Kirkwood: ioremap memory control register
Date: Wed, 19 Feb 2014 15:12:38 +0100	[thread overview]
Message-ID: <1392819174-11634-8-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1392819174-11634-1-git-send-email-andrew@lunn.ch>

To allow removal of the global map of registers, make the pm code
ioremap the registers it needs.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 1 +
 arch/arm/mach-kirkwood/pm.c                       | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index 2bd12fde1781..6e5077e2ec26 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -80,5 +80,6 @@
 #define CGC_RESERVED		(0x6 << 21)
 
 #define MEMORY_PM_CTRL		(BRIDGE_VIRT_BASE + 0x118)
+#define MEMORY_PM_CTRL_PHYS	(BRIDGE_PHYS_BASE + 0x118)
 
 #endif
diff --git a/arch/arm/mach-kirkwood/pm.c b/arch/arm/mach-kirkwood/pm.c
index c6ab8d9303a5..8e5e0329d04c 100644
--- a/arch/arm/mach-kirkwood/pm.c
+++ b/arch/arm/mach-kirkwood/pm.c
@@ -21,15 +21,16 @@
 #include "common.h"
 
 static void __iomem *ddr_operation_base;
+static void __iomem *memory_pm_ctrl;
 
 static void kirkwood_low_power(void)
 {
 	u32 mem_pm_ctrl;
 
-	mem_pm_ctrl = readl(MEMORY_PM_CTRL);
+	mem_pm_ctrl = readl(memory_pm_ctrl);
 
 	/* Set peripherals to low-power mode */
-	writel_relaxed(~0, MEMORY_PM_CTRL);
+	writel_relaxed(~0, memory_pm_ctrl);
 
 	/* Set DDR in self-refresh */
 	writel_relaxed(0x7, ddr_operation_base);
@@ -41,7 +42,7 @@ static void kirkwood_low_power(void)
 	 */
 	cpu_do_idle();
 
-	writel_relaxed(mem_pm_ctrl, MEMORY_PM_CTRL);
+	writel_relaxed(mem_pm_ctrl, memory_pm_ctrl);
 }
 
 static int kirkwood_suspend_enter(suspend_state_t state)
@@ -69,5 +70,7 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = {
 void __init kirkwood_pm_init(void)
 {
 	ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
+	memory_pm_ctrl = ioremap(MEMORY_PM_CTRL_PHYS, 4);
+
 	suspend_set_ops(&kirkwood_suspend_ops);
 }
-- 
1.8.5.3

  parent reply	other threads:[~2014-02-19 14:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 14:12 [Patch v3 00/23] Move DT kirkwood into mach-mvebu Andrew Lunn
2014-02-19 14:12 ` [Patch v3 01/23] ARM: Kirkwood: Give pm.c its own header file Andrew Lunn
2014-02-19 14:12 ` [Patch v3 02/23] irqchip: Orion: Fix getting generic chip pointer Andrew Lunn
2014-02-19 14:12 ` [Patch v3 03/23] ARM: Kirkwood: Convert mv88f6281gtw_ge switch setup to DT Andrew Lunn
2014-02-19 14:12 ` [Patch v3 04/23] ARM: Kirkwood: Drop printing the SoC type and revision Andrew Lunn
2014-02-19 14:12 ` [Patch v3 05/23] ARM: Kirkwood: Seperate board-dt from common and pcie code Andrew Lunn
2014-02-19 14:12 ` [Patch v3 06/23] ARM: Kirkwood: ioremap the cpu_config register before using it Andrew Lunn
2014-02-19 14:12 ` Andrew Lunn [this message]
2014-02-19 14:12 ` [Patch v3 08/23] ARM: MVEBU: Add ARCH_MULTI_V7 to SoCs Andrew Lunn
2014-02-19 14:12 ` [Patch v3 09/23] ARM: Orion: Move cache-feroceon-l2.h out of plat-orion Andrew Lunn
     [not found] ` <1392819174-11634-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-02-19 14:12   ` [Patch v3 10/23] ARM: MM: Add DT binding for Feroceon L2 cache Andrew Lunn
2014-02-19 14:12     ` Andrew Lunn
     [not found]     ` <1392819174-11634-11-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2014-02-19 18:17       ` Jason Cooper
2014-02-19 18:17         ` Jason Cooper
2014-02-19 14:12 ` [Patch v3 11/23] ARM: Kirkwood: Instantiate L2 cache from DT Andrew Lunn
2014-02-19 14:12 ` [Patch v3 12/23] ARM: Fix default CPU selection for ARCH_MULTI_V5 Andrew Lunn
2014-02-19 14:12 ` [Patch v3 13/23] ARM: Fix MULTI_TLB for feroceon Andrew Lunn
2014-02-19 14:12 ` [Patch v3 14/23] ARM: MM Enable building Feroceon L2 cache controller with ARCH_MVEBU Andrew Lunn
2014-02-19 14:12 ` [Patch v3 15/23] ARM: Move kirkwood DT boards into mach-mvebu Andrew Lunn
2014-02-19 14:12 ` [Patch v3 16/23] ARM: MVEBU: Let kirkwood use the system controller for restart Andrew Lunn
2014-02-19 14:12 ` [Patch v3 17/23] ARM: MVEBU: Instantiate system controller in kirkwood.dtsi Andrew Lunn
2014-02-19 14:12 ` [Patch v3 18/23] drivers: Enable building of Kirkwood drivers for mach-mvebu Andrew Lunn
2014-02-20  4:00   ` Mark Brown
2014-02-20  5:26   ` Kishon Vijay Abraham I
2014-02-20  8:55   ` Daniel Lezcano
2014-02-19 14:12 ` [Patch v3 19/23] ARM: MVEBU: Enable mvebu-soc-id on Kirkwood Andrew Lunn
2014-02-19 14:12 ` [Patch v3 20/23] ARM: config: Add a multi_v5_defconfig Andrew Lunn
2014-02-19 14:19   ` Alexander Shiyan
2014-02-19 14:24     ` Andrew Lunn
2014-02-19 14:54     ` Arnd Bergmann
2014-02-19 15:08       ` Alexander Shiyan
2014-02-19 15:54         ` Arnd Bergmann
2014-02-19 15:59           ` Alexander Shiyan
2014-02-19 16:42             ` Andrew Lunn
2014-02-19 14:12 ` [Patch v3 21/23] ARM: MVEBU: Simplifiy headers and make local Andrew Lunn
2014-02-19 18:20   ` Jason Cooper
2014-02-19 14:12 ` [Patch v3 22/23] ARM: config: Add mvebu_v5_defconfig Andrew Lunn
2014-02-19 14:12 ` [Patch v3 23/23] ARM: Kirkwood: Remove DT support Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392819174-11634-8-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.