summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2011-11-08 14:45:05 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:17 +0200
commite5f48d59903d3be65323e424ea68776003f610a4 (patch)
tree52026cc12d2ad67fe5396a19c2a00a30a48a3516 /arch
parent03595356ffb4563da3d89c67b0ab092ad271b59b (diff)
ARM: ux500: put prcc defines in separate file
ST-Ericsson Linux next: - ST-Ericsson ID: 367599 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I351b18a9107b6c2a054274f950a873436a07431b Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36934
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/clock.c8
-rw-r--r--arch/arm/mach-ux500/pm/context.c23
-rw-r--r--arch/arm/mach-ux500/prcc.h20
3 files changed, 28 insertions, 23 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 657b63c2fa5..da17bcfdc45 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -14,13 +14,7 @@
#include <linux/mfd/dbx500-prcmu.h>
#include "clock.h"
-
-#define PRCC_PCKEN 0x0
-#define PRCC_PCKDIS 0x4
-#define PRCC_KCKEN 0x8
-#define PRCC_KCKDIS 0xC
-#define PRCC_PCKSR 0x10
-#define PRCC_KCKSR 0x14
+#include "prcc.h"
DEFINE_MUTEX(clk_opp100_mutex);
static DEFINE_SPINLOCK(clk_spin_lock);
diff --git a/arch/arm/mach-ux500/pm/context.c b/arch/arm/mach-ux500/pm/context.c
index 864cc0b7160..ffd73f3ed52 100644
--- a/arch/arm/mach-ux500/pm/context.c
+++ b/arch/arm/mach-ux500/pm/context.c
@@ -30,6 +30,7 @@
#include "scu.h"
#include "../product.h"
+#include "../prcc.h"
#define GPIO_NUM_BANKS 9
#define GPIO_NUM_SAVE_REGISTERS 7
@@ -108,16 +109,6 @@
#define SCU_FILTER_ENDADDR 0x44
#define SCU_ACCESS_CTRL_SAC 0x50
-/*
- * Periph clock cluster context
- */
-#define PRCC_BCK_EN 0x00
-#define PRCC_BCK_DIS 0x04
-#define PRCC_KCK_EN 0x08
-#define PRCC_KCK_DIS 0x08
-#define PRCC_BCK_STATUS 0x10
-#define PRCC_KCK_STATUS 0x14
-
/* The context of the Trace Port Interface Unit (TPIU) */
static struct {
void __iomem *base;
@@ -257,9 +248,9 @@ static void save_prcc(void)
clk_enable(context_prcc[i].clk);
context_prcc[i].bus_clk =
- readl(context_prcc[i].base + PRCC_BCK_STATUS);
+ readl(context_prcc[i].base + PRCC_PCKSR);
context_prcc[i].kern_clk =
- readl(context_prcc[i].base + PRCC_KCK_STATUS);
+ readl(context_prcc[i].base + PRCC_KCKSR);
clk_disable(context_prcc[i].clk);
}
@@ -273,14 +264,14 @@ static void restore_prcc(void)
clk_enable(context_prcc[i].clk);
writel(~context_prcc[i].bus_clk,
- context_prcc[i].base + PRCC_BCK_DIS);
+ context_prcc[i].base + PRCC_PCKDIS);
writel(~context_prcc[i].kern_clk,
- context_prcc[i].base + PRCC_KCK_DIS);
+ context_prcc[i].base + PRCC_KCKDIS);
writel(context_prcc[i].bus_clk,
- context_prcc[i].base + PRCC_BCK_EN);
+ context_prcc[i].base + PRCC_PCKEN);
writel(context_prcc[i].kern_clk,
- context_prcc[i].base + PRCC_KCK_EN);
+ context_prcc[i].base + PRCC_KCKEN);
/*
* Consider having a while over KCK/BCK_STATUS
* to check that all clocks get disabled/enabled
diff --git a/arch/arm/mach-ux500/prcc.h b/arch/arm/mach-ux500/prcc.h
new file mode 100644
index 00000000000..05220f8eaa1
--- /dev/null
+++ b/arch/arm/mach-ux500/prcc.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2009-2011 ST-Ericsson SA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __MACH_UX500_PRCC_H__
+
+#define PRCC_PCKEN 0x000
+#define PRCC_PCKDIS 0x004
+#define PRCC_KCKEN 0x008
+#define PRCC_KCKDIS 0x00C
+#define PRCC_PCKSR 0x010
+#define PRCC_KCKSR 0x014
+#define PRCC_K_SOFTRST_CLR 0x018
+#define PRCC_K_SOFTRST_SET 0x01C
+#define PRCC_K_RST_STATUS 0x020
+
+#endif