ARM: OMAP: Don't store timers physical address
authorJon Hunter <jon-hunter@ti.com>
Fri, 28 Sep 2012 23:03:29 +0000 (18:03 -0500)
committerJon Hunter <jon-hunter@ti.com>
Fri, 16 Nov 2012 16:35:06 +0000 (10:35 -0600)
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>
arch/arm/mach-omap2/timer.c
arch/arm/plat-omap/include/plat/dmtimer.h

index 099e4060afe988a3ebe28b4cd0235614dced9c54..e9fcc5faff5ccaccb3133061fe15e0c95a4df690 100644 (file)
@@ -245,8 +245,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
        const char *oh_name;
        struct device_node *np;
        struct omap_hwmod *oh;
-       struct resource irq_rsrc, mem_rsrc;
-       size_t size;
+       struct resource irq, mem;
        int res = 0;
        int r;
 
@@ -280,20 +279,18 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
 
        if (!of_have_populated_dt()) {
                r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
-                                                  &irq_rsrc);
+                                                  &irq);
                if (r)
                        return -ENXIO;
-               timer->irq = irq_rsrc.start;
+               timer->irq = irq.start;
 
                r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL,
-                                                  &mem_rsrc);
+                                                  &mem);
                if (r)
                        return -ENXIO;
-               timer->phys_base = mem_rsrc.start;
-               size = mem_rsrc.end - mem_rsrc.start;
 
                /* Static mapping, never released */
-               timer->io_base = ioremap(timer->phys_base, size);
+               timer->io_base = ioremap(mem.start, mem.end - mem.start);
        }
 
        if (!timer->io_base)
index 40383b68a099ee68b6ad0fce101002f62aefbdb2..b60e2b66ad18d7b9ef70e47b2c9f75eb4e5ff9b7 100644 (file)
@@ -261,7 +261,6 @@ int omap_dm_timers_active(void);
                (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
 
 struct omap_dm_timer {
-       unsigned long phys_base;
        int id;
        int irq;
        struct clk *fclk;
This page took 0.02629 seconds and 5 git commands to generate.