aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index eacdfd3a14d6..9e89a58711b7 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1467,12 +1467,10 @@ static int __init _register(struct omap_hwmod *oh)
1467 return -EEXIST; 1467 return -EEXIST;
1468 1468
1469 ms_id = _find_mpu_port_index(oh); 1469 ms_id = _find_mpu_port_index(oh);
1470 if (!IS_ERR_VALUE(ms_id)) { 1470 if (!IS_ERR_VALUE(ms_id))
1471 oh->_mpu_port_index = ms_id; 1471 oh->_mpu_port_index = ms_id;
1472 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); 1472 else
1473 } else {
1474 oh->_int_flags |= _HWMOD_NO_MPU_PORT; 1473 oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1475 }
1476 1474
1477 list_add_tail(&oh->node, &omap_hwmod_list); 1475 list_add_tail(&oh->node, &omap_hwmod_list);
1478 1476
@@ -1621,6 +1619,26 @@ int __init omap_hwmod_init(struct omap_hwmod **ohs)
1621 return 0; 1619 return 0;
1622} 1620}
1623 1621
1622/*
1623 * _populate_mpu_rt_base - populate the virtual address for a hwmod
1624 *
1625 * Must be called only from omap_hwmod_late_init so ioremap works properly.
1626 * Assumes the caller takes care of locking if needed.
1627 *
1628 */
1629static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)
1630{
1631 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
1632 return 0;
1633
1634 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
1635 if (!oh->_mpu_rt_va)
1636 pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n",
1637 __func__, oh->name);
1638
1639 return 0;
1640}
1641
1624/** 1642/**
1625 * omap_hwmod_late_init - do some post-clock framework initialization 1643 * omap_hwmod_late_init - do some post-clock framework initialization
1626 * 1644 *
@@ -1632,6 +1650,8 @@ static int __init omap_hwmod_late_init(void)
1632{ 1650{
1633 int r; 1651 int r;
1634 1652
1653 r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL);
1654
1635 /* XXX check return value */ 1655 /* XXX check return value */
1636 r = omap_hwmod_for_each(_init_clocks, NULL); 1656 r = omap_hwmod_for_each(_init_clocks, NULL);
1637 WARN(r, "omap_hwmod: omap_hwmod_late_init(): _init_clocks failed\n"); 1657 WARN(r, "omap_hwmod: omap_hwmod_late_init(): _init_clocks failed\n");