aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-10-19 18:25:18 -0400
committerTony Lindgren <tony@atomide.com>2009-10-19 18:25:18 -0400
commit3566fc63589c6f45f31a82aeeb0af6e83adada1f (patch)
tree3592316335f5ce90963a5aec744c5030f65e64d5 /arch/arm/plat-omap
parent7e9bf8475f4cd36e71a42cf5b33626a21ffec007 (diff)
omap: Use ioremap in dmtimer.c
Use ioremap in dmtimer.c Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/dmtimer.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index d325b54daeb5..e4e848ebbfe6 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -742,16 +742,17 @@ EXPORT_SYMBOL_GPL(omap_dm_timers_active);
742int __init omap_dm_timer_init(void) 742int __init omap_dm_timer_init(void)
743{ 743{
744 struct omap_dm_timer *timer; 744 struct omap_dm_timer *timer;
745 int i; 745 int i, map_size = SZ_8K; /* Module 4KB + L4 4KB except on omap1 */
746 746
747 if (!(cpu_is_omap16xx() || cpu_class_is_omap2())) 747 if (!(cpu_is_omap16xx() || cpu_class_is_omap2()))
748 return -ENODEV; 748 return -ENODEV;
749 749
750 spin_lock_init(&dm_timer_lock); 750 spin_lock_init(&dm_timer_lock);
751 751
752 if (cpu_class_is_omap1()) 752 if (cpu_class_is_omap1()) {
753 dm_timers = omap1_dm_timers; 753 dm_timers = omap1_dm_timers;
754 else if (cpu_is_omap24xx()) { 754 map_size = SZ_2K;
755 } else if (cpu_is_omap24xx()) {
755 dm_timers = omap2_dm_timers; 756 dm_timers = omap2_dm_timers;
756 dm_source_names = omap2_dm_source_names; 757 dm_source_names = omap2_dm_source_names;
757 dm_source_clocks = omap2_dm_source_clocks; 758 dm_source_clocks = omap2_dm_source_clocks;
@@ -774,10 +775,11 @@ int __init omap_dm_timer_init(void)
774 775
775 for (i = 0; i < dm_timer_count; i++) { 776 for (i = 0; i < dm_timer_count; i++) {
776 timer = &dm_timers[i]; 777 timer = &dm_timers[i];
777 if (cpu_class_is_omap1()) 778
778 timer->io_base = OMAP1_IO_ADDRESS(timer->phys_base); 779 /* Static mapping, never released */
779 else 780 timer->io_base = ioremap(timer->phys_base, map_size);
780 timer->io_base = OMAP2_IO_ADDRESS(timer->phys_base); 781 BUG_ON(!timer->io_base);
782
781#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 783#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
782 defined(CONFIG_ARCH_OMAP4) 784 defined(CONFIG_ARCH_OMAP4)
783 if (cpu_class_is_omap2()) { 785 if (cpu_class_is_omap2()) {