linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/8] ARM: OMAP: Don't store timers physical address
Date: Tue, 13 Nov 2012 12:13:18 -0600	[thread overview]
Message-ID: <1352830403-1706-4-git-send-email-jon-hunter@ti.com> (raw)
In-Reply-To: <1352830403-1706-1-git-send-email-jon-hunter@ti.com>

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               |   13 +++++--------
 arch/arm/plat-omap/include/plat/dmtimer.h |    1 -
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 099e406..e9fcc5f 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,
 	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)
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 40383b6..b60e2b6 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);
 		(_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;
-- 
1.7.9.5

  parent reply	other threads:[~2012-11-13 18:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 18:13 [PATCH 0/8] ARM: OMAP: Clean-up DMTIMER Jon Hunter
2012-11-13 18:13 ` [PATCH 1/8] ARM: OMAP: Clean-up dmtimer reset code Jon Hunter
2012-11-13 18:13 ` [PATCH 2/8] ARM: OMAP: Define omap_dm_timer_prepare function as static Jon Hunter
2012-11-13 18:13 ` Jon Hunter [this message]
2012-11-13 18:13 ` [PATCH 4/8] ARM: OMAP2+: Remove unnecessary local variable in timer code Jon Hunter
2012-11-13 18:13 ` [PATCH 5/8] ARM: OMAP: Remove unnecessary omap_dm_timer structure declaration Jon Hunter
2012-11-13 18:13 ` [PATCH 6/8] ARM: OMAP: Add platform data header for DMTIMERs Jon Hunter
2012-11-13 18:13 ` [PATCH 7/8] ARM: OMAP: Remove unnecessary inclusion of dmtimer.h Jon Hunter
2012-11-14 15:53   ` Jon Hunter
2012-11-15 20:42     ` Omar Ramirez Luna
2012-11-15 22:43       ` Greg Kroah-Hartman
2012-11-13 18:13 ` [PATCH 8/8] ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h Jon Hunter
2012-11-13 22:26   ` Tony Lindgren
2012-11-13 22:54     ` Jon Hunter
2012-11-13 23:34       ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352830403-1706-4-git-send-email-jon-hunter@ti.com \
    --to=jon-hunter@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).