diff options
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clock33xx_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | 44 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 31 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 |
6 files changed, 54 insertions, 30 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index c64e565bdef5..184ef21f6e3c 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
| @@ -88,11 +88,10 @@ enum { | |||
| 88 | 88 | ||
| 89 | static u8 omap3_evm_version; | 89 | static u8 omap3_evm_version; |
| 90 | 90 | ||
| 91 | u8 get_omap3_evm_rev(void) | 91 | static u8 get_omap3_evm_rev(void) |
| 92 | { | 92 | { |
| 93 | return omap3_evm_version; | 93 | return omap3_evm_version; |
| 94 | } | 94 | } |
| 95 | EXPORT_SYMBOL(get_omap3_evm_rev); | ||
| 96 | 95 | ||
| 97 | static void __init omap3_evm_get_revision(void) | 96 | static void __init omap3_evm_get_revision(void) |
| 98 | { | 97 | { |
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index b87b88c2638b..114ab4b8e0e3 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c | |||
| @@ -1035,6 +1035,8 @@ static struct omap_clk am33xx_clks[] = { | |||
| 1035 | CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX), | 1035 | CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX), |
| 1036 | CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX), | 1036 | CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX), |
| 1037 | CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX), | 1037 | CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX), |
| 1038 | CLK(NULL, "mcasp0_fck", &mcasp0_fck, CK_AM33XX), | ||
| 1039 | CLK(NULL, "mcasp1_fck", &mcasp1_fck, CK_AM33XX), | ||
| 1038 | CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX), | 1040 | CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX), |
| 1039 | CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX), | 1041 | CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX), |
| 1040 | CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX), | 1042 | CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX), |
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c index 9a7792aec673..70294f54e35a 100644 --- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | |||
| @@ -183,17 +183,6 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) | |||
| 183 | if (!clkdm->clktrctrl_mask) | 183 | if (!clkdm->clktrctrl_mask) |
| 184 | return 0; | 184 | return 0; |
| 185 | 185 | ||
| 186 | /* | ||
| 187 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
| 188 | * more details on the unpleasant problem this is working | ||
| 189 | * around | ||
| 190 | */ | ||
| 191 | if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING && | ||
| 192 | !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { | ||
| 193 | _enable_hwsup(clkdm); | ||
| 194 | return 0; | ||
| 195 | } | ||
| 196 | |||
| 197 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 186 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, |
| 198 | clkdm->clktrctrl_mask); | 187 | clkdm->clktrctrl_mask); |
| 199 | 188 | ||
| @@ -217,17 +206,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) | |||
| 217 | if (!clkdm->clktrctrl_mask) | 206 | if (!clkdm->clktrctrl_mask) |
| 218 | return 0; | 207 | return 0; |
| 219 | 208 | ||
| 220 | /* | ||
| 221 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
| 222 | * more details on the unpleasant problem this is working | ||
| 223 | * around | ||
| 224 | */ | ||
| 225 | if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) && | ||
| 226 | (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) { | ||
| 227 | omap3_clkdm_wakeup(clkdm); | ||
| 228 | return 0; | ||
| 229 | } | ||
| 230 | |||
| 231 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 209 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, |
| 232 | clkdm->clktrctrl_mask); | 210 | clkdm->clktrctrl_mask); |
| 233 | 211 | ||
| @@ -269,6 +247,17 @@ static int omap3xxx_clkdm_clk_enable(struct clockdomain *clkdm) | |||
| 269 | if (!clkdm->clktrctrl_mask) | 247 | if (!clkdm->clktrctrl_mask) |
| 270 | return 0; | 248 | return 0; |
| 271 | 249 | ||
| 250 | /* | ||
| 251 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
| 252 | * more details on the unpleasant problem this is working | ||
| 253 | * around | ||
| 254 | */ | ||
| 255 | if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) && | ||
| 256 | (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) { | ||
| 257 | omap3_clkdm_wakeup(clkdm); | ||
| 258 | return 0; | ||
| 259 | } | ||
| 260 | |||
| 272 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 261 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, |
| 273 | clkdm->clktrctrl_mask); | 262 | clkdm->clktrctrl_mask); |
| 274 | 263 | ||
| @@ -292,6 +281,17 @@ static int omap3xxx_clkdm_clk_disable(struct clockdomain *clkdm) | |||
| 292 | if (!clkdm->clktrctrl_mask) | 281 | if (!clkdm->clktrctrl_mask) |
| 293 | return 0; | 282 | return 0; |
| 294 | 283 | ||
| 284 | /* | ||
| 285 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
| 286 | * more details on the unpleasant problem this is working | ||
| 287 | * around | ||
| 288 | */ | ||
| 289 | if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING && | ||
| 290 | !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { | ||
| 291 | _enable_hwsup(clkdm); | ||
| 292 | return 0; | ||
| 293 | } | ||
| 294 | |||
| 295 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 295 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, |
| 296 | clkdm->clktrctrl_mask); | 296 | clkdm->clktrctrl_mask); |
| 297 | 297 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 299ca2821ad1..b969ab1d258b 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -1698,6 +1698,29 @@ static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh) | |||
| 1698 | } | 1698 | } |
| 1699 | 1699 | ||
| 1700 | /** | 1700 | /** |
| 1701 | * _are_any_hardreset_lines_asserted - return true if any part of @oh is | ||
| 1702 | * hard-reset | ||
| 1703 | * @oh: struct omap_hwmod * | ||
| 1704 | * | ||
| 1705 | * If any hardreset lines associated with @oh are asserted, then | ||
| 1706 | * return true. Otherwise, if no hardreset lines associated with @oh | ||
| 1707 | * are asserted, or if @oh has no hardreset lines, then return false. | ||
| 1708 | * This function is used to avoid executing some parts of the IP block | ||
| 1709 | * enable/disable sequence if any hardreset line is set. | ||
| 1710 | */ | ||
| 1711 | static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh) | ||
| 1712 | { | ||
| 1713 | int rst_cnt = 0; | ||
| 1714 | int i; | ||
| 1715 | |||
| 1716 | for (i = 0; i < oh->rst_lines_cnt && rst_cnt == 0; i++) | ||
| 1717 | if (_read_hardreset(oh, oh->rst_lines[i].name) > 0) | ||
| 1718 | rst_cnt++; | ||
| 1719 | |||
| 1720 | return (rst_cnt) ? true : false; | ||
| 1721 | } | ||
| 1722 | |||
| 1723 | /** | ||
| 1701 | * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4 | 1724 | * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4 |
| 1702 | * @oh: struct omap_hwmod * | 1725 | * @oh: struct omap_hwmod * |
| 1703 | * | 1726 | * |
| @@ -1715,7 +1738,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh) | |||
| 1715 | * Since integration code might still be doing something, only | 1738 | * Since integration code might still be doing something, only |
| 1716 | * disable if all lines are under hardreset. | 1739 | * disable if all lines are under hardreset. |
| 1717 | */ | 1740 | */ |
| 1718 | if (!_are_all_hardreset_lines_asserted(oh)) | 1741 | if (_are_any_hardreset_lines_asserted(oh)) |
| 1719 | return 0; | 1742 | return 0; |
| 1720 | 1743 | ||
| 1721 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); | 1744 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); |
| @@ -1749,12 +1772,12 @@ static int _am33xx_disable_module(struct omap_hwmod *oh) | |||
| 1749 | 1772 | ||
| 1750 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); | 1773 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); |
| 1751 | 1774 | ||
| 1775 | if (_are_any_hardreset_lines_asserted(oh)) | ||
| 1776 | return 0; | ||
| 1777 | |||
| 1752 | am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs, | 1778 | am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs, |
| 1753 | oh->prcm.omap4.clkctrl_offs); | 1779 | oh->prcm.omap4.clkctrl_offs); |
| 1754 | 1780 | ||
| 1755 | if (_are_all_hardreset_lines_asserted(oh)) | ||
| 1756 | return 0; | ||
| 1757 | |||
| 1758 | v = _am33xx_wait_target_disable(oh); | 1781 | v = _am33xx_wait_target_disable(oh); |
| 1759 | if (v) | 1782 | if (v) |
| 1760 | pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", | 1783 | pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index 35dcdb66a4e0..bd9220ed5ab9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
| @@ -219,7 +219,7 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = { | |||
| 219 | 219 | ||
| 220 | /* MPU */ | 220 | /* MPU */ |
| 221 | static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = { | 221 | static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = { |
| 222 | { .name = "pmu", .irq = 3 }, | 222 | { .name = "pmu", .irq = 3 + OMAP_INTC_START }, |
| 223 | { .irq = -1 } | 223 | { .irq = -1 } |
| 224 | }; | 224 | }; |
| 225 | 225 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 82fdb5932d31..f67b7ee07dd4 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -94,7 +94,7 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = { | |||
| 94 | 94 | ||
| 95 | /* MPU */ | 95 | /* MPU */ |
| 96 | static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = { | 96 | static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = { |
| 97 | { .name = "pmu", .irq = 3 }, | 97 | { .name = "pmu", .irq = 3 + OMAP_INTC_START }, |
| 98 | { .irq = -1 } | 98 | { .irq = -1 } |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
