From Paul Walmsley (as per Tony Lindgren's request): "Some uncontroversial OMAP clock, hwmod, and compiler warning fixes for 3.5-rc" * tag 'omap-fixes-a-for-3.5rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending: ARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled ARM: OMAP2+: mux: fix sparse warning ARM: OMAP2+: CM: increase the module disable timeout ARM: OMAP4: clock data: add clockdomains for clocks used as main clocks ARM: OMAP4: hwmod data: fix 32k sync timer idle modes ARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby ARM: OMAP: PM: Lock clocks list while generating summary
Unified · Split
| @@ -84,6 +84,7 @@ static struct clk slimbus_clk = { · 83 unmodified lines | |||
| 84 | 84 | ||
| 85 | static struct clk sys_32k_ck = { | 85 | static struct clk sys_32k_ck = { |
| 86 | .name = "sys_32k_ck", | 86 | .name = "sys_32k_ck", |
| 87 | .clkdm_name = "prm_clkdm", | ||
| 87 | .rate = 32768, | 88 | .rate = 32768, |
| 88 | .ops = &clkops_null, | 89 | .ops = &clkops_null, |
| 89 | }; | 90 | }; |
| @@ -512,6 +513,7 @@ static struct clk ddrphy_ck = { · 422 unmodified lines | |||
| 512 | .name = "ddrphy_ck", | 513 | .name = "ddrphy_ck", |
| 513 | .parent = &dpll_core_m2_ck, | 514 | .parent = &dpll_core_m2_ck, |
| 514 | .ops = &clkops_null, | 515 | .ops = &clkops_null, |
| 516 | .clkdm_name = "l3_emif_clkdm", | ||
| 515 | .fixed_div = 2, | 517 | .fixed_div = 2, |
| 516 | .recalc = &omap_fixed_divisor_recalc, | 518 | .recalc = &omap_fixed_divisor_recalc, |
| 517 | }; | 519 | }; |
| @@ -769,6 +771,7 @@ static const struct clksel dpll_mpu_m2_div[] = { · 251 unmodified lines | |||
| 769 | static struct clk dpll_mpu_m2_ck = { | 771 | static struct clk dpll_mpu_m2_ck = { |
| 770 | .name = "dpll_mpu_m2_ck", | 772 | .name = "dpll_mpu_m2_ck", |
| 771 | .parent = &dpll_mpu_ck, | 773 | .parent = &dpll_mpu_ck, |
| 774 | .clkdm_name = "cm_clkdm", | ||
| 772 | .clksel = dpll_mpu_m2_div, | 775 | .clksel = dpll_mpu_m2_div, |
| 773 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, | 776 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, |
| 774 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 777 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| @@ -1149,6 +1152,7 @@ static const struct clksel l3_div_div[] = { · 374 unmodified lines | |||
| 1149 | static struct clk l3_div_ck = { | 1152 | static struct clk l3_div_ck = { |
| 1150 | .name = "l3_div_ck", | 1153 | .name = "l3_div_ck", |
| 1151 | .parent = &div_core_ck, | 1154 | .parent = &div_core_ck, |
| 1155 | .clkdm_name = "cm_clkdm", | ||
| 1152 | .clksel = l3_div_div, | 1156 | .clksel = l3_div_div, |
| 1153 | .clksel_reg = OMAP4430_CM_CLKSEL_CORE, | 1157 | .clksel_reg = OMAP4430_CM_CLKSEL_CORE, |
| 1154 | .clksel_mask = OMAP4430_CLKSEL_L3_MASK, | 1158 | .clksel_mask = OMAP4430_CLKSEL_L3_MASK, |
| @@ -2824,6 +2828,7 @@ static const struct clksel trace_clk_div_div[] = { · 1669 unmodified lines | |||
| 2824 | static struct clk trace_clk_div_ck = { | 2828 | static struct clk trace_clk_div_ck = { |
| 2825 | .name = "trace_clk_div_ck", | 2829 | .name = "trace_clk_div_ck", |
| 2826 | .parent = &pmd_trace_clk_mux_ck, | 2830 | .parent = &pmd_trace_clk_mux_ck, |
| 2831 | .clkdm_name = "emu_sys_clkdm", | ||
| 2827 | .clksel = trace_clk_div_div, | 2832 | .clksel = trace_clk_div_div, |
| 2828 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, | 2833 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, |
| 2829 | .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK, | 2834 | .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK, |
| @@ -22,4 +22,15 @@ · 21 unmodified lines | |||
| 22 | */ | 22 | */ |
| 23 | #define MAX_MODULE_READY_TIME 2000 | 23 | #define MAX_MODULE_READY_TIME 2000 |
| 24 | 24 | ||
| 25 | /* | ||
| 26 | * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for | ||
| 27 | * the PRCM to request that a module enter the inactive state in the | ||
| 28 | * case of OMAP2 & 3. In the case of OMAP4 this is the max duration | ||
| 29 | * in microseconds for the module to reach the inactive state from | ||
| 30 | * a functional state. | ||
| 31 | * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during | ||
| 32 | * kernel init. | ||
| 33 | */ | ||
| 34 | #define MAX_MODULE_DISABLE_TIME 5000 | ||
| 35 | |||
| 25 | #endif | 36 | #endif |
| @@ -313,9 +313,9 @@ int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_off · 312 unmodified lines | |||
| 313 | 313 | ||
| 314 | omap_test_timeout((_clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) == | 314 | omap_test_timeout((_clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) == |
| 315 | CLKCTRL_IDLEST_DISABLED), | 315 | CLKCTRL_IDLEST_DISABLED), |
| 316 | MAX_MODULE_READY_TIME, i); | 316 | MAX_MODULE_DISABLE_TIME, i); |
| 317 | 317 | ||
| 318 | return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; | 318 | return (i < MAX_MODULE_DISABLE_TIME) ? 0 : -EBUSY; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | /** | 321 | /** |
| @@ -41,6 +41,7 @@ · 40 unmodified lines | |||
| 41 | #include "control.h" | 41 | #include "control.h" |
| 42 | #include "mux.h" | 42 | #include "mux.h" |
| 43 | #include "prm.h" | 43 | #include "prm.h" |
| 44 | #include "common.h" | ||
| 44 | 45 | ||
| 45 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ | 46 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ |
| 46 | #define OMAP_MUX_BASE_SZ 0x5ca | 47 | #define OMAP_MUX_BASE_SZ 0x5ca |
| @@ -530,7 +530,7 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) · 529 unmodified lines | |||
| 530 | if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) | 530 | if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) |
| 531 | _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); | 531 | _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); |
| 532 | if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) | 532 | if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) |
| 533 | _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); | 533 | _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART, v); |
| 534 | 534 | ||
| 535 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ | 535 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ |
| 536 | 536 | ||
| @@ -393,8 +393,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = { · 392 unmodified lines | |||
| 393 | .rev_offs = 0x0000, | 393 | .rev_offs = 0x0000, |
| 394 | .sysc_offs = 0x0004, | 394 | .sysc_offs = 0x0004, |
| 395 | .sysc_flags = SYSC_HAS_SIDLEMODE, | 395 | .sysc_flags = SYSC_HAS_SIDLEMODE, |
| 396 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 396 | .idlemodes = (SIDLE_FORCE | SIDLE_NO), |
| 397 | SIDLE_SMART_WKUP), | ||
| 398 | .sysc_fields = &omap_hwmod_sysc_type1, | 397 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 399 | }; | 398 | }; |
| 400 | 399 | ||
| @@ -854,6 +853,11 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { · 453 unmodified lines | |||
| 854 | .name = "dss_hdmi", | 853 | .name = "dss_hdmi", |
| 855 | .class = &omap44xx_hdmi_hwmod_class, | 854 | .class = &omap44xx_hdmi_hwmod_class, |
| 856 | .clkdm_name = "l3_dss_clkdm", | 855 | .clkdm_name = "l3_dss_clkdm", |
| 856 | /* | ||
| 857 | * HDMI audio requires to use no-idle mode. Hence, | ||
| 858 | * set idle mode by software. | ||
| 859 | */ | ||
| 860 | .flags = HWMOD_SWSUP_SIDLE, | ||
| 857 | .mpu_irqs = omap44xx_dss_hdmi_irqs, | 861 | .mpu_irqs = omap44xx_dss_hdmi_irqs, |
| 858 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, | 862 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, |
| 859 | .main_clk = "dss_48mhz_clk", | 863 | .main_clk = "dss_48mhz_clk", |
| @@ -461,6 +461,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused) · 460 unmodified lines | |||
| 461 | struct clk *c; | 461 | struct clk *c; |
| 462 | struct clk *pa; | 462 | struct clk *pa; |
| 463 | 463 | ||
| 464 | mutex_lock(&clocks_mutex); | ||
| 464 | seq_printf(s, "%-30s %-30s %-10s %s\n", | 465 | seq_printf(s, "%-30s %-30s %-10s %s\n", |
| 465 | "clock-name", "parent-name", "rate", "use-count"); | 466 | "clock-name", "parent-name", "rate", "use-count"); |
| 466 | 467 | ||
| @@ -469,6 +470,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused) · 2 unmodified lines | |||
| 469 | seq_printf(s, "%-30s %-30s %-10lu %d\n", | 470 | seq_printf(s, "%-30s %-30s %-10lu %d\n", |
| 470 | c->name, pa ? pa->name : "none", c->rate, c->usecount); | 471 | c->name, pa ? pa->name : "none", c->rate, c->usecount); |
| 471 | } | 472 | } |
| 473 | mutex_unlock(&clocks_mutex); | ||
| 472 | 474 | ||
| 473 | return 0; | 475 | return 0; |
| 474 | } | 476 | } |