summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/fsl_soc.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-04-22 20:18:02 +0200
committerKumar Gala <galak@kernel.crashing.org>2009-05-19 07:46:18 +0200
commit81db718d48b991c33cbc7fe425003e374c087c36 (patch)
tree055ce640776067391892c513ed4b4563eee21f94 /arch/powerpc/sysdev/fsl_soc.c
parentpowerpc/86xx: Add 36-bit device tree for mpc8641hpcn (diff)
downloadlinux-81db718d48b991c33cbc7fe425003e374c087c36.tar.xz
linux-81db718d48b991c33cbc7fe425003e374c087c36.zip
powerpc/fsl: use of_iomap() for rstcr mapping
The rstcr register mapping code was written sometime ago before of_iomap() existed. We can use it and clean up the code a bit and get rid of one user of get_immrbase() in the process. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 5c64ccd402e2..95dbc643c4fc 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -379,16 +379,10 @@ static int __init setup_rstcr(void)
struct device_node *np;
np = of_find_node_by_name(NULL, "global-utilities");
if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
- const u32 *prop = of_get_property(np, "reg", NULL);
- if (prop) {
- /* map reset control register
- * 0xE00B0 is offset of reset control register
- */
- rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
- if (!rstcr)
- printk (KERN_EMERG "Error: reset control "
- "register not mapped!\n");
- }
+ rstcr = of_iomap(np, 0) + 0xb0;
+ if (!rstcr)
+ printk (KERN_EMERG "Error: reset control register "
+ "not mapped!\n");
} else
printk (KERN_INFO "rstcr compatible register does not exist!\n");
if (np)