summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorRob Herring <r.herring@freescale.com>2010-02-04 09:49:15 -0600
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-24 12:16:00 +0200
commit8c443dca0610624b4a0b676fe1f6dfb9fa95e8da (patch)
treecc60449360c46fb54c2b095777ea6a1bb0830618 /arch/arm/plat-mxc
parent9f1ab6dd9efdb579d967437e7abd06bbe1fabd94 (diff)
ENGR00120394-5 imx: Remove IO_ADDRESS usage for peripheral dvfs
Replace static mappings with dynamic mapping in peripheral DFVS. Signed-off-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/dvfs_per.c14
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc_dvfs.h16
2 files changed, 16 insertions, 14 deletions
diff --git a/arch/arm/plat-mxc/dvfs_per.c b/arch/arm/plat-mxc/dvfs_per.c
index 3460f4f6d6ce..269dbb20c9b4 100644
--- a/arch/arm/plat-mxc/dvfs_per.c
+++ b/arch/arm/plat-mxc/dvfs_per.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -50,6 +50,17 @@
#include <mach/mxc_dptc.h>
#endif
+/* DVFS PER */
+static void __iomem *dvfs_per_base;
+#define MXC_DVFS_PER_LTR0 (dvfs_per_base)
+#define MXC_DVFS_PER_LTR1 (dvfs_per_base + 0x04)
+#define MXC_DVFS_PER_LTR2 (dvfs_per_base + 0x08)
+#define MXC_DVFS_PER_LTR3 (dvfs_per_base + 0x0C)
+#define MXC_DVFS_PER_LTBR0 (dvfs_per_base + 0x10)
+#define MXC_DVFS_PER_LTBR1 (dvfs_per_base + 0x14)
+#define MXC_DVFS_PER_PMCR0 (dvfs_per_base + 0x18)
+#define MXC_DVFS_PER_PMCR1 (dvfs_per_base + 0x1C)
+
#define DRIVER_NAME "DVFSPER"
#define DVFS_PER_DEBUG 0
@@ -759,6 +770,7 @@ static int __devinit mxc_dvfsper_probe(struct platform_device *pdev)
ret = -ENODEV;
goto err1;
}
+ dvfs_per_base = gpc_base + 0x1C4;
/*
* Request the DVFSPER interrupt
diff --git a/arch/arm/plat-mxc/include/mach/mxc_dvfs.h b/arch/arm/plat-mxc/include/mach/mxc_dvfs.h
index 8b9d6f7e9b6f..fd0179b4d8f9 100644
--- a/arch/arm/plat-mxc/include/mach/mxc_dvfs.h
+++ b/arch/arm/plat-mxc/include/mach/mxc_dvfs.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -34,6 +34,8 @@
#include <linux/workqueue.h>
#include <linux/device.h>
+extern void __iomem *gpc_base;
+
#define MXC_GPCCNTR_GPCIRQ2M (1 << 25)
#define MXC_GPCCNTR_GPCIRQ2 (1 << 24)
#define MXC_GPCCNTR_GPCIRQM (1 << 21)
@@ -62,18 +64,6 @@
#define MXC_DVFSPER_PMCR0_ENABLE_MASK 0x10
#define MXC_DVFSPER_PMCR0_ENABLE (1 << 4)
-#define MXC_DVFS_PER_BASE IO_ADDRESS(GPC_BASE_ADDR + 0x1C4)
-
-/* DVFS PER */
-#define MXC_DVFS_PER_LTR0 (MXC_DVFS_PER_BASE)
-#define MXC_DVFS_PER_LTR1 (MXC_DVFS_PER_BASE + 0x04)
-#define MXC_DVFS_PER_LTR2 (MXC_DVFS_PER_BASE + 0x08)
-#define MXC_DVFS_PER_LTR3 (MXC_DVFS_PER_BASE + 0x0C)
-#define MXC_DVFS_PER_LTBR0 (MXC_DVFS_PER_BASE + 0x10)
-#define MXC_DVFS_PER_LTBR1 (MXC_DVFS_PER_BASE + 0x14)
-#define MXC_DVFS_PER_PMCR0 (MXC_DVFS_PER_BASE + 0x18)
-#define MXC_DVFS_PER_PMCR1 (MXC_DVFS_PER_BASE + 0x1C)
-
#define MXC_DVFSLTR0_UPTHR_MASK 0x0FC00000
#define MXC_DVFSLTR0_UPTHR_OFFSET 22
#define MXC_DVFSLTR0_DNTHR_MASK 0x003F0000