Skip to content

Commit a9dd31b

Browse files
author
Paul Walmsley
committed
Merge branches 'clock_fixes_3.4rc', 'clockdomain_fixes_3.4rc', 'hsmmc_erratum_2_1_1_128_refine_3.4rc1', 'hwmod_data_fixes_a_3.4rc', 'hwmod_fixes_a2_3.4rc' and 'powerdomain_fixes_a_3.4rc' into omap-fixes-a2-for-3.4rc-branch
6 parents 5897a39 + 7a82ebd + 26c547f + 503d0ea + 4ce107c + 8b8c3c7 commit a9dd31b

File tree

6 files changed

+87
-58
lines changed

6 files changed

+87
-58
lines changed

arch/arm/mach-omap2/clockdomains44xx_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static struct clockdomain emu_sys_44xx_clkdm = {
390390
.prcm_partition = OMAP4430_PRM_PARTITION,
391391
.cm_inst = OMAP4430_PRM_EMU_CM_INST,
392392
.clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS,
393-
.flags = CLKDM_CAN_HWSUP,
393+
.flags = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP,
394394
};
395395

396396
static struct clockdomain l3_dma_44xx_clkdm = {

arch/arm/mach-omap2/hsmmc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,13 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
506506
if (oh->dev_attr != NULL) {
507507
mmc_dev_attr = oh->dev_attr;
508508
mmc_data->controller_flags = mmc_dev_attr->flags;
509+
/*
510+
* erratum 2.1.1.128 doesn't apply if board has
511+
* a transceiver is attached
512+
*/
513+
if (hsmmcinfo->transceiver)
514+
mmc_data->controller_flags &=
515+
~OMAP_HSMMC_BROKEN_MULTIBLOCK_READ;
509516
}
510517

511518
pdev = platform_device_alloc(name, ctrl_nr - 1);

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,11 @@ static int _reset(struct omap_hwmod *oh)
14771477

14781478
ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh);
14791479

1480+
if (oh->class->sysc) {
1481+
_update_sysc_cache(oh);
1482+
_enable_sysc(oh);
1483+
}
1484+
14801485
return ret;
14811486
}
14821487

@@ -1786,20 +1791,9 @@ static int _setup(struct omap_hwmod *oh, void *data)
17861791
return 0;
17871792
}
17881793

1789-
if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
1794+
if (!(oh->flags & HWMOD_INIT_NO_RESET))
17901795
_reset(oh);
17911796

1792-
/*
1793-
* OCP_SYSCONFIG bits need to be reprogrammed after a softreset.
1794-
* The _enable() function should be split to
1795-
* avoid the rewrite of the OCP_SYSCONFIG register.
1796-
*/
1797-
if (oh->class->sysc) {
1798-
_update_sysc_cache(oh);
1799-
_enable_sysc(oh);
1800-
}
1801-
}
1802-
18031797
postsetup_state = oh->_postsetup_state;
18041798
if (postsetup_state == _HWMOD_STATE_UNKNOWN)
18051799
postsetup_state = _HWMOD_STATE_ENABLED;
@@ -1907,20 +1901,10 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
19071901
*/
19081902
int omap_hwmod_softreset(struct omap_hwmod *oh)
19091903
{
1910-
u32 v;
1911-
int ret;
1912-
1913-
if (!oh || !(oh->_sysc_cache))
1904+
if (!oh)
19141905
return -EINVAL;
19151906

1916-
v = oh->_sysc_cache;
1917-
ret = _set_softreset(oh, &v);
1918-
if (ret)
1919-
goto error;
1920-
_write_sysconfig(v, oh);
1921-
1922-
error:
1923-
return ret;
1907+
return _ocp_softreset(oh);
19241908
}
19251909

19261910
/**
@@ -2463,26 +2447,28 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
24632447
* @oh: struct omap_hwmod *
24642448
*
24652449
* Sets the module OCP socket ENAWAKEUP bit to allow the module to
2466-
* send wakeups to the PRCM. Eventually this should sets PRCM wakeup
2467-
* registers to cause the PRCM to receive wakeup events from the
2468-
* module. Does not set any wakeup routing registers beyond this
2469-
* point - if the module is to wake up any other module or subsystem,
2470-
* that must be set separately. Called by omap_device code. Returns
2471-
* -EINVAL on error or 0 upon success.
2450+
* send wakeups to the PRCM, and enable I/O ring wakeup events for
2451+
* this IP block if it has dynamic mux entries. Eventually this
2452+
* should set PRCM wakeup registers to cause the PRCM to receive
2453+
* wakeup events from the module. Does not set any wakeup routing
2454+
* registers beyond this point - if the module is to wake up any other
2455+
* module or subsystem, that must be set separately. Called by
2456+
* omap_device code. Returns -EINVAL on error or 0 upon success.
24722457
*/
24732458
int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
24742459
{
24752460
unsigned long flags;
24762461
u32 v;
24772462

2478-
if (!oh->class->sysc ||
2479-
!(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP))
2480-
return -EINVAL;
2481-
24822463
spin_lock_irqsave(&oh->_lock, flags);
2483-
v = oh->_sysc_cache;
2484-
_enable_wakeup(oh, &v);
2485-
_write_sysconfig(v, oh);
2464+
2465+
if (oh->class->sysc &&
2466+
(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) {
2467+
v = oh->_sysc_cache;
2468+
_enable_wakeup(oh, &v);
2469+
_write_sysconfig(v, oh);
2470+
}
2471+
24862472
_set_idle_ioring_wakeup(oh, true);
24872473
spin_unlock_irqrestore(&oh->_lock, flags);
24882474

@@ -2494,26 +2480,28 @@ int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
24942480
* @oh: struct omap_hwmod *
24952481
*
24962482
* Clears the module OCP socket ENAWAKEUP bit to prevent the module
2497-
* from sending wakeups to the PRCM. Eventually this should clear
2498-
* PRCM wakeup registers to cause the PRCM to ignore wakeup events
2499-
* from the module. Does not set any wakeup routing registers beyond
2500-
* this point - if the module is to wake up any other module or
2501-
* subsystem, that must be set separately. Called by omap_device
2502-
* code. Returns -EINVAL on error or 0 upon success.
2483+
* from sending wakeups to the PRCM, and disable I/O ring wakeup
2484+
* events for this IP block if it has dynamic mux entries. Eventually
2485+
* this should clear PRCM wakeup registers to cause the PRCM to ignore
2486+
* wakeup events from the module. Does not set any wakeup routing
2487+
* registers beyond this point - if the module is to wake up any other
2488+
* module or subsystem, that must be set separately. Called by
2489+
* omap_device code. Returns -EINVAL on error or 0 upon success.
25032490
*/
25042491
int omap_hwmod_disable_wakeup(struct omap_hwmod *oh)
25052492
{
25062493
unsigned long flags;
25072494
u32 v;
25082495

2509-
if (!oh->class->sysc ||
2510-
!(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP))
2511-
return -EINVAL;
2512-
25132496
spin_lock_irqsave(&oh->_lock, flags);
2514-
v = oh->_sysc_cache;
2515-
_disable_wakeup(oh, &v);
2516-
_write_sysconfig(v, oh);
2497+
2498+
if (oh->class->sysc &&
2499+
(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) {
2500+
v = oh->_sysc_cache;
2501+
_disable_wakeup(oh, &v);
2502+
_write_sysconfig(v, oh);
2503+
}
2504+
25172505
_set_idle_ioring_wakeup(oh, false);
25182506
spin_unlock_irqrestore(&oh->_lock, flags);
25192507

arch/arm/mach-omap2/omap_hwmod_44xx_data.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,6 +2996,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
29962996
&omap44xx_l4_abe__mcbsp1_dma,
29972997
};
29982998

2999+
static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
3000+
{ .role = "pad_fck", .clk = "pad_clks_ck" },
3001+
{ .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
3002+
};
3003+
29993004
static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
30003005
.name = "mcbsp1",
30013006
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3012,6 +3017,8 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
30123017
},
30133018
.slaves = omap44xx_mcbsp1_slaves,
30143019
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
3020+
.opt_clks = mcbsp1_opt_clks,
3021+
.opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
30153022
};
30163023

30173024
/* mcbsp2 */
@@ -3071,6 +3078,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
30713078
&omap44xx_l4_abe__mcbsp2_dma,
30723079
};
30733080

3081+
static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
3082+
{ .role = "pad_fck", .clk = "pad_clks_ck" },
3083+
{ .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
3084+
};
3085+
30743086
static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
30753087
.name = "mcbsp2",
30763088
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3087,6 +3099,8 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
30873099
},
30883100
.slaves = omap44xx_mcbsp2_slaves,
30893101
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
3102+
.opt_clks = mcbsp2_opt_clks,
3103+
.opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
30903104
};
30913105

30923106
/* mcbsp3 */
@@ -3146,6 +3160,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
31463160
&omap44xx_l4_abe__mcbsp3_dma,
31473161
};
31483162

3163+
static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
3164+
{ .role = "pad_fck", .clk = "pad_clks_ck" },
3165+
{ .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
3166+
};
3167+
31493168
static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
31503169
.name = "mcbsp3",
31513170
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3162,6 +3181,8 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
31623181
},
31633182
.slaves = omap44xx_mcbsp3_slaves,
31643183
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
3184+
.opt_clks = mcbsp3_opt_clks,
3185+
.opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
31653186
};
31663187

31673188
/* mcbsp4 */
@@ -3200,6 +3221,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
32003221
&omap44xx_l4_per__mcbsp4,
32013222
};
32023223

3224+
static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
3225+
{ .role = "pad_fck", .clk = "pad_clks_ck" },
3226+
{ .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
3227+
};
3228+
32033229
static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
32043230
.name = "mcbsp4",
32053231
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3216,6 +3242,8 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
32163242
},
32173243
.slaves = omap44xx_mcbsp4_slaves,
32183244
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
3245+
.opt_clks = mcbsp4_opt_clks,
3246+
.opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
32193247
};
32203248

32213249
/*

arch/arm/mach-omap2/powerdomain.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,13 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
972972

973973
int pwrdm_state_switch(struct powerdomain *pwrdm)
974974
{
975-
return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
975+
int ret;
976+
977+
ret = pwrdm_wait_transition(pwrdm);
978+
if (!ret)
979+
ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
980+
981+
return ret;
976982
}
977983

978984
int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)

arch/arm/plat-omap/include/plat/omap_hwmod.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;
4747
* with the original PRCM protocol defined for OMAP2420
4848
*/
4949
#define SYSC_TYPE1_MIDLEMODE_SHIFT 12
50-
#define SYSC_TYPE1_MIDLEMODE_MASK (0x3 << SYSC_MIDLEMODE_SHIFT)
50+
#define SYSC_TYPE1_MIDLEMODE_MASK (0x3 << SYSC_TYPE1_MIDLEMODE_SHIFT)
5151
#define SYSC_TYPE1_CLOCKACTIVITY_SHIFT 8
52-
#define SYSC_TYPE1_CLOCKACTIVITY_MASK (0x3 << SYSC_CLOCKACTIVITY_SHIFT)
52+
#define SYSC_TYPE1_CLOCKACTIVITY_MASK (0x3 << SYSC_TYPE1_CLOCKACTIVITY_SHIFT)
5353
#define SYSC_TYPE1_SIDLEMODE_SHIFT 3
54-
#define SYSC_TYPE1_SIDLEMODE_MASK (0x3 << SYSC_SIDLEMODE_SHIFT)
54+
#define SYSC_TYPE1_SIDLEMODE_MASK (0x3 << SYSC_TYPE1_SIDLEMODE_SHIFT)
5555
#define SYSC_TYPE1_ENAWAKEUP_SHIFT 2
56-
#define SYSC_TYPE1_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT)
56+
#define SYSC_TYPE1_ENAWAKEUP_MASK (1 << SYSC_TYPE1_ENAWAKEUP_SHIFT)
5757
#define SYSC_TYPE1_SOFTRESET_SHIFT 1
58-
#define SYSC_TYPE1_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT)
58+
#define SYSC_TYPE1_SOFTRESET_MASK (1 << SYSC_TYPE1_SOFTRESET_SHIFT)
5959
#define SYSC_TYPE1_AUTOIDLE_SHIFT 0
60-
#define SYSC_TYPE1_AUTOIDLE_MASK (1 << SYSC_AUTOIDLE_SHIFT)
60+
#define SYSC_TYPE1_AUTOIDLE_MASK (1 << SYSC_TYPE1_AUTOIDLE_SHIFT)
6161

6262
/*
6363
* OCP SYSCONFIG bit shifts/masks TYPE2. These are for IPs compliant

0 commit comments

Comments
 (0)