Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172711
b: refs/heads/master
c: 986a13f
h: refs/heads/master
i:
  172709: ed81344
  172707: ff241c1
  172703: 947d5c4
v: v3
  • Loading branch information
Tony Lindgren committed Oct 19, 2009
1 parent b69031b commit 0e3884a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f7065dab5d12b10c1a77134cb1a3f7c5fd17f4f
refs/heads/master: 986a13f508156e1d041d59166beb2a3dec2ddfad
18 changes: 12 additions & 6 deletions trunk/arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ static void __iomem *_find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
struct omap_hwmod_addr_space *mem;
int i;
int found = 0;
void __iomem *va_start;

if (!oh || oh->slaves_cnt == 0)
return NULL;
Expand All @@ -509,16 +510,20 @@ static void __iomem *_find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
}
}

/* XXX use ioremap() instead? */

if (found)
if (found) {
va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
if (!va_start) {
pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
return NULL;
}
pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
oh->name, OMAP2_IO_ADDRESS(mem->pa_start));
else
oh->name, va_start);
} else {
pr_debug("omap_hwmod: %s: no MPU register target found\n",
oh->name);
}

return (found) ? OMAP2_IO_ADDRESS(mem->pa_start) : NULL;
return (found) ? va_start : NULL;
}

/**
Expand Down Expand Up @@ -1148,6 +1153,7 @@ int omap_hwmod_unregister(struct omap_hwmod *oh)
pr_debug("omap_hwmod: %s: unregistering\n", oh->name);

mutex_lock(&omap_hwmod_mutex);
iounmap(oh->_rt_va);
list_del(&oh->node);
mutex_unlock(&omap_hwmod_mutex);

Expand Down

0 comments on commit 0e3884a

Please sign in to comment.