aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIlya Yanok <yanok@emcraft.com>2011-12-27 18:31:33 -0500
committerPaul Walmsley <paul@pwsan.com>2012-01-25 16:09:13 -0500
commit1d2f56c84f100890476e62d83062cfe9965fc7b4 (patch)
tree1656a88616dcc125c49101f0a877c44e320eb1a0 /arch
parentd19e8f2e44a34b2a461f67ce9d0cb5bd43197c1e (diff)
ARM: OMAP3: hwmod data: register dss hwmods after dss_core
dss_core has to be initialized before any other DSS hwmod. Currently this is broken as dss_core is listed in chip/revision specific hwmod lists while other DSS hwmods are listed in common list which is registered first. This patch moves DSS hwmods (except for dss_core) to the separate list which is registered last to ensure that dss_core is already registered. This solves the problem with BUG() in L3 interrupt handler on boards with DSS enabled in bootloader. The long-term fix to this is to ensure modules are set up in dependency order in the hwmod core code. CC: Tomi Valkeinen <tomi.valkeinen@ti.com> CC: Archit Taneja <archit@ti.com> CC: Paul Walmsley <paul@pwsan.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com> [paul@pwsan.com: add notes that this is just a temporary workaround until hwmod dependencies are added] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index b176d44e6c9..3c8dd928628 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3545,12 +3545,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
3545 &omap3xxx_uart2_hwmod, 3545 &omap3xxx_uart2_hwmod,
3546 &omap3xxx_uart3_hwmod, 3546 &omap3xxx_uart3_hwmod,
3547 3547
3548 /* dss class */
3549 &omap3xxx_dss_dispc_hwmod,
3550 &omap3xxx_dss_dsi1_hwmod,
3551 &omap3xxx_dss_rfbi_hwmod,
3552 &omap3xxx_dss_venc_hwmod,
3553
3554 /* i2c class */ 3548 /* i2c class */
3555 &omap3xxx_i2c1_hwmod, 3549 &omap3xxx_i2c1_hwmod,
3556 &omap3xxx_i2c2_hwmod, 3550 &omap3xxx_i2c2_hwmod,
@@ -3657,6 +3651,15 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = {
3657 NULL 3651 NULL
3658}; 3652};
3659 3653
3654static __initdata struct omap_hwmod *omap3xxx_dss_hwmods[] = {
3655 /* dss class */
3656 &omap3xxx_dss_dispc_hwmod,
3657 &omap3xxx_dss_dsi1_hwmod,
3658 &omap3xxx_dss_rfbi_hwmod,
3659 &omap3xxx_dss_venc_hwmod,
3660 NULL
3661};
3662
3660int __init omap3xxx_hwmod_init(void) 3663int __init omap3xxx_hwmod_init(void)
3661{ 3664{
3662 int r; 3665 int r;
@@ -3730,6 +3733,21 @@ int __init omap3xxx_hwmod_init(void)
3730 3733
3731 if (h) 3734 if (h)
3732 r = omap_hwmod_register(h); 3735 r = omap_hwmod_register(h);
3736 if (r < 0)
3737 return r;
3738
3739 /*
3740 * DSS code presumes that dss_core hwmod is handled first,
3741 * _before_ any other DSS related hwmods so register common
3742 * DSS hwmods last to ensure that dss_core is already registered.
3743 * Otherwise some change things may happen, for ex. if dispc
3744 * is handled before dss_core and DSS is enabled in bootloader
3745 * DIPSC will be reset with outputs enabled which sometimes leads
3746 * to unrecoverable L3 error.
3747 * XXX The long-term fix to this is to ensure modules are set up
3748 * in dependency order in the hwmod core code.
3749 */
3750 r = omap_hwmod_register(omap3xxx_dss_hwmods);
3733 3751
3734 return r; 3752 return r;
3735} 3753}