* [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates
@ 2010-06-24 23:44 Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 01/13] OMAP24xx: CM: fix mask used for checking IDLEST status Kevin Hilman
` (13 more replies)
0 siblings, 14 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
This is a series of fixes & updates mostly to hwmod and omap_device
that are required for the on-going hwmod conversions and runtime PM
conversion of drivers.
While some of these are fixes, they are not urgent for 2.6.35 and can
wait until the next merge window.
This series applies on top of the runtime PM series just posted and is
also available as the pm-wip/hwmods branch of my linux-omap-pm git
tree:
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git
This has been tested with various hwmod & runtime PM conversions
(UART, MMC, dmtimer) on OMAP2, OMAP3 and OMAP4.
Kevin
Benoit Cousson (2):
OMAP: hwmod: Fix the missing braces
OMAP2&3: hwmod: Remove _hwmod prefix in name string
Kevin Hilman (10):
OMAP24xx: CM: fix mask used for checking IDLEST status
OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE
OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST
OMAP: hwmod: add non-locking versions of enable and idle functions
OMAP: hwmod: don't auto-disable hwmod when !CONFIG_PM_RUNTIME
OMAP: omap_device: ensure hwmod tracks attached omap_device pointer
OMAP: create omap_devices for MPU, DSP, L3
OMAP: hwmod data: add class for IVA hwmods
OMAP2&3: hwmod: Replace l3 -> l3_main
OMAP3: hwmod data: add data for OMAP3 IVA2
Rajendra Nayak (1):
OMAP4: hwmod: Enable omap_device build for OMAP4
arch/arm/mach-omap2/cm.c | 6 +-
arch/arm/mach-omap2/devices.c | 2 +
arch/arm/mach-omap2/io.c | 58 ++++++++++++++++-
arch/arm/mach-omap2/omap_hwmod.c | 47 ++++++++++----
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 49 +++++++-------
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 49 +++++++-------
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 92 ++++++++++++++++++--------
arch/arm/mach-omap2/omap_hwmod_common_data.c | 3 +
arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 +
arch/arm/plat-omap/Makefile | 1 +
arch/arm/plat-omap/include/plat/common.h | 4 +
arch/arm/plat-omap/include/plat/omap_hwmod.h | 2 +
arch/arm/plat-omap/omap_device.c | 8 ++-
13 files changed, 228 insertions(+), 94 deletions(-)
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 01/13] OMAP24xx: CM: fix mask used for checking IDLEST status
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 02/13] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE Kevin Hilman
` (12 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
On OMAP24xx, the polarity for the IDLEST bits is opposite of OMAP3.
The mask used to check this was using the bit position instead of the
bit mask.
This patch fixes the problem by using the bit mask instead of the bit
field.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/cm.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
index 2d83565..721c3b6 100644
--- a/arch/arm/mach-omap2/cm.c
+++ b/arch/arm/mach-omap2/cm.c
@@ -50,15 +50,15 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
cm_idlest_reg = cm_idlest_offs[idlest_id - 1];
+ mask = 1 << idlest_shift;
+
if (cpu_is_omap24xx())
- ena = idlest_shift;
+ ena = mask;
else if (cpu_is_omap34xx())
ena = 0;
else
BUG();
- mask = 1 << idlest_shift;
-
/* XXX should be OMAP2 CM */
omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena),
MAX_MODULE_READY_TIME, i);
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 02/13] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 01/13] OMAP24xx: CM: fix mask used for checking IDLEST status Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 03/13] OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST Kevin Hilman
` (11 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
If an omap_hwmod is setup using HWMOD_INIT_NO_IDLE flag, there is
currently way to idle it since omap_hwmod_idle() requires the hwmod to
be in the enabled state.
This patch adds a check to omap_hwmod_idle() so if the hwmod was has
the INIT_NO_IDLE flag, calling omap_hwmod_idle() will still succeed.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 95c9a5f..ac75407 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -938,7 +938,13 @@ static int _enable(struct omap_hwmod *oh)
*/
static int _idle(struct omap_hwmod *oh)
{
- if (oh->_state != _HWMOD_STATE_ENABLED) {
+ /*
+ * To idle, hwmod must be enabled, EXCEPT if hwmod was
+ * initialized using the INIT_NO_IDLE flag. In this case it
+ * will not yet be enabled so we have to allow it to be idled.
+ */
+ if ((oh->_state != _HWMOD_STATE_ENABLED) &&
+ !(oh->flags & HWMOD_INIT_NO_IDLE)) {
WARN(1, "omap_hwmod: %s: idle state can only be entered from "
"enabled state\n", oh->name);
return -EINVAL;
@@ -953,6 +959,9 @@ static int _idle(struct omap_hwmod *oh)
oh->_state = _HWMOD_STATE_IDLE;
+ /* Clear init flag which should only affect first call to idle */
+ oh->flags &= ~HWMOD_INIT_NO_IDLE;
+
return 0;
}
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 03/13] OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 01/13] OMAP24xx: CM: fix mask used for checking IDLEST status Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 02/13] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 04/13] OMAP: hwmod: Fix the missing braces Kevin Hilman
` (10 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
Since these hwmods do not have IDLEST, set the HWMOD_NO_IDLEST flag,
otherwise _enable() will fail due to failing _wait_target_ready().
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 9 ++++++---
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 9 ++++++---
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 12 ++++++++----
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index e5530c5..a8b57a6 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -65,7 +65,8 @@ static struct omap_hwmod omap2420_l3_hwmod = {
.masters_cnt = ARRAY_SIZE(omap2420_l3_masters),
.slaves = omap2420_l3_slaves,
.slaves_cnt = ARRAY_SIZE(omap2420_l3_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
+ .flags = HWMOD_NO_IDLEST,
};
static struct omap_hwmod omap2420_l4_wkup_hwmod;
@@ -95,7 +96,8 @@ static struct omap_hwmod omap2420_l4_core_hwmod = {
.masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
.slaves = omap2420_l4_core_slaves,
.slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
+ .flags = HWMOD_NO_IDLEST,
};
/* Slave interfaces on the L4_WKUP interconnect */
@@ -115,7 +117,8 @@ static struct omap_hwmod omap2420_l4_wkup_hwmod = {
.masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
.slaves = omap2420_l4_wkup_slaves,
.slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
+ .flags = HWMOD_NO_IDLEST,
};
/* Master interfaces on the MPU device */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 0852d95..8b1f74b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -65,7 +65,8 @@ static struct omap_hwmod omap2430_l3_hwmod = {
.masters_cnt = ARRAY_SIZE(omap2430_l3_masters),
.slaves = omap2430_l3_slaves,
.slaves_cnt = ARRAY_SIZE(omap2430_l3_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
+ .flags = HWMOD_NO_IDLEST,
};
static struct omap_hwmod omap2430_l4_wkup_hwmod;
@@ -97,7 +98,8 @@ static struct omap_hwmod omap2430_l4_core_hwmod = {
.masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
.slaves = omap2430_l4_core_slaves,
.slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
+ .flags = HWMOD_NO_IDLEST,
};
/* Slave interfaces on the L4_WKUP interconnect */
@@ -117,7 +119,8 @@ static struct omap_hwmod omap2430_l4_wkup_hwmod = {
.masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
.slaves = omap2430_l4_wkup_slaves,
.slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
+ .flags = HWMOD_NO_IDLEST,
};
/* Master interfaces on the MPU device */
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 39b0c0e..e288b20 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -76,7 +76,8 @@ static struct omap_hwmod omap3xxx_l3_hwmod = {
.masters_cnt = ARRAY_SIZE(omap3xxx_l3_masters),
.slaves = omap3xxx_l3_slaves,
.slaves_cnt = ARRAY_SIZE(omap3xxx_l3_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+ .flags = HWMOD_NO_IDLEST,
};
static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
@@ -106,7 +107,8 @@ static struct omap_hwmod omap3xxx_l4_core_hwmod = {
.masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
.slaves = omap3xxx_l4_core_slaves,
.slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+ .flags = HWMOD_NO_IDLEST,
};
/* Slave interfaces on the L4_PER interconnect */
@@ -126,7 +128,8 @@ static struct omap_hwmod omap3xxx_l4_per_hwmod = {
.masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
.slaves = omap3xxx_l4_per_slaves,
.slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+ .flags = HWMOD_NO_IDLEST,
};
/* Slave interfaces on the L4_WKUP interconnect */
@@ -146,7 +149,8 @@ static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
.masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
.slaves = omap3xxx_l4_wkup_slaves,
.slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
- .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+ .flags = HWMOD_NO_IDLEST,
};
/* Master interfaces on the MPU device */
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 04/13] OMAP: hwmod: Fix the missing braces
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (2 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 03/13] OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-07-02 11:49 ` Paul Walmsley
2010-06-24 23:44 ` [PATCH v2 05/13] OMAP2&3: hwmod: Remove _hwmod prefix in name string Kevin Hilman
` (9 subsequent siblings)
13 siblings, 1 reply; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul, Benoit Cousson, Sergei Shtylyov
From: Benoit Cousson <b-cousson@ti.com>
As reported by Sergei, a couple of braces were missing after
the WARM removal patch.
[07/22] OMAP: hwmod: Replace WARN by pr_warning if clock lookup failed
https://patchwork.kernel.org/patch/100756/
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index ac75407..3d11523 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -409,10 +409,11 @@ static int _init_main_clk(struct omap_hwmod *oh)
return 0;
oh->_clk = omap_clk_get_by_name(oh->main_clk);
- if (!oh->_clk)
+ if (!oh->_clk) {
pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n",
oh->name, oh->main_clk);
return -EINVAL;
+ }
if (!oh->_clk->clkdm)
pr_warning("omap_hwmod: %s: missing clockdomain for %s.\n",
@@ -444,10 +445,11 @@ static int _init_interface_clks(struct omap_hwmod *oh)
continue;
c = omap_clk_get_by_name(os->clk);
- if (!c)
+ if (!c) {
pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n",
oh->name, os->clk);
ret = -EINVAL;
+ }
os->_clk = c;
}
@@ -470,10 +472,11 @@ static int _init_opt_clks(struct omap_hwmod *oh)
for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
c = omap_clk_get_by_name(oc->clk);
- if (!c)
+ if (!c) {
pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
oh->name, oc->clk);
ret = -EINVAL;
+ }
oc->_clk = c;
}
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 05/13] OMAP2&3: hwmod: Remove _hwmod prefix in name string
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (3 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 04/13] OMAP: hwmod: Fix the missing braces Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 06/13] OMAP: hwmod: add non-locking versions of enable and idle functions Kevin Hilman
` (8 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul, Benoit Cousson, Rajendra Nayak
From: Benoit Cousson <b-cousson@ti.com>
In the lastest OMAP4 hwmod data file, the _hwmod was removed
in order to save some memory space and because it does not
bring a lot.
Align OMAP2420, 2430 and 3430 data files with the same convention.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 6 +++---
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 6 +++---
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a8b57a6..646386c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -59,7 +59,7 @@ static struct omap_hwmod_ocp_if *omap2420_l3_masters[] = {
/* L3 */
static struct omap_hwmod omap2420_l3_hwmod = {
- .name = "l3_hwmod",
+ .name = "l3_main",
.class = &l3_hwmod_class,
.masters = omap2420_l3_masters,
.masters_cnt = ARRAY_SIZE(omap2420_l3_masters),
@@ -90,7 +90,7 @@ static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
/* L4 CORE */
static struct omap_hwmod omap2420_l4_core_hwmod = {
- .name = "l4_core_hwmod",
+ .name = "l4_core",
.class = &l4_hwmod_class,
.masters = omap2420_l4_core_masters,
.masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
@@ -111,7 +111,7 @@ static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
/* L4 WKUP */
static struct omap_hwmod omap2420_l4_wkup_hwmod = {
- .name = "l4_wkup_hwmod",
+ .name = "l4_wkup",
.class = &l4_hwmod_class,
.masters = omap2420_l4_wkup_masters,
.masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 8b1f74b..b2100cf 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -59,7 +59,7 @@ static struct omap_hwmod_ocp_if *omap2430_l3_masters[] = {
/* L3 */
static struct omap_hwmod omap2430_l3_hwmod = {
- .name = "l3_hwmod",
+ .name = "l3_main",
.class = &l3_hwmod_class,
.masters = omap2430_l3_masters,
.masters_cnt = ARRAY_SIZE(omap2430_l3_masters),
@@ -92,7 +92,7 @@ static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
/* L4 CORE */
static struct omap_hwmod omap2430_l4_core_hwmod = {
- .name = "l4_core_hwmod",
+ .name = "l4_core",
.class = &l4_hwmod_class,
.masters = omap2430_l4_core_masters,
.masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
@@ -113,7 +113,7 @@ static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
/* L4 WKUP */
static struct omap_hwmod omap2430_l4_wkup_hwmod = {
- .name = "l4_wkup_hwmod",
+ .name = "l4_wkup",
.class = &l4_hwmod_class,
.masters = omap2430_l4_wkup_masters,
.masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index e288b20..ec6a5f8 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -70,7 +70,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_masters[] = {
/* L3 */
static struct omap_hwmod omap3xxx_l3_hwmod = {
- .name = "l3_hwmod",
+ .name = "l3_main",
.class = &l3_hwmod_class,
.masters = omap3xxx_l3_masters,
.masters_cnt = ARRAY_SIZE(omap3xxx_l3_masters),
@@ -101,7 +101,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
/* L4 CORE */
static struct omap_hwmod omap3xxx_l4_core_hwmod = {
- .name = "l4_core_hwmod",
+ .name = "l4_core",
.class = &l4_hwmod_class,
.masters = omap3xxx_l4_core_masters,
.masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
@@ -122,7 +122,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
/* L4 PER */
static struct omap_hwmod omap3xxx_l4_per_hwmod = {
- .name = "l4_per_hwmod",
+ .name = "l4_per",
.class = &l4_hwmod_class,
.masters = omap3xxx_l4_per_masters,
.masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
@@ -143,7 +143,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
/* L4 WKUP */
static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
- .name = "l4_wkup_hwmod",
+ .name = "l4_wkup",
.class = &l4_hwmod_class,
.masters = omap3xxx_l4_wkup_masters,
.masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 06/13] OMAP: hwmod: add non-locking versions of enable and idle functions
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (4 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 05/13] OMAP2&3: hwmod: Remove _hwmod prefix in name string Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 07/13] OMAP: hwmod: don't auto-disable hwmod when !CONFIG_PM_RUNTIME Kevin Hilman
` (7 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
Some hwmods may need to be idled/enabled in atomic context, so
non-locking versions of these functions are required.
Most users should not need these and usage of theses should be
controlled to understand why access is being done in atomic context.
For this reason, the non-locking functions are only exposed at the
hwmod level and not at the omap-device level.
The use-case that led to the need for the non-locking versions is
hwmods that are enabled/idled from within the core idle/suspend path.
Since interrupts are already disabled here, the mutex-based locking in
hwmod can sleep and will cause potential deadlocks.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 19 ++++++++++---------
arch/arm/plat-omap/include/plat/omap_hwmod.h | 2 ++
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 3d11523..fa11139 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -886,7 +886,7 @@ static int _reset(struct omap_hwmod *oh)
}
/**
- * _enable - enable an omap_hwmod
+ * _omap_hwmod_enable - enable an omap_hwmod
* @oh: struct omap_hwmod *
*
* Enables an omap_hwmod @oh such that the MPU can access the hwmod's
@@ -894,7 +894,7 @@ static int _reset(struct omap_hwmod *oh)
* Returns -EINVAL if the hwmod is in the wrong state or passes along
* the return value of _wait_target_ready().
*/
-static int _enable(struct omap_hwmod *oh)
+int _omap_hwmod_enable(struct omap_hwmod *oh)
{
int r;
@@ -939,7 +939,7 @@ static int _enable(struct omap_hwmod *oh)
* no further work. Returns -EINVAL if the hwmod is in the wrong
* state or returns 0.
*/
-static int _idle(struct omap_hwmod *oh)
+int _omap_hwmod_idle(struct omap_hwmod *oh)
{
/*
* To idle, hwmod must be enabled, EXCEPT if hwmod was
@@ -1038,7 +1038,7 @@ static int _setup(struct omap_hwmod *oh)
oh->_state = _HWMOD_STATE_INITIALIZED;
- r = _enable(oh);
+ r = _omap_hwmod_enable(oh);
if (r) {
pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n",
oh->name, oh->_state);
@@ -1050,7 +1050,7 @@ static int _setup(struct omap_hwmod *oh)
* XXX Do the OCP_SYSCONFIG bits need to be
* reprogrammed after a reset? If not, then this can
* be removed. If they do, then probably the
- * _enable() function should be split to avoid the
+ * _omap_hwmod_enable() function should be split to avoid the
* rewrite of the OCP_SYSCONFIG register.
*/
if (oh->class->sysc) {
@@ -1060,7 +1060,7 @@ static int _setup(struct omap_hwmod *oh)
}
if (!(oh->flags & HWMOD_INIT_NO_IDLE))
- _idle(oh);
+ _omap_hwmod_idle(oh);
return 0;
}
@@ -1301,12 +1301,13 @@ int omap_hwmod_enable(struct omap_hwmod *oh)
return -EINVAL;
mutex_lock(&omap_hwmod_mutex);
- r = _enable(oh);
+ r = _omap_hwmod_enable(oh);
mutex_unlock(&omap_hwmod_mutex);
return r;
}
+
/**
* omap_hwmod_idle - idle an omap_hwmod
* @oh: struct omap_hwmod *
@@ -1320,7 +1321,7 @@ int omap_hwmod_idle(struct omap_hwmod *oh)
return -EINVAL;
mutex_lock(&omap_hwmod_mutex);
- _idle(oh);
+ _omap_hwmod_idle(oh);
mutex_unlock(&omap_hwmod_mutex);
return 0;
@@ -1422,7 +1423,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
mutex_lock(&omap_hwmod_mutex);
r = _reset(oh);
if (!r)
- r = _enable(oh);
+ r = _omap_hwmod_enable(oh);
mutex_unlock(&omap_hwmod_mutex);
return r;
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 0eccc09..253f6e5 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -486,7 +486,9 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh));
int omap_hwmod_late_init(void);
int omap_hwmod_enable(struct omap_hwmod *oh);
+int _omap_hwmod_enable(struct omap_hwmod *oh);
int omap_hwmod_idle(struct omap_hwmod *oh);
+int _omap_hwmod_idle(struct omap_hwmod *oh);
int omap_hwmod_shutdown(struct omap_hwmod *oh);
int omap_hwmod_enable_clocks(struct omap_hwmod *oh);
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 07/13] OMAP: hwmod: don't auto-disable hwmod when !CONFIG_PM_RUNTIME
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (5 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 06/13] OMAP: hwmod: add non-locking versions of enable and idle functions Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4 Kevin Hilman
` (6 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
When runtime PM is disabled, the pm_runtime_idle() and _enable()
functions will be effectively noops and will not result in enable
and idle calls at the hwmod level.
In order for drivers to still work when runtime PM is disabled, ensure
that all hwmods are left in an enabled state so that even without
runtime PM management, they will still work.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index fa11139..e57d9c5 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1059,6 +1059,14 @@ static int _setup(struct omap_hwmod *oh)
}
}
+#ifndef CONFIG_PM_RUNTIME
+ /*
+ * If runtime PM is not enabled, leave the device enabled
+ * since runtime PM will not be dynamically managing the device.
+ */
+ oh->flags |= HWMOD_INIT_NO_IDLE;
+#endif
+
if (!(oh->flags & HWMOD_INIT_NO_IDLE))
_omap_hwmod_idle(oh);
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (6 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 07/13] OMAP: hwmod: don't auto-disable hwmod when !CONFIG_PM_RUNTIME Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-25 13:16 ` Cousson, Benoit
2010-06-24 23:44 ` [PATCH v2 09/13] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer Kevin Hilman
` (5 subsequent siblings)
13 siblings, 1 reply; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul, Rajendra Nayak, Benoit Cousson
From: Rajendra Nayak <rnayak@ti.com>
Enable omap_device layer support for OMAP4, so that drivers can
use them to enable/idle/shutdown devices.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/plat-omap/Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 98f0191..9405831 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
# omap_device support (OMAP2+ only at the moment)
obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
+obj-$(CONFIG_ARCH_OMAP4) += omap_device.o
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 09/13] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (7 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4 Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-07-02 9:05 ` Paul Walmsley
2010-06-24 23:44 ` [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3 Kevin Hilman
` (4 subsequent siblings)
13 siblings, 1 reply; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
The omap_hwmod struct has a field to track the omap_device that is
attached to it, but it was not being assigned. Fix by assigning omap_device
pointer when omap_device is built.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/plat-omap/omap_device.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index f899603..6614cba 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -359,8 +359,8 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
struct omap_device *od;
char *pdev_name2;
struct resource *res = NULL;
- int res_count;
- struct omap_hwmod **hwmods;
+ int i, res_count;
+ struct omap_hwmod *oh, **hwmods;
if (!ohs || oh_cnt == 0 || !pdev_name)
return ERR_PTR(-EINVAL);
@@ -416,6 +416,10 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
else
ret = omap_device_register(od);
+ /* each hwmod has a pointer to its attached omap_device */
+ for (i = 0, oh = hwmods[0]; i < oh_cnt; i++, oh++)
+ oh->od = od;
+
if (ret)
goto odbs_exit4;
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (8 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 09/13] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-26 16:08 ` DebBarma, Tarun Kanti
2010-06-29 17:29 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 11/13] OMAP: hwmod data: add class for IVA hwmods Kevin Hilman
` (3 subsequent siblings)
13 siblings, 2 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
Create simple omap_devices for the main processors and busses.
This is required to support the forth-coming device-based OPP
approach, where OPPs are managed and tracked at the device level.
So that these primary devices are available for early PM initialization,
they are created as early platform_devices.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/devices.c | 2 +
arch/arm/mach-omap2/io.c | 58 +++++++++++++++++++++++++++++-
arch/arm/plat-omap/include/plat/common.h | 4 ++
3 files changed, 63 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 03e6c9e..62920ac 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
@@ -29,6 +30,7 @@
#include <mach/gpio.h>
#include <plat/mmc.h>
#include <plat/dma.h>
+#include <plat/omap_device.h>
#include "mux.h"
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3cfb425..407498d 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -45,7 +45,7 @@
#include <plat/clockdomain.h>
#include "clockdomains.h"
-#include <plat/omap_hwmod.h>
+#include <plat/omap_device.h>
/*
* The machine specific code may provide the extra mapping besides the
@@ -313,6 +313,61 @@ static int __init _omap2_init_reprogram_sdrc(void)
return v;
}
+static struct omap_device_pm_latency *pm_lats;
+
+static struct device *mpu_dev;
+static struct device *dsp_dev;
+static struct device *l3_dev;
+
+struct device *omap_get_mpuss_device(void)
+{
+ WARN_ON_ONCE(!mpu_dev);
+ return mpu_dev;
+}
+
+struct device *omap_get_dsp_device(void)
+{
+ WARN_ON_ONCE(!dsp_dev);
+ return dsp_dev;
+}
+
+struct device *omap_get_l3_device(void)
+{
+ WARN_ON_ONCE(!l3_dev);
+ return l3_dev;
+}
+
+/* static int _init_omap_device(struct omap_hwmod *oh, void *user) */
+static int _init_omap_device(char *name, struct device **new_dev)
+{
+ struct omap_hwmod *oh;
+ struct omap_device *od;
+
+ oh = omap_hwmod_lookup(name);
+ if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
+ __func__, name))
+ return -ENODEV;
+
+ od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, true);
+ if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n",
+ __func__, name))
+ return -ENODEV;
+
+ *new_dev = &od->pdev.dev;
+
+ return 0;
+}
+
+/*
+ * Build omap_devices for processors and bus.
+ */
+static void omap_init_processor_devices(void)
+{
+ _init_omap_device("mpu", &mpu_dev);
+ _init_omap_device("iva", &dsp_dev);
+ _init_omap_device("l3_main", &l3_dev);
+}
+
void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1)
{
@@ -342,6 +397,7 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
omap_serial_early_init();
if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */
omap_hwmod_late_init();
+ omap_init_processor_devices();
omap_pm_if_init();
if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index d265018..9cdd9cd 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -87,4 +87,8 @@ void omap2_set_globals_uart(struct omap_globals *);
} \
})
+struct device *omap_get_mpuss_device(void);
+struct device *omap_get_dsp_device(void);
+struct device *omap_get_l3_device(void);
+
#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 11/13] OMAP: hwmod data: add class for IVA hwmods
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (9 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3 Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 12/13] OMAP2&3: hwmod: Replace l3 -> l3_main Kevin Hilman
` (2 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul
Add a new hwmod class for IVA devices. To be used when hwmods
are created for IVA2 on OMAP3.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod_common_data.c | 3 +++
arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c
index 1e80b91..08a1342 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c
@@ -66,3 +66,6 @@ struct omap_hwmod_class mpu_hwmod_class = {
.name = "mpu"
};
+struct omap_hwmod_class iva_hwmod_class = {
+ .name = "iva"
+};
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index 3645a28..c34e98b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -20,5 +20,6 @@
extern struct omap_hwmod_class l3_hwmod_class;
extern struct omap_hwmod_class l4_hwmod_class;
extern struct omap_hwmod_class mpu_hwmod_class;
+extern struct omap_hwmod_class iva_hwmod_class;
#endif
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 12/13] OMAP2&3: hwmod: Replace l3 -> l3_main
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (10 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 11/13] OMAP: hwmod data: add class for IVA hwmods Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 13/13] OMAP3: hwmod data: add data for OMAP3 IVA2 Kevin Hilman
2010-07-02 11:50 ` [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Paul Walmsley
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul, Benoit Cousson
Replace all the struct that contain l3 with l3_main in order
to be consistent with the OMAP4 naming convention.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 34 +++++++++++-----------
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 34 +++++++++++-----------
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 42 ++++++++++++++--------------
3 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 646386c..8c90b27 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -30,41 +30,41 @@
*/
static struct omap_hwmod omap2420_mpu_hwmod;
-static struct omap_hwmod omap2420_l3_hwmod;
+static struct omap_hwmod omap2420_l3_main_hwmod;
static struct omap_hwmod omap2420_l4_core_hwmod;
/* L3 -> L4_CORE interface */
-static struct omap_hwmod_ocp_if omap2420_l3__l4_core = {
- .master = &omap2420_l3_hwmod,
+static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
+ .master = &omap2420_l3_main_hwmod,
.slave = &omap2420_l4_core_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* MPU -> L3 interface */
-static struct omap_hwmod_ocp_if omap2420_mpu__l3 = {
+static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
.master = &omap2420_mpu_hwmod,
- .slave = &omap2420_l3_hwmod,
+ .slave = &omap2420_l3_main_hwmod,
.user = OCP_USER_MPU,
};
/* Slave interfaces on the L3 interconnect */
-static struct omap_hwmod_ocp_if *omap2420_l3_slaves[] = {
- &omap2420_mpu__l3,
+static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
+ &omap2420_mpu__l3_main,
};
/* Master interfaces on the L3 interconnect */
-static struct omap_hwmod_ocp_if *omap2420_l3_masters[] = {
- &omap2420_l3__l4_core,
+static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
+ &omap2420_l3_main__l4_core,
};
/* L3 */
-static struct omap_hwmod omap2420_l3_hwmod = {
+static struct omap_hwmod omap2420_l3_main_hwmod = {
.name = "l3_main",
.class = &l3_hwmod_class,
- .masters = omap2420_l3_masters,
- .masters_cnt = ARRAY_SIZE(omap2420_l3_masters),
- .slaves = omap2420_l3_slaves,
- .slaves_cnt = ARRAY_SIZE(omap2420_l3_slaves),
+ .masters = omap2420_l3_main_masters,
+ .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
+ .slaves = omap2420_l3_main_slaves,
+ .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
.flags = HWMOD_NO_IDLEST,
};
@@ -80,7 +80,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
- &omap2420_l3__l4_core,
+ &omap2420_l3_main__l4_core,
};
/* Master interfaces on the L4_CORE interconnect */
@@ -123,7 +123,7 @@ static struct omap_hwmod omap2420_l4_wkup_hwmod = {
/* Master interfaces on the MPU device */
static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
- &omap2420_mpu__l3,
+ &omap2420_mpu__l3_main,
};
/* MPU */
@@ -137,7 +137,7 @@ static struct omap_hwmod omap2420_mpu_hwmod = {
};
static __initdata struct omap_hwmod *omap2420_hwmods[] = {
- &omap2420_l3_hwmod,
+ &omap2420_l3_main_hwmod,
&omap2420_l4_core_hwmod,
&omap2420_l4_wkup_hwmod,
&omap2420_mpu_hwmod,
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index b2100cf..c0f3311 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -30,41 +30,41 @@
*/
static struct omap_hwmod omap2430_mpu_hwmod;
-static struct omap_hwmod omap2430_l3_hwmod;
+static struct omap_hwmod omap2430_l3_main_hwmod;
static struct omap_hwmod omap2430_l4_core_hwmod;
/* L3 -> L4_CORE interface */
-static struct omap_hwmod_ocp_if omap2430_l3__l4_core = {
- .master = &omap2430_l3_hwmod,
+static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
+ .master = &omap2430_l3_main_hwmod,
.slave = &omap2430_l4_core_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* MPU -> L3 interface */
-static struct omap_hwmod_ocp_if omap2430_mpu__l3 = {
+static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
.master = &omap2430_mpu_hwmod,
- .slave = &omap2430_l3_hwmod,
+ .slave = &omap2430_l3_main_hwmod,
.user = OCP_USER_MPU,
};
/* Slave interfaces on the L3 interconnect */
-static struct omap_hwmod_ocp_if *omap2430_l3_slaves[] = {
- &omap2430_mpu__l3,
+static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
+ &omap2430_mpu__l3_main,
};
/* Master interfaces on the L3 interconnect */
-static struct omap_hwmod_ocp_if *omap2430_l3_masters[] = {
- &omap2430_l3__l4_core,
+static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
+ &omap2430_l3_main__l4_core,
};
/* L3 */
-static struct omap_hwmod omap2430_l3_hwmod = {
+static struct omap_hwmod omap2430_l3_main_hwmod = {
.name = "l3_main",
.class = &l3_hwmod_class,
- .masters = omap2430_l3_masters,
- .masters_cnt = ARRAY_SIZE(omap2430_l3_masters),
- .slaves = omap2430_l3_slaves,
- .slaves_cnt = ARRAY_SIZE(omap2430_l3_slaves),
+ .masters = omap2430_l3_main_masters,
+ .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
+ .slaves = omap2430_l3_main_slaves,
+ .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
.flags = HWMOD_NO_IDLEST,
};
@@ -82,7 +82,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
- &omap2430_l3__l4_core,
+ &omap2430_l3_main__l4_core,
};
/* Master interfaces on the L4_CORE interconnect */
@@ -125,7 +125,7 @@ static struct omap_hwmod omap2430_l4_wkup_hwmod = {
/* Master interfaces on the MPU device */
static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
- &omap2430_mpu__l3,
+ &omap2430_mpu__l3_main,
};
/* MPU */
@@ -139,7 +139,7 @@ static struct omap_hwmod omap2430_mpu_hwmod = {
};
static __initdata struct omap_hwmod *omap2430_hwmods[] = {
- &omap2430_l3_hwmod,
+ &omap2430_l3_main_hwmod,
&omap2430_l4_core_hwmod,
&omap2430_l4_wkup_hwmod,
&omap2430_mpu_hwmod,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index ec6a5f8..9d9cfb9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -32,50 +32,50 @@
*/
static struct omap_hwmod omap3xxx_mpu_hwmod;
-static struct omap_hwmod omap3xxx_l3_hwmod;
+static struct omap_hwmod omap3xxx_l3_main_hwmod;
static struct omap_hwmod omap3xxx_l4_core_hwmod;
static struct omap_hwmod omap3xxx_l4_per_hwmod;
/* L3 -> L4_CORE interface */
-static struct omap_hwmod_ocp_if omap3xxx_l3__l4_core = {
- .master = &omap3xxx_l3_hwmod,
+static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
+ .master = &omap3xxx_l3_main_hwmod,
.slave = &omap3xxx_l4_core_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* L3 -> L4_PER interface */
-static struct omap_hwmod_ocp_if omap3xxx_l3__l4_per = {
- .master = &omap3xxx_l3_hwmod,
+static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
+ .master = &omap3xxx_l3_main_hwmod,
.slave = &omap3xxx_l4_per_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* MPU -> L3 interface */
-static struct omap_hwmod_ocp_if omap3xxx_mpu__l3 = {
+static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
.master = &omap3xxx_mpu_hwmod,
- .slave = &omap3xxx_l3_hwmod,
+ .slave = &omap3xxx_l3_main_hwmod,
.user = OCP_USER_MPU,
};
/* Slave interfaces on the L3 interconnect */
-static struct omap_hwmod_ocp_if *omap3xxx_l3_slaves[] = {
- &omap3xxx_mpu__l3,
+static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
+ &omap3xxx_mpu__l3_main,
};
/* Master interfaces on the L3 interconnect */
-static struct omap_hwmod_ocp_if *omap3xxx_l3_masters[] = {
- &omap3xxx_l3__l4_core,
- &omap3xxx_l3__l4_per,
+static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
+ &omap3xxx_l3_main__l4_core,
+ &omap3xxx_l3_main__l4_per,
};
/* L3 */
-static struct omap_hwmod omap3xxx_l3_hwmod = {
+static struct omap_hwmod omap3xxx_l3_main_hwmod = {
.name = "l3_main",
.class = &l3_hwmod_class,
- .masters = omap3xxx_l3_masters,
- .masters_cnt = ARRAY_SIZE(omap3xxx_l3_masters),
- .slaves = omap3xxx_l3_slaves,
- .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_slaves),
+ .masters = omap3xxx_l3_main_masters,
+ .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
+ .slaves = omap3xxx_l3_main_slaves,
+ .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
.flags = HWMOD_NO_IDLEST,
};
@@ -91,7 +91,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
- &omap3xxx_l3__l4_core,
+ &omap3xxx_l3_main__l4_core,
};
/* Master interfaces on the L4_CORE interconnect */
@@ -113,7 +113,7 @@ static struct omap_hwmod omap3xxx_l4_core_hwmod = {
/* Slave interfaces on the L4_PER interconnect */
static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
- &omap3xxx_l3__l4_per,
+ &omap3xxx_l3_main__l4_per,
};
/* Master interfaces on the L4_PER interconnect */
@@ -155,7 +155,7 @@ static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
/* Master interfaces on the MPU device */
static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
- &omap3xxx_mpu__l3,
+ &omap3xxx_mpu__l3_main,
};
/* MPU */
@@ -169,7 +169,7 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = {
};
static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
- &omap3xxx_l3_hwmod,
+ &omap3xxx_l3_main_hwmod,
&omap3xxx_l4_core_hwmod,
&omap3xxx_l4_per_hwmod,
&omap3xxx_l4_wkup_hwmod,
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 13/13] OMAP3: hwmod data: add data for OMAP3 IVA2
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (11 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 12/13] OMAP2&3: hwmod: Replace l3 -> l3_main Kevin Hilman
@ 2010-06-24 23:44 ` Kevin Hilman
2010-07-02 11:50 ` [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Paul Walmsley
13 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-24 23:44 UTC (permalink / raw)
To: linux-omap; +Cc: paul, Benoit Cousson
Add hwmod data for IVA2 module on OMAP3.
Naming of "iva" instead of "iva2" to be aligned with OMAP4 naming done
by Benoit Cousson.
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 30 ++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 9d9cfb9..d3bf85b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -32,6 +32,7 @@
*/
static struct omap_hwmod omap3xxx_mpu_hwmod;
+static struct omap_hwmod omap3xxx_iva_hwmod;
static struct omap_hwmod omap3xxx_l3_main_hwmod;
static struct omap_hwmod omap3xxx_l4_core_hwmod;
static struct omap_hwmod omap3xxx_l4_per_hwmod;
@@ -168,12 +169,41 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
};
+/*
+ * IVA2_2 interface data
+ */
+
+/* IVA2 <- L3 interface */
+static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
+ .master = &omap3xxx_l3_main_hwmod,
+ .slave = &omap3xxx_iva_hwmod,
+ .clk = "iva2_ck",
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
+ &omap3xxx_l3__iva,
+};
+
+/*
+ * IVA2 (IVA2)
+ */
+
+static struct omap_hwmod omap3xxx_iva_hwmod = {
+ .name = "iva",
+ .class = &iva_hwmod_class,
+ .masters = omap3xxx_iva_masters,
+ .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
+};
+
static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
&omap3xxx_l3_main_hwmod,
&omap3xxx_l4_core_hwmod,
&omap3xxx_l4_per_hwmod,
&omap3xxx_l4_wkup_hwmod,
&omap3xxx_mpu_hwmod,
+ &omap3xxx_iva_hwmod,
NULL,
};
--
1.7.0.2
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4
2010-06-24 23:44 ` [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4 Kevin Hilman
@ 2010-06-25 13:16 ` Cousson, Benoit
2010-06-25 17:27 ` Kevin Hilman
0 siblings, 1 reply; 28+ messages in thread
From: Cousson, Benoit @ 2010-06-25 13:16 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap@vger.kernel.org, paul@pwsan.com, Nayak, Rajendra
Kevin,
On 6/25/2010 1:44 AM, Kevin Hilman wrote:
> From: Rajendra Nayak<rnayak@ti.com>
>
> Enable omap_device layer support for OMAP4, so that drivers can
> use them to enable/idle/shutdown devices.
>
> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Signed-off-by: Kevin Hilman<khilman@deeprootsystems.com>
> ---
> arch/arm/plat-omap/Makefile | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
> index 98f0191..9405831 100644
> --- a/arch/arm/plat-omap/Makefile
> +++ b/arch/arm/plat-omap/Makefile
> @@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
> # omap_device support (OMAP2+ only at the moment)
> obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
> obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
> +obj-$(CONFIG_ARCH_OMAP4) += omap_device.o
>
> obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
> obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
You need as well to enable omap_hwmod.c build otherwise it cannot build
on OMAP4.
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 8ed47ea..5de06c3 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -15,7 +15,7 @@ clock-common = clock.o
clock_common_data.o \
obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(prcm-common)
$(hwmod-common)
obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(prcm-common)
$(hwmod-common)
-obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common)
+obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common) $(hwmod-common)
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
Benoit
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4
2010-06-25 13:16 ` Cousson, Benoit
@ 2010-06-25 17:27 ` Kevin Hilman
0 siblings, 0 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-25 17:27 UTC (permalink / raw)
To: Cousson, Benoit
Cc: linux-omap@vger.kernel.org, paul@pwsan.com, Nayak, Rajendra
"Cousson, Benoit" <b-cousson@ti.com> writes:
> On 6/25/2010 1:44 AM, Kevin Hilman wrote:
>> From: Rajendra Nayak<rnayak@ti.com>
>>
>> Enable omap_device layer support for OMAP4, so that drivers can
>> use them to enable/idle/shutdown devices.
>>
>> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Paul Walmsley<paul@pwsan.com>
>> Signed-off-by: Kevin Hilman<khilman@deeprootsystems.com>
>> ---
>> arch/arm/plat-omap/Makefile | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
>> index 98f0191..9405831 100644
>> --- a/arch/arm/plat-omap/Makefile
>> +++ b/arch/arm/plat-omap/Makefile
>> @@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
>> # omap_device support (OMAP2+ only at the moment)
>> obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
>> obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
>> +obj-$(CONFIG_ARCH_OMAP4) += omap_device.o
>>
>> obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
>> obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
>
> You need as well to enable omap_hwmod.c build otherwise it cannot
> build on OMAP4.
Doh, sorry. Pushed an updated pm-wip/hwmods with this folded into
$SUBJECT patch.
Kevin
> diff --git a/arch/arm/mach-omap2/Makefile
> b/arch/arm/mach-omap2/Makefile index 8ed47ea..5de06c3 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -15,7 +15,7 @@ clock-common = clock.o
> clock_common_data.o \
>
> obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(prcm-common)
> $(hwmod-common)
> obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(prcm-common)
> $(hwmod-common)
> -obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common)
> +obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common) $(hwmod-common)
>
> obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
>
>
> Benoit
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-24 23:44 ` [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3 Kevin Hilman
@ 2010-06-26 16:08 ` DebBarma, Tarun Kanti
2010-06-29 17:29 ` Kevin Hilman
1 sibling, 0 replies; 28+ messages in thread
From: DebBarma, Tarun Kanti @ 2010-06-26 16:08 UTC (permalink / raw)
To: Kevin Hilman, linux-omap@vger.kernel.org; +Cc: paul@pwsan.com
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Kevin Hilman
> Sent: Friday, June 25, 2010 5:15 AM
> To: linux-omap@vger.kernel.org
> Cc: paul@pwsan.com
> Subject: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>
> Create simple omap_devices for the main processors and busses.
>
> This is required to support the forth-coming device-based OPP
> approach, where OPPs are managed and tracked at the device level.
>
> So that these primary devices are available for early PM initialization,
> they are created as early platform_devices.
>
> Cc: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-omap2/devices.c | 2 +
> arch/arm/mach-omap2/io.c | 58
> +++++++++++++++++++++++++++++-
> arch/arm/plat-omap/include/plat/common.h | 4 ++
> 3 files changed, 63 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 03e6c9e..62920ac 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -15,6 +15,7 @@
> #include <linux/platform_device.h>
> #include <linux/io.h>
> #include <linux/clk.h>
> +#include <linux/err.h>
>
> #include <mach/hardware.h>
> #include <mach/irqs.h>
> @@ -29,6 +30,7 @@
> #include <mach/gpio.h>
> #include <plat/mmc.h>
> #include <plat/dma.h>
> +#include <plat/omap_device.h>
>
> #include "mux.h"
>
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index 3cfb425..407498d 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -45,7 +45,7 @@
>
> #include <plat/clockdomain.h>
> #include "clockdomains.h"
> -#include <plat/omap_hwmod.h>
> +#include <plat/omap_device.h>
>
> /*
> * The machine specific code may provide the extra mapping besides the
> @@ -313,6 +313,61 @@ static int __init _omap2_init_reprogram_sdrc(void)
> return v;
> }
>
> +static struct omap_device_pm_latency *pm_lats;
> +
> +static struct device *mpu_dev;
> +static struct device *dsp_dev;
> +static struct device *l3_dev;
> +
> +struct device *omap_get_mpuss_device(void)
> +{
> + WARN_ON_ONCE(!mpu_dev);
> + return mpu_dev;
> +}
> +
> +struct device *omap_get_dsp_device(void)
> +{
> + WARN_ON_ONCE(!dsp_dev);
> + return dsp_dev;
> +}
> +
> +struct device *omap_get_l3_device(void)
> +{
> + WARN_ON_ONCE(!l3_dev);
> + return l3_dev;
> +}
> +
> +/* static int _init_omap_device(struct omap_hwmod *oh, void *user) */
> +static int _init_omap_device(char *name, struct device **new_dev)
> +{
> + struct omap_hwmod *oh;
> + struct omap_device *od;
> +
> + oh = omap_hwmod_lookup(name);
> + if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
> + __func__, name))
> + return -ENODEV;
> +
> + od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, true);
[Tarun Kanti DebBarma]
I am new to hwmod and just trying to catch up. In omap_device_build(...) we anyway pass (oh) and so why also pass (oh->name)? If so we can reduce a parameter.
> + if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n",
> + __func__, name))
> + return -ENODEV;
> +
> + *new_dev = &od->pdev.dev;
> +
> + return 0;
> +}
> +
> +/*
> + * Build omap_devices for processors and bus.
> + */
> +static void omap_init_processor_devices(void)
> +{
> + _init_omap_device("mpu", &mpu_dev);
> + _init_omap_device("iva", &dsp_dev);
> + _init_omap_device("l3_main", &l3_dev);
> +}
> +
> void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
> struct omap_sdrc_params *sdrc_cs1)
> {
> @@ -342,6 +397,7 @@ void __init omap2_init_common_hw(struct
> omap_sdrc_params *sdrc_cs0,
> omap_serial_early_init();
> if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */
> omap_hwmod_late_init();
> + omap_init_processor_devices();
> omap_pm_if_init();
> if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
> omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
> diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-
> omap/include/plat/common.h
> index d265018..9cdd9cd 100644
> --- a/arch/arm/plat-omap/include/plat/common.h
> +++ b/arch/arm/plat-omap/include/plat/common.h
> @@ -87,4 +87,8 @@ void omap2_set_globals_uart(struct omap_globals *);
> } \
> })
>
> +struct device *omap_get_mpuss_device(void);
> +struct device *omap_get_dsp_device(void);
> +struct device *omap_get_l3_device(void);
> +
> #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
> --
> 1.7.0.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-24 23:44 ` [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3 Kevin Hilman
2010-06-26 16:08 ` DebBarma, Tarun Kanti
@ 2010-06-29 17:29 ` Kevin Hilman
2010-06-30 4:18 ` Gopinath, Thara
2010-07-02 11:45 ` Paul Walmsley
1 sibling, 2 replies; 28+ messages in thread
From: Kevin Hilman @ 2010-06-29 17:29 UTC (permalink / raw)
To: linux-omap; +Cc: paul
Kevin Hilman <khilman@deeprootsystems.com> writes:
> Create simple omap_devices for the main processors and busses.
>
> This is required to support the forth-coming device-based OPP
> approach, where OPPs are managed and tracked at the device level.
>
> So that these primary devices are available for early PM initialization,
> they are created as early platform_devices.
I've reworked this patch so that it is no longer using early devices,
updated version below.
This requires delaying some other PM init as well (OMAP PM layer, OPP
layer etc.) so a common_pm_init() function was created and initialized
as a device_initcall().
My pm-hwmods branch has been updated with this version, and the PM
branch now has corresponding changes to the SR/voltage layers to
initialize them as device_initcalls as well.
Kevin
>From 5180e0c52509fcf30ad92503b817326856231efb Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@deeprootsystems.com>
Date: Mon, 21 Jun 2010 10:53:13 -0700
Subject: [PATCH] OMAP: create omap_devices for MPU, DSP, L3
Create simple omap_devices for the main processors and busses.
This is required to support the forth-coming device-based OPP
approach, where OPPs are managed and tracked at the device level.
Also, move these common PM init functions into a common_pm_init call
that is called as a device_initcall(). The PM init is done at this level
to ensure that the driver core is initialized before initialized.
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/devices.c | 2 +
arch/arm/mach-omap2/io.c | 67 +++++++++++++++++++++++++++++-
arch/arm/plat-omap/include/plat/common.h | 4 ++
3 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 03e6c9e..62920ac 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
@@ -29,6 +30,7 @@
#include <mach/gpio.h>
#include <plat/mmc.h>
#include <plat/dma.h>
+#include <plat/omap_device.h>
#include "mux.h"
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3cfb425..f406fac 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -45,7 +45,7 @@
#include <plat/clockdomain.h>
#include "clockdomains.h"
-#include <plat/omap_hwmod.h>
+#include <plat/omap_device.h>
/*
* The machine specific code may provide the extra mapping besides the
@@ -313,6 +313,70 @@ static int __init _omap2_init_reprogram_sdrc(void)
return v;
}
+static struct omap_device_pm_latency *pm_lats;
+
+static struct device *mpu_dev;
+static struct device *dsp_dev;
+static struct device *l3_dev;
+
+struct device *omap_get_mpuss_device(void)
+{
+ WARN_ON_ONCE(!mpu_dev);
+ return mpu_dev;
+}
+
+struct device *omap_get_dsp_device(void)
+{
+ WARN_ON_ONCE(!dsp_dev);
+ return dsp_dev;
+}
+
+struct device *omap_get_l3_device(void)
+{
+ WARN_ON_ONCE(!l3_dev);
+ return l3_dev;
+}
+
+/* static int _init_omap_device(struct omap_hwmod *oh, void *user) */
+static int _init_omap_device(char *name, struct device **new_dev)
+{
+ struct omap_hwmod *oh;
+ struct omap_device *od;
+
+ oh = omap_hwmod_lookup(name);
+ if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
+ __func__, name))
+ return -ENODEV;
+
+ od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false);
+ if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n",
+ __func__, name))
+ return -ENODEV;
+
+ *new_dev = &od->pdev.dev;
+
+ return 0;
+}
+
+/*
+ * Build omap_devices for processors and bus.
+ */
+static void omap_init_processor_devices(void)
+{
+ _init_omap_device("mpu", &mpu_dev);
+ _init_omap_device("iva", &dsp_dev);
+ _init_omap_device("l3_main", &l3_dev);
+}
+
+static int __init omap_common_pm_init(void)
+{
+ omap_init_processor_devices();
+ omap_pm_if_init();
+
+ return 0;
+}
+device_initcall(omap_common_pm_init);
+
void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1)
{
@@ -342,7 +406,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
omap_serial_early_init();
if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */
omap_hwmod_late_init();
- omap_pm_if_init();
if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
_omap2_init_reprogram_sdrc();
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index d265018..9cdd9cd 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -87,4 +87,8 @@ void omap2_set_globals_uart(struct omap_globals *);
} \
})
+struct device *omap_get_mpuss_device(void);
+struct device *omap_get_dsp_device(void);
+struct device *omap_get_l3_device(void);
+
#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
--
1.7.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-29 17:29 ` Kevin Hilman
@ 2010-06-30 4:18 ` Gopinath, Thara
2010-06-30 20:38 ` Kevin Hilman
2010-07-02 11:45 ` Paul Walmsley
1 sibling, 1 reply; 28+ messages in thread
From: Gopinath, Thara @ 2010-06-30 4:18 UTC (permalink / raw)
To: Kevin Hilman, linux-omap@vger.kernel.org; +Cc: paul@pwsan.com
>>-----Original Message-----
>>From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Kevin
>>Hilman
>>Sent: Tuesday, June 29, 2010 11:00 PM
>>To: linux-omap@vger.kernel.org
>>Cc: paul@pwsan.com
>>Subject: Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>>
>>Kevin Hilman <khilman@deeprootsystems.com> writes:
>>
>>> Create simple omap_devices for the main processors and busses.
>>>
>>> This is required to support the forth-coming device-based OPP
>>> approach, where OPPs are managed and tracked at the device level.
>>>
>>> So that these primary devices are available for early PM initialization,
>>> they are created as early platform_devices.
>>
>>I've reworked this patch so that it is no longer using early devices,
>>updated version below.
>>
>>This requires delaying some other PM init as well (OMAP PM layer, OPP
>>layer etc.) so a common_pm_init() function was created and initialized
>>as a device_initcall().
>>
>>My pm-hwmods branch has been updated with this version, and the PM
>>branch now has corresponding changes to the SR/voltage layers to
>>initialize them as device_initcalls as well.
>>
>>Kevin
>>
>>From 5180e0c52509fcf30ad92503b817326856231efb Mon Sep 17 00:00:00 2001
>>From: Kevin Hilman <khilman@deeprootsystems.com>
>>Date: Mon, 21 Jun 2010 10:53:13 -0700
>>Subject: [PATCH] OMAP: create omap_devices for MPU, DSP, L3
>>
>>Create simple omap_devices for the main processors and busses.
>>
>>This is required to support the forth-coming device-based OPP
>>approach, where OPPs are managed and tracked at the device level.
>>
>>Also, move these common PM init functions into a common_pm_init call
>>that is called as a device_initcall(). The PM init is done at this level
>>to ensure that the driver core is initialized before initialized.
>>
>>Cc: Paul Walmsley <paul@pwsan.com>
>>Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
>>---
>> arch/arm/mach-omap2/devices.c | 2 +
>> arch/arm/mach-omap2/io.c | 67 +++++++++++++++++++++++++++++-
>> arch/arm/plat-omap/include/plat/common.h | 4 ++
>> 3 files changed, 71 insertions(+), 2 deletions(-)
>>
>>diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
>>index 03e6c9e..62920ac 100644
>>--- a/arch/arm/mach-omap2/devices.c
>>+++ b/arch/arm/mach-omap2/devices.c
>>@@ -15,6 +15,7 @@
>> #include <linux/platform_device.h>
>> #include <linux/io.h>
>> #include <linux/clk.h>
>>+#include <linux/err.h>
>>
>> #include <mach/hardware.h>
>> #include <mach/irqs.h>
>>@@ -29,6 +30,7 @@
>> #include <mach/gpio.h>
>> #include <plat/mmc.h>
>> #include <plat/dma.h>
>>+#include <plat/omap_device.h>
>>
>> #include "mux.h"
>>
>>diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
>>index 3cfb425..f406fac 100644
>>--- a/arch/arm/mach-omap2/io.c
>>+++ b/arch/arm/mach-omap2/io.c
>>@@ -45,7 +45,7 @@
>>
>> #include <plat/clockdomain.h>
>> #include "clockdomains.h"
>>-#include <plat/omap_hwmod.h>
>>+#include <plat/omap_device.h>
>>
>> /*
>> * The machine specific code may provide the extra mapping besides the
>>@@ -313,6 +313,70 @@ static int __init _omap2_init_reprogram_sdrc(void)
>> return v;
>> }
>>
>>+static struct omap_device_pm_latency *pm_lats;
>>+
>>+static struct device *mpu_dev;
>>+static struct device *dsp_dev;
>>+static struct device *l3_dev;
>>+
>>+struct device *omap_get_mpuss_device(void)
>>+{
>>+ WARN_ON_ONCE(!mpu_dev);
>>+ return mpu_dev;
>>+}
>>+
>>+struct device *omap_get_dsp_device(void)
>>+{
>>+ WARN_ON_ONCE(!dsp_dev);
>>+ return dsp_dev;
>>+}
>>+
>>+struct device *omap_get_l3_device(void)
>>+{
>>+ WARN_ON_ONCE(!l3_dev);
>>+ return l3_dev;
>>+}
>>+
>>+/* static int _init_omap_device(struct omap_hwmod *oh, void *user) */
>>+static int _init_omap_device(char *name, struct device **new_dev)
>>+{
>>+ struct omap_hwmod *oh;
>>+ struct omap_device *od;
>>+
>>+ oh = omap_hwmod_lookup(name);
>>+ if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
>>+ __func__, name))
>>+ return -ENODEV;
>>+
>>+ od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false);
>>+ if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n",
>>+ __func__, name))
>>+ return -ENODEV;
>>+
>>+ *new_dev = &od->pdev.dev;
>>+
>>+ return 0;
>>+}
>>+
>>+/*
>>+ * Build omap_devices for processors and bus.
>>+ */
>>+static void omap_init_processor_devices(void)
>>+{
>>+ _init_omap_device("mpu", &mpu_dev);
>>+ _init_omap_device("iva", &dsp_dev);
>>+ _init_omap_device("l3_main", &l3_dev);
>>+}
>>+
>>+static int __init omap_common_pm_init(void)
>>+{
>>+ omap_init_processor_devices();
>>+ omap_pm_if_init();
>>+
>>+ return 0;
>>+}
>>+device_initcall(omap_common_pm_init);
Kevin,
But I guess opp layer is still getting initialized before this. Esp if the board files are initializing the opp structures. Or do you have a patch to fix it in some other branch ?
Regards,
Thara
>>+
>> void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
>> struct omap_sdrc_params *sdrc_cs1)
>> {
>>@@ -342,7 +406,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
>> omap_serial_early_init();
>> if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */
>> omap_hwmod_late_init();
>>- omap_pm_if_init();
>> if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
>> omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
>> _omap2_init_reprogram_sdrc();
>>diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
>>index d265018..9cdd9cd 100644
>>--- a/arch/arm/plat-omap/include/plat/common.h
>>+++ b/arch/arm/plat-omap/include/plat/common.h
>>@@ -87,4 +87,8 @@ void omap2_set_globals_uart(struct omap_globals *);
>> } \
>> })
>>
>>+struct device *omap_get_mpuss_device(void);
>>+struct device *omap_get_dsp_device(void);
>>+struct device *omap_get_l3_device(void);
>>+
>> #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
>>--
>>1.7.1
>>
>>--
>>To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-30 4:18 ` Gopinath, Thara
@ 2010-06-30 20:38 ` Kevin Hilman
2010-07-01 4:04 ` Gopinath, Thara
0 siblings, 1 reply; 28+ messages in thread
From: Kevin Hilman @ 2010-06-30 20:38 UTC (permalink / raw)
To: Gopinath, Thara; +Cc: linux-omap@vger.kernel.org, paul@pwsan.com
"Gopinath, Thara" <thara@ti.com> writes:
[...]
>>>+static int __init omap_common_pm_init(void)
>>>+{
>>>+ omap_init_processor_devices();
>>>+ omap_pm_if_init();
>>>+
>>>+ return 0;
>>>+}
>>>+device_initcall(omap_common_pm_init);
>
> But I guess opp layer is still getting initialized before this. Esp if
> the board files are initializing the opp structures. Or do you have a
> patch to fix it in some other branch ?
>
The common OPP init will be done in this function as well (see current
PM branch.) Board files no longer do OPP init (by default) as it is
handled by common code. Only boards that add OPPs need to call the init
function, and we'll have to figure out way to handle that late.
Kevin
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-30 20:38 ` Kevin Hilman
@ 2010-07-01 4:04 ` Gopinath, Thara
2010-07-01 4:16 ` Shilimkar, Santosh
0 siblings, 1 reply; 28+ messages in thread
From: Gopinath, Thara @ 2010-07-01 4:04 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap@vger.kernel.org, paul@pwsan.com
>>-----Original Message-----
>>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>Sent: Thursday, July 01, 2010 2:09 AM
>>To: Gopinath, Thara
>>Cc: linux-omap@vger.kernel.org; paul@pwsan.com
>>Subject: Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>>
>>"Gopinath, Thara" <thara@ti.com> writes:
>>
>>[...]
>>
>>>>>+static int __init omap_common_pm_init(void)
>>>>>+{
>>>>>+ omap_init_processor_devices();
>>>>>+ omap_pm_if_init();
>>>>>+
>>>>>+ return 0;
>>>>>+}
>>>>>+device_initcall(omap_common_pm_init);
>>
>>>
>>> But I guess opp layer is still getting initialized before this. Esp if
>>> the board files are initializing the opp structures. Or do you have a
>>> patch to fix it in some other branch ?
>>>
>>
>>The common OPP init will be done in this function as well (see current
>>PM branch.) Board files no longer do OPP init (by default) as it is
>>handled by common code. Only boards that add OPPs need to call the init
>>function, and we'll have to figure out way to handle that late.
Yes you are correct. The common OPP init is done in this function. One other thing I am a bit worried about is the order of initializations. The order should be
Opp layer
Voltage layer
Smartreflex device layer.
Presently all three layers are device_initcalls. The sequence is maintained due to the way these drivers are compiled in. We need to make them work independent of the way the drivers are compiled.
One way is to have the omap_common_pm_init call into the inits of all these layers sequentially and
remove the separate init calls. Any other suggestion anyone?
Kevin, by the way your latest pm-sr branch with the above changes works. I tested it yesterday.
Regards
Thara
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-07-01 4:04 ` Gopinath, Thara
@ 2010-07-01 4:16 ` Shilimkar, Santosh
2010-07-01 4:20 ` Gopinath, Thara
0 siblings, 1 reply; 28+ messages in thread
From: Shilimkar, Santosh @ 2010-07-01 4:16 UTC (permalink / raw)
To: Gopinath, Thara, Kevin Hilman; +Cc: linux-omap@vger.kernel.org, paul@pwsan.com
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Gopinath, Thara
> Sent: Thursday, July 01, 2010 9:35 AM
> To: Kevin Hilman
> Cc: linux-omap@vger.kernel.org; paul@pwsan.com
> Subject: RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>
>
>
> >>-----Original Message-----
> >>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
> >>Sent: Thursday, July 01, 2010 2:09 AM
> >>To: Gopinath, Thara
> >>Cc: linux-omap@vger.kernel.org; paul@pwsan.com
> >>Subject: Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
> >>
> >>"Gopinath, Thara" <thara@ti.com> writes:
> >>
> >>[...]
> >>
> >>>>>+static int __init omap_common_pm_init(void)
> >>>>>+{
> >>>>>+ omap_init_processor_devices();
> >>>>>+ omap_pm_if_init();
> >>>>>+
> >>>>>+ return 0;
> >>>>>+}
> >>>>>+device_initcall(omap_common_pm_init);
> >>
> >>>
> >>> But I guess opp layer is still getting initialized before this. Esp if
> >>> the board files are initializing the opp structures. Or do you have a
> >>> patch to fix it in some other branch ?
> >>>
> >>
> >>The common OPP init will be done in this function as well (see current
> >>PM branch.) Board files no longer do OPP init (by default) as it is
> >>handled by common code. Only boards that add OPPs need to call the init
> >>function, and we'll have to figure out way to handle that late.
>
> Yes you are correct. The common OPP init is done in this function. One
> other thing I am a bit worried about is the order of initializations. The
> order should be
> Opp layer
> Voltage layer
> Smartreflex device layer.
>
> Presently all three layers are device_initcalls. The sequence is
> maintained due to the way these drivers are compiled in. We need to make
> them work independent of the way the drivers are compiled.
> One way is to have the omap_common_pm_init call into the inits of all
> these layers sequentially and
> remove the separate init calls. Any other suggestion anyone?
>
Grouping the initcalls is good idea but with this you can never be
able to build any of these as loadable modules.
This is valid only if any of above you plan to build as loadable module
> Kevin, by the way your latest pm-sr branch with the above changes works. I
> tested it yesterday.
>
> Regards
> Thara
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-07-01 4:16 ` Shilimkar, Santosh
@ 2010-07-01 4:20 ` Gopinath, Thara
0 siblings, 0 replies; 28+ messages in thread
From: Gopinath, Thara @ 2010-07-01 4:20 UTC (permalink / raw)
To: Shilimkar, Santosh, Kevin Hilman
Cc: linux-omap@vger.kernel.org, paul@pwsan.com
>>-----Original Message-----
>>From: Shilimkar, Santosh
>>Sent: Thursday, July 01, 2010 9:46 AM
>>To: Gopinath, Thara; Kevin Hilman
>>Cc: linux-omap@vger.kernel.org; paul@pwsan.com
>>Subject: RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>>
>>> -----Original Message-----
>>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>>> owner@vger.kernel.org] On Behalf Of Gopinath, Thara
>>> Sent: Thursday, July 01, 2010 9:35 AM
>>> To: Kevin Hilman
>>> Cc: linux-omap@vger.kernel.org; paul@pwsan.com
>>> Subject: RE: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>>>
>>>
>>>
>>> >>-----Original Message-----
>>> >>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>> >>Sent: Thursday, July 01, 2010 2:09 AM
>>> >>To: Gopinath, Thara
>>> >>Cc: linux-omap@vger.kernel.org; paul@pwsan.com
>>> >>Subject: Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
>>> >>
>>> >>"Gopinath, Thara" <thara@ti.com> writes:
>>> >>
>>> >>[...]
>>> >>
>>> >>>>>+static int __init omap_common_pm_init(void)
>>> >>>>>+{
>>> >>>>>+ omap_init_processor_devices();
>>> >>>>>+ omap_pm_if_init();
>>> >>>>>+
>>> >>>>>+ return 0;
>>> >>>>>+}
>>> >>>>>+device_initcall(omap_common_pm_init);
>>> >>
>>> >>>
>>> >>> But I guess opp layer is still getting initialized before this. Esp if
>>> >>> the board files are initializing the opp structures. Or do you have a
>>> >>> patch to fix it in some other branch ?
>>> >>>
>>> >>
>>> >>The common OPP init will be done in this function as well (see current
>>> >>PM branch.) Board files no longer do OPP init (by default) as it is
>>> >>handled by common code. Only boards that add OPPs need to call the init
>>> >>function, and we'll have to figure out way to handle that late.
>>>
>>> Yes you are correct. The common OPP init is done in this function. One
>>> other thing I am a bit worried about is the order of initializations. The
>>> order should be
>>> Opp layer
>>> Voltage layer
>>> Smartreflex device layer.
>>>
>>> Presently all three layers are device_initcalls. The sequence is
>>> maintained due to the way these drivers are compiled in. We need to make
>>> them work independent of the way the drivers are compiled.
>>> One way is to have the omap_common_pm_init call into the inits of all
>>> these layers sequentially and
>>> remove the separate init calls. Any other suggestion anyone?
>>>
>>Grouping the initcalls is good idea but with this you can never be
>>able to build any of these as loadable modules.
>>This is valid only if any of above you plan to build as loadable module
I do not think we need to build voltage, opp and smartreflex as modules. I would consider them as system critical layers and should be part of the basic kernel. Do you see a use case where these layers need to be modules? Also all these layers are stand alone libraries. Not registered with any bus or anything. So we will have to do some work if we need to load them as modules.
Regards
Thara
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 09/13] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer
2010-06-24 23:44 ` [PATCH v2 09/13] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer Kevin Hilman
@ 2010-07-02 9:05 ` Paul Walmsley
0 siblings, 0 replies; 28+ messages in thread
From: Paul Walmsley @ 2010-07-02 9:05 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap
Hi,
On Thu, 24 Jun 2010, Kevin Hilman wrote:
> The omap_hwmod struct has a field to track the omap_device that is
> attached to it, but it was not being assigned. Fix by assigning omap_device
> pointer when omap_device is built.
>
> Cc: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Just FYI, this patch has been converted to use an array index instead of
pointer arithmetic - edited patch below.
- Paul
OMAP: omap_device: ensure hwmod tracks attached omap_device pointer
From: Kevin Hilman <khilman@deeprootsystems.com>
The omap_hwmod struct has a field to track the omap_device that is
attached to it, but it was not being assigned. Fix by assigning omap_device
pointer when omap_device is built.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
[paul@pwsan.com: use an array index rather than pointer arithmetic]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/plat-omap/omap_device.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index f899603..f9dec0d 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -359,7 +359,7 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
struct omap_device *od;
char *pdev_name2;
struct resource *res = NULL;
- int res_count;
+ int i, res_count;
struct omap_hwmod **hwmods;
if (!ohs || oh_cnt == 0 || !pdev_name)
@@ -416,6 +416,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
else
ret = omap_device_register(od);
+ for (i = 0; i < oh_cnt; i++)
+ hwmods[i]->od = od;
+
if (ret)
goto odbs_exit4;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-06-29 17:29 ` Kevin Hilman
2010-06-30 4:18 ` Gopinath, Thara
@ 2010-07-02 11:45 ` Paul Walmsley
2010-07-02 15:08 ` Paul Walmsley
1 sibling, 1 reply; 28+ messages in thread
From: Paul Walmsley @ 2010-07-02 11:45 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap
Hi,
On Tue, 29 Jun 2010, Kevin Hilman wrote:
> Kevin Hilman <khilman@deeprootsystems.com> writes:
>
> > Create simple omap_devices for the main processors and busses.
> >
> > This is required to support the forth-coming device-based OPP
> > approach, where OPPs are managed and tracked at the device level.
> >
> > So that these primary devices are available for early PM initialization,
> > they are created as early platform_devices.
>
> I've reworked this patch so that it is no longer using early devices,
> updated version below.
>
> This requires delaying some other PM init as well (OMAP PM layer, OPP
> layer etc.) so a common_pm_init() function was created and initialized
> as a device_initcall().
>
> My pm-hwmods branch has been updated with this version, and the PM
> branch now has corresponding changes to the SR/voltage layers to
> initialize them as device_initcalls as well.
Thanks for these changes, this seems better than the early_platform_device
approach. I've made a few more changes:
- the newly-created functions have been moved to a new file,
mach-omap2/pm.c. I'm not convinced that this file is the right place
for these functions either, but it didn't make sense to me to create
these functions in mach-omap2/io.c;
- the functions have been renamed to start with "omap2" to indicate that
they are OMAP2+-only functions;
- sparse warnings have been resolved.
Revised patch below.
- Paul
OMAP: PM: create omap_devices for MPU, DSP, L3
From: Kevin Hilman <khilman@deeprootsystems.com>
Create simple omap_devices for the main processors and busses.
This is required to support the forth-coming device-based OPP
approach, where OPPs are managed and tracked at the device level.
Also, move these common PM init functions into a common_pm_init call
that is called as a device_initcall(). The PM init is done at this level
to ensure that the driver core is initialized before initialized.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
[paul@pwsan.com: sparse warnings cleaned up; newly-created functions moved
from mach-omap2/io.c to mach-omap2/pm.c; newly-created functions renamed
to start with "omap2" rather than "omap"]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/Makefile | 2 -
arch/arm/mach-omap2/io.c | 2 -
arch/arm/mach-omap2/pm.c | 84 ++++++++++++++++++++++++++++++
arch/arm/plat-omap/include/plat/common.h | 4 +
4 files changed, 90 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mach-omap2/pm.c
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 2fa3418..213f1df 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -3,7 +3,7 @@
#
# Common support
-obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o
+obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o
omap-2-3-common = irq.o sdrc.o
hwmod-common = omap_hwmod.o \
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 05c9cdb..2b983ac 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -44,6 +44,7 @@
#include <plat/clockdomain.h>
#include "clockdomains.h"
+
#include <plat/omap_hwmod.h>
/*
@@ -346,7 +347,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */
omap_hwmod_late_init(skip_setup_idle);
- omap_pm_if_init();
if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
_omap2_init_reprogram_sdrc();
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
new file mode 100644
index 0000000..68f9f2e
--- /dev/null
+++ b/arch/arm/mach-omap2/pm.c
@@ -0,0 +1,84 @@
+/*
+ * pm.c - Common OMAP2+ power management-related code
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc.
+ * Copyright (C) 2010 Nokia Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/err.h>
+
+#include <plat/omap-pm.h>
+#include <plat/omap_device.h>
+#include <plat/common.h>
+
+static struct omap_device_pm_latency *pm_lats;
+
+static struct device *mpu_dev;
+static struct device *dsp_dev;
+static struct device *l3_dev;
+
+struct device *omap2_get_mpuss_device(void)
+{
+ WARN_ON_ONCE(!mpu_dev);
+ return mpu_dev;
+}
+
+struct device *omap2_get_dsp_device(void)
+{
+ WARN_ON_ONCE(!dsp_dev);
+ return dsp_dev;
+}
+
+struct device *omap2_get_l3_device(void)
+{
+ WARN_ON_ONCE(!l3_dev);
+ return l3_dev;
+}
+
+/* static int _init_omap_device(struct omap_hwmod *oh, void *user) */
+static int _init_omap_device(char *name, struct device **new_dev)
+{
+ struct omap_hwmod *oh;
+ struct omap_device *od;
+
+ oh = omap_hwmod_lookup(name);
+ if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
+ __func__, name))
+ return -ENODEV;
+
+ od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false);
+ if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n",
+ __func__, name))
+ return -ENODEV;
+
+ *new_dev = &od->pdev.dev;
+
+ return 0;
+}
+
+/*
+ * Build omap_devices for processors and bus.
+ */
+static void omap2_init_processor_devices(void)
+{
+ _init_omap_device("mpu", &mpu_dev);
+ _init_omap_device("iva", &dsp_dev);
+ _init_omap_device("l3_main", &l3_dev);
+}
+
+static int __init omap2_common_pm_init(void)
+{
+ omap2_init_processor_devices();
+ omap_pm_if_init();
+
+ return 0;
+}
+device_initcall(omap2_common_pm_init);
+
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index 5e4afbe..5cf9509 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -89,4 +89,8 @@ void omap2_set_globals_uart(struct omap_globals *);
} \
})
+extern struct device *omap2_get_mpuss_device(void);
+extern struct device *omap2_get_dsp_device(void);
+extern struct device *omap2_get_l3_device(void);
+
#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 04/13] OMAP: hwmod: Fix the missing braces
2010-06-24 23:44 ` [PATCH v2 04/13] OMAP: hwmod: Fix the missing braces Kevin Hilman
@ 2010-07-02 11:49 ` Paul Walmsley
0 siblings, 0 replies; 28+ messages in thread
From: Paul Walmsley @ 2010-07-02 11:49 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap, Benoit Cousson, Sergei Shtylyov
Hi,
On Thu, 24 Jun 2010, Kevin Hilman wrote:
> From: Benoit Cousson <b-cousson@ti.com>
>
> As reported by Sergei, a couple of braces were missing after
> the WARM removal patch.
>
> [07/22] OMAP: hwmod: Replace WARN by pr_warning if clock lookup failed
>
> https://patchwork.kernel.org/patch/100756/
>
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Sergei Shtylyov <sshtylyov@mvista.com>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This one has already been sent to Tony as part of the -rc series, so I've
dropped this one.
- Paul
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
` (12 preceding siblings ...)
2010-06-24 23:44 ` [PATCH v2 13/13] OMAP3: hwmod data: add data for OMAP3 IVA2 Kevin Hilman
@ 2010-07-02 11:50 ` Paul Walmsley
13 siblings, 0 replies; 28+ messages in thread
From: Paul Walmsley @ 2010-07-02 11:50 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap
Hi,
On Thu, 24 Jun 2010, Kevin Hilman wrote:
> This is a series of fixes & updates mostly to hwmod and omap_device
> that are required for the on-going hwmod conversions and runtime PM
> conversion of drivers.
I've taken patches 1, 3, 6, 11, 12, and 13 as-is; and handled the rest as
per the mailing list comments on the individual patches.
Thanks Kevin,
- Paul
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3
2010-07-02 11:45 ` Paul Walmsley
@ 2010-07-02 15:08 ` Paul Walmsley
0 siblings, 0 replies; 28+ messages in thread
From: Paul Walmsley @ 2010-07-02 15:08 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap
[-- Attachment #1: Type: TEXT/PLAIN, Size: 5538 bytes --]
Hi,
On Fri, 2 Jul 2010, Paul Walmsley wrote:
> On Tue, 29 Jun 2010, Kevin Hilman wrote:
>
> > Kevin Hilman <khilman@deeprootsystems.com> writes:
> >
> > > Create simple omap_devices for the main processors and busses.
> >
> > I've reworked this patch so that it is no longer using early devices,
> > updated version below.
>
> Thanks for these changes, this seems better than the early_platform_device
> approach. I've made a few more changes:
Just FYI, after this patch, 2420 platforms (and presumably 2430 platforms
also) emit this warning on boot:
[ 0.057067] WARNING: at arch/arm/mach-omap2/pm.c:53 _init_omap_device+0x80/0xa0()
[ 0.057098] _init_omap_device: could not find omap_hwmod for iva
[ 0.057128] Modules linked in:
[ 0.057189] [<c002a580>] (unwind_backtrace+0x0/0xec) from [<c004a084>] (warn_slowpath_common+0x4c/0x64)
[ 0.057250] [<c004a084>] (warn_slowpath_common+0x4c/0x64) from [<c004a11c>] (warn_slowpath_fmt+0x2c/0x3)
[ 0.057342] [<c004a11c>] (warn_slowpath_fmt+0x2c/0x3c) from [<c002ef90>] (_init_omap_device+0x80/0xa0)
[ 0.057403] [<c002ef90>] (_init_omap_device+0x80/0xa0) from [<c000e360>] (omap2_common_pm_init+0x20/0x4)
[ 0.057495] [<c000e360>] (omap2_common_pm_init+0x20/0x48) from [<c0024384>] (do_one_initcall+0x5c/0x1b4)
[ 0.057556] [<c0024384>] (do_one_initcall+0x5c/0x1b4) from [<c00083f8>] (kernel_init+0x90/0x144)
[ 0.057647] [<c00083f8>] (kernel_init+0x90/0x144) from [<c0025dd0>] (kernel_thread_exit+0x0/0x8)
[ 0.057708] ---[ end trace dec6997083161631 ]---
This appears to be due to the lack of an IVA hwmod for 2420/2430, so I've
added one based on Benoît's patch for 3xxx (below). This fixes the
warnings.
- Paul
OMAP2: hwmod data: add IVA1 (2420), IVA2 (2430) hwmods
From: Paul Walmsley <paul@pwsan.com>
Add IVA1 hwmod data for OMAP2420 and IVA2 hwmod data for 2430. The data
is based on Benoît Cousson's hwmod data for the OMAP3 IVA blocks.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 30 ++++++++++++++++++++++++++
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 32 ++++++++++++++++++++++++++--
2 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 8c90b27..3cc768e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -30,6 +30,7 @@
*/
static struct omap_hwmod omap2420_mpu_hwmod;
+static struct omap_hwmod omap2420_iva_hwmod;
static struct omap_hwmod omap2420_l3_main_hwmod;
static struct omap_hwmod omap2420_l4_core_hwmod;
@@ -136,11 +137,40 @@ static struct omap_hwmod omap2420_mpu_hwmod = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
};
+/*
+ * IVA1 interface data
+ */
+
+/* IVA <- L3 interface */
+static struct omap_hwmod_ocp_if omap2420_l3__iva = {
+ .master = &omap2420_l3_main_hwmod,
+ .slave = &omap2420_iva_hwmod,
+ .clk = "iva1_ifck",
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
+ &omap2420_l3__iva,
+};
+
+/*
+ * IVA2 (IVA2)
+ */
+
+static struct omap_hwmod omap2420_iva_hwmod = {
+ .name = "iva",
+ .class = &iva_hwmod_class,
+ .masters = omap2420_iva_masters,
+ .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
+};
+
static __initdata struct omap_hwmod *omap2420_hwmods[] = {
&omap2420_l3_main_hwmod,
&omap2420_l4_core_hwmod,
&omap2420_l4_wkup_hwmod,
&omap2420_mpu_hwmod,
+ &omap2420_iva_hwmod,
NULL,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index c0f3311..4526628 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -30,6 +30,7 @@
*/
static struct omap_hwmod omap2430_mpu_hwmod;
+static struct omap_hwmod omap2430_iva_hwmod;
static struct omap_hwmod omap2430_l3_main_hwmod;
static struct omap_hwmod omap2430_l4_core_hwmod;
@@ -70,8 +71,6 @@ static struct omap_hwmod omap2430_l3_main_hwmod = {
};
static struct omap_hwmod omap2430_l4_wkup_hwmod;
-static struct omap_hwmod omap2430_mmc1_hwmod;
-static struct omap_hwmod omap2430_mmc2_hwmod;
/* L4_CORE -> L4_WKUP interface */
static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
@@ -138,11 +137,40 @@ static struct omap_hwmod omap2430_mpu_hwmod = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
};
+/*
+ * IVA2_1 interface data
+ */
+
+/* IVA2 <- L3 interface */
+static struct omap_hwmod_ocp_if omap2430_l3__iva = {
+ .master = &omap2430_l3_main_hwmod,
+ .slave = &omap2430_iva_hwmod,
+ .clk = "dsp_fck",
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
+ &omap2430_l3__iva,
+};
+
+/*
+ * IVA2 (IVA2)
+ */
+
+static struct omap_hwmod omap2430_iva_hwmod = {
+ .name = "iva",
+ .class = &iva_hwmod_class,
+ .masters = omap2430_iva_masters,
+ .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
+};
+
static __initdata struct omap_hwmod *omap2430_hwmods[] = {
&omap2430_l3_main_hwmod,
&omap2430_l4_core_hwmod,
&omap2430_l4_wkup_hwmod,
&omap2430_mpu_hwmod,
+ &omap2430_iva_hwmod,
NULL,
};
^ permalink raw reply related [flat|nested] 28+ messages in thread
end of thread, other threads:[~2010-07-02 15:08 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-24 23:44 [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 01/13] OMAP24xx: CM: fix mask used for checking IDLEST status Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 02/13] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 03/13] OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 04/13] OMAP: hwmod: Fix the missing braces Kevin Hilman
2010-07-02 11:49 ` Paul Walmsley
2010-06-24 23:44 ` [PATCH v2 05/13] OMAP2&3: hwmod: Remove _hwmod prefix in name string Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 06/13] OMAP: hwmod: add non-locking versions of enable and idle functions Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 07/13] OMAP: hwmod: don't auto-disable hwmod when !CONFIG_PM_RUNTIME Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 08/13] OMAP4: hwmod: Enable omap_device build for OMAP4 Kevin Hilman
2010-06-25 13:16 ` Cousson, Benoit
2010-06-25 17:27 ` Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 09/13] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer Kevin Hilman
2010-07-02 9:05 ` Paul Walmsley
2010-06-24 23:44 ` [PATCH v2 10/13] OMAP: create omap_devices for MPU, DSP, L3 Kevin Hilman
2010-06-26 16:08 ` DebBarma, Tarun Kanti
2010-06-29 17:29 ` Kevin Hilman
2010-06-30 4:18 ` Gopinath, Thara
2010-06-30 20:38 ` Kevin Hilman
2010-07-01 4:04 ` Gopinath, Thara
2010-07-01 4:16 ` Shilimkar, Santosh
2010-07-01 4:20 ` Gopinath, Thara
2010-07-02 11:45 ` Paul Walmsley
2010-07-02 15:08 ` Paul Walmsley
2010-06-24 23:44 ` [PATCH v2 11/13] OMAP: hwmod data: add class for IVA hwmods Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 12/13] OMAP2&3: hwmod: Replace l3 -> l3_main Kevin Hilman
2010-06-24 23:44 ` [PATCH v2 13/13] OMAP3: hwmod data: add data for OMAP3 IVA2 Kevin Hilman
2010-07-02 11:50 ` [PATCH v2 00/13] OMAP: CM, hwmod, omap_device fixes and updates Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox