aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-09-28 19:03:29 -0400
committerJon Hunter <jon-hunter@ti.com>2012-11-16 11:35:06 -0500
commit61b001c564b75bfb47bfb84b33008fc2a35c9a84 (patch)
tree69f0d9622354a8c4cfba16f20afa5ae3cd360783 /arch
parentb0cadb3c86fc99553b1f5c38c7770be1ad52aa26 (diff)
ARM: OMAP: Don't store timers physical address
The OMAP2+ system timer code stores the physical address of the timer but never uses it. Remove this and clean-up the code by removing the local variable "size" and changing the names of the local variables mem_rsrc and irq_rsrc to mem and irq, respectively. Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/timer.c13
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h1
2 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 099e4060afe9..e9fcc5faff5c 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -245,8 +245,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
245 const char *oh_name; 245 const char *oh_name;
246 struct device_node *np; 246 struct device_node *np;
247 struct omap_hwmod *oh; 247 struct omap_hwmod *oh;
248 struct resource irq_rsrc, mem_rsrc; 248 struct resource irq, mem;
249 size_t size;
250 int res = 0; 249 int res = 0;
251 int r; 250 int r;
252 251
@@ -280,20 +279,18 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
280 279
281 if (!of_have_populated_dt()) { 280 if (!of_have_populated_dt()) {
282 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL, 281 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
283 &irq_rsrc); 282 &irq);
284 if (r) 283 if (r)
285 return -ENXIO; 284 return -ENXIO;
286 timer->irq = irq_rsrc.start; 285 timer->irq = irq.start;
287 286
288 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, 287 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL,
289 &mem_rsrc); 288 &mem);
290 if (r) 289 if (r)
291 return -ENXIO; 290 return -ENXIO;
292 timer->phys_base = mem_rsrc.start;
293 size = mem_rsrc.end - mem_rsrc.start;
294 291
295 /* Static mapping, never released */ 292 /* Static mapping, never released */
296 timer->io_base = ioremap(timer->phys_base, size); 293 timer->io_base = ioremap(mem.start, mem.end - mem.start);
297 } 294 }
298 295
299 if (!timer->io_base) 296 if (!timer->io_base)
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 40383b68a099..b60e2b66ad18 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -261,7 +261,6 @@ int omap_dm_timers_active(void);
261 (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT)) 261 (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
262 262
263struct omap_dm_timer { 263struct omap_dm_timer {
264 unsigned long phys_base;
265 int id; 264 int id;
266 int irq; 265 int irq;
267 struct clk *fclk; 266 struct clk *fclk;