Commit eb20f31f authored by Tony Lindgren's avatar Tony Lindgren

Merge tag 'omap-fixes-a-for-pre3.7' of...

Merge tag 'omap-fixes-a-for-pre3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.7-rc1/fixes-hwmod-clock

Some OMAP fixes for the 3.7 merge window, fixing mismerges, branch
integration issues, and bugs after the arm-soc merges.

Basic test logs are available here:

   http://www.pwsan.com/omap/testlogs/devel_late_fixes_3.7/20121009084003/

N800 isn't booting; this is a problem present in the base commit and
is due to serial driver breakage:

   http://www.spinics.net/lists/arm-kernel/msg196034.html
parents 0e51793e e9332b6e
...@@ -88,11 +88,10 @@ enum { ...@@ -88,11 +88,10 @@ enum {
static u8 omap3_evm_version; static u8 omap3_evm_version;
u8 get_omap3_evm_rev(void) static u8 get_omap3_evm_rev(void)
{ {
return omap3_evm_version; return omap3_evm_version;
} }
EXPORT_SYMBOL(get_omap3_evm_rev);
static void __init omap3_evm_get_revision(void) static void __init omap3_evm_get_revision(void)
{ {
......
...@@ -1035,6 +1035,8 @@ static struct omap_clk am33xx_clks[] = { ...@@ -1035,6 +1035,8 @@ static struct omap_clk am33xx_clks[] = {
CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX), CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX),
CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX), CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX),
CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX), CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX),
CLK(NULL, "mcasp0_fck", &mcasp0_fck, CK_AM33XX),
CLK(NULL, "mcasp1_fck", &mcasp1_fck, CK_AM33XX),
CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX), CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX),
CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX), CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX),
CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX), CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX),
......
...@@ -183,17 +183,6 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) ...@@ -183,17 +183,6 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
if (!clkdm->clktrctrl_mask) if (!clkdm->clktrctrl_mask)
return 0; return 0;
/*
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
* more details on the unpleasant problem this is working
* around
*/
if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
!(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
_enable_hwsup(clkdm);
return 0;
}
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
clkdm->clktrctrl_mask); clkdm->clktrctrl_mask);
...@@ -217,17 +206,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) ...@@ -217,17 +206,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
if (!clkdm->clktrctrl_mask) if (!clkdm->clktrctrl_mask)
return 0; return 0;
/*
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
* more details on the unpleasant problem this is working
* around
*/
if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
(clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
omap3_clkdm_wakeup(clkdm);
return 0;
}
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
clkdm->clktrctrl_mask); clkdm->clktrctrl_mask);
...@@ -269,6 +247,17 @@ static int omap3xxx_clkdm_clk_enable(struct clockdomain *clkdm) ...@@ -269,6 +247,17 @@ static int omap3xxx_clkdm_clk_enable(struct clockdomain *clkdm)
if (!clkdm->clktrctrl_mask) if (!clkdm->clktrctrl_mask)
return 0; return 0;
/*
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
* more details on the unpleasant problem this is working
* around
*/
if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
(clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
omap3_clkdm_wakeup(clkdm);
return 0;
}
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
clkdm->clktrctrl_mask); clkdm->clktrctrl_mask);
...@@ -292,6 +281,17 @@ static int omap3xxx_clkdm_clk_disable(struct clockdomain *clkdm) ...@@ -292,6 +281,17 @@ static int omap3xxx_clkdm_clk_disable(struct clockdomain *clkdm)
if (!clkdm->clktrctrl_mask) if (!clkdm->clktrctrl_mask)
return 0; return 0;
/*
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
* more details on the unpleasant problem this is working
* around
*/
if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
!(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
_enable_hwsup(clkdm);
return 0;
}
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
clkdm->clktrctrl_mask); clkdm->clktrctrl_mask);
......
...@@ -1697,6 +1697,29 @@ static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh) ...@@ -1697,6 +1697,29 @@ static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh)
return false; return false;
} }
/**
* _are_any_hardreset_lines_asserted - return true if any part of @oh is
* hard-reset
* @oh: struct omap_hwmod *
*
* If any hardreset lines associated with @oh are asserted, then
* return true. Otherwise, if no hardreset lines associated with @oh
* are asserted, or if @oh has no hardreset lines, then return false.
* This function is used to avoid executing some parts of the IP block
* enable/disable sequence if any hardreset line is set.
*/
static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh)
{
int rst_cnt = 0;
int i;
for (i = 0; i < oh->rst_lines_cnt && rst_cnt == 0; i++)
if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
rst_cnt++;
return (rst_cnt) ? true : false;
}
/** /**
* _omap4_disable_module - enable CLKCTRL modulemode on OMAP4 * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
* @oh: struct omap_hwmod * * @oh: struct omap_hwmod *
...@@ -1715,7 +1738,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh) ...@@ -1715,7 +1738,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
* Since integration code might still be doing something, only * Since integration code might still be doing something, only
* disable if all lines are under hardreset. * disable if all lines are under hardreset.
*/ */
if (!_are_all_hardreset_lines_asserted(oh)) if (_are_any_hardreset_lines_asserted(oh))
return 0; return 0;
pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
...@@ -1749,12 +1772,12 @@ static int _am33xx_disable_module(struct omap_hwmod *oh) ...@@ -1749,12 +1772,12 @@ static int _am33xx_disable_module(struct omap_hwmod *oh)
pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
if (_are_any_hardreset_lines_asserted(oh))
return 0;
am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs, am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs,
oh->prcm.omap4.clkctrl_offs); oh->prcm.omap4.clkctrl_offs);
if (_are_all_hardreset_lines_asserted(oh))
return 0;
v = _am33xx_wait_target_disable(oh); v = _am33xx_wait_target_disable(oh);
if (v) if (v)
pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
......
...@@ -219,7 +219,7 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = { ...@@ -219,7 +219,7 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
/* MPU */ /* MPU */
static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = { static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = {
{ .name = "pmu", .irq = 3 }, { .name = "pmu", .irq = 3 + OMAP_INTC_START },
{ .irq = -1 } { .irq = -1 }
}; };
......
...@@ -94,7 +94,7 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = { ...@@ -94,7 +94,7 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
/* MPU */ /* MPU */
static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = { static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
{ .name = "pmu", .irq = 3 }, { .name = "pmu", .irq = 3 + OMAP_INTC_START },
{ .irq = -1 } { .irq = -1 }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment