aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-06-08 16:01:57 -0400
committerKumar Gala <galak@kernel.crashing.org>2011-06-27 09:31:12 -0400
commit316559588fb8da112ecdfb821b9fb0503aa7763c (patch)
treeb4438eca3b6d7186a2c0440f9c5fa3f705a3e5db
parentc0f589502ed553dbead67880c7bce57dee28a174 (diff)
powerpc/p1022ds: add missing iounmap calls to platform file
The platform file for the Freecale P1022DS reference board is not freeing the ioremap() mapping of the PIXIS and global utilities nodes it creates. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/85xx/p1022_ds.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index 7eb5c40c069f..e083e1f4a6f4 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -129,6 +129,7 @@ static void p1022ds_set_gamma_table(int monitor_port, char *gamma_table_base)
129static void p1022ds_set_monitor_port(int monitor_port) 129static void p1022ds_set_monitor_port(int monitor_port)
130{ 130{
131 struct device_node *pixis_node; 131 struct device_node *pixis_node;
132 void __iomem *pixis;
132 u8 __iomem *brdcfg1; 133 u8 __iomem *brdcfg1;
133 134
134 pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis"); 135 pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
@@ -137,12 +138,12 @@ static void p1022ds_set_monitor_port(int monitor_port)
137 return; 138 return;
138 } 139 }
139 140
140 brdcfg1 = of_iomap(pixis_node, 0); 141 pixis = of_iomap(pixis_node, 0);
141 if (!brdcfg1) { 142 if (!pixis) {
142 pr_err("p1022ds: could not map ngPIXIS registers\n"); 143 pr_err("p1022ds: could not map ngPIXIS registers\n");
143 return; 144 return;
144 } 145 }
145 brdcfg1 += 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */ 146 brdcfg1 = pixis + 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */
146 147
147 switch (monitor_port) { 148 switch (monitor_port) {
148 case 0: /* DVI */ 149 case 0: /* DVI */
@@ -158,6 +159,8 @@ static void p1022ds_set_monitor_port(int monitor_port)
158 default: 159 default:
159 pr_err("p1022ds: unsupported monitor port %i\n", monitor_port); 160 pr_err("p1022ds: unsupported monitor port %i\n", monitor_port);
160 } 161 }
162
163 iounmap(pixis);
161} 164}
162 165
163/** 166/**
@@ -201,6 +204,8 @@ void p1022ds_set_pixel_clock(unsigned int pixclock)
201 204
202 /* Enable the clock and set the pxclk */ 205 /* Enable the clock and set the pxclk */
203 setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16)); 206 setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16));
207
208 iounmap(guts);
204} 209}
205 210
206/** 211/**