Skip to content

Commit 06f114c

Browse files
committed
Merge branches 'fixes-mapphone' and 'fixes-ti-sysc' into fixes
2 parents 36bee3f + e5deb8f commit 06f114c

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

drivers/bus/ti-sysc.c

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum sysc_soc {
3838
SOC_2420,
3939
SOC_2430,
4040
SOC_3430,
41+
SOC_AM35,
4142
SOC_3630,
4243
SOC_4430,
4344
SOC_4460,
@@ -1097,6 +1098,11 @@ static int sysc_enable_module(struct device *dev)
10971098
if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_SIDLE |
10981099
SYSC_QUIRK_SWSUP_SIDLE_ACT)) {
10991100
best_mode = SYSC_IDLE_NO;
1101+
1102+
/* Clear WAKEUP */
1103+
if (regbits->enwkup_shift >= 0 &&
1104+
ddata->cfg.sysc_val & BIT(regbits->enwkup_shift))
1105+
reg &= ~BIT(regbits->enwkup_shift);
11001106
} else {
11011107
best_mode = fls(ddata->cfg.sidlemodes) - 1;
11021108
if (best_mode > SYSC_IDLE_MASK) {
@@ -1224,6 +1230,13 @@ static int sysc_disable_module(struct device *dev)
12241230
}
12251231
}
12261232

1233+
if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_SIDLE_ACT) {
1234+
/* Set WAKEUP */
1235+
if (regbits->enwkup_shift >= 0 &&
1236+
ddata->cfg.sysc_val & BIT(regbits->enwkup_shift))
1237+
reg |= BIT(regbits->enwkup_shift);
1238+
}
1239+
12271240
reg &= ~(SYSC_IDLE_MASK << regbits->sidle_shift);
12281241
reg |= best_mode << regbits->sidle_shift;
12291242
if (regbits->autoidle_shift >= 0 &&
@@ -1518,16 +1531,16 @@ struct sysc_revision_quirk {
15181531
static const struct sysc_revision_quirk sysc_revision_quirks[] = {
15191532
/* These drivers need to be fixed to not use pm_runtime_irq_safe() */
15201533
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000046, 0xffffffff,
1521-
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
1534+
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
15221535
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff,
1523-
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
1536+
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
15241537
/* Uarts on omap4 and later */
15251538
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x50411e03, 0xffff00ff,
1526-
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
1539+
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
15271540
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff,
1528-
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
1541+
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
15291542
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47424e03, 0xffffffff,
1530-
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
1543+
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
15311544

15321545
/* Quirks that need to be set based on the module address */
15331546
SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
@@ -1862,7 +1875,7 @@ static void sysc_pre_reset_quirk_dss(struct sysc *ddata)
18621875
dev_warn(ddata->dev, "%s: timed out %08x !+ %08x\n",
18631876
__func__, val, irq_mask);
18641877

1865-
if (sysc_soc->soc == SOC_3430) {
1878+
if (sysc_soc->soc == SOC_3430 || sysc_soc->soc == SOC_AM35) {
18661879
/* Clear DSS_SDI_CONTROL */
18671880
sysc_write(ddata, 0x44, 0);
18681881

@@ -2150,8 +2163,7 @@ static int sysc_reset(struct sysc *ddata)
21502163
}
21512164

21522165
if (ddata->cfg.srst_udelay)
2153-
usleep_range(ddata->cfg.srst_udelay,
2154-
ddata->cfg.srst_udelay * 2);
2166+
fsleep(ddata->cfg.srst_udelay);
21552167

21562168
if (ddata->post_reset_quirk)
21572169
ddata->post_reset_quirk(ddata);
@@ -3025,6 +3037,7 @@ static void ti_sysc_idle(struct work_struct *work)
30253037
static const struct soc_device_attribute sysc_soc_match[] = {
30263038
SOC_FLAG("OMAP242*", SOC_2420),
30273039
SOC_FLAG("OMAP243*", SOC_2430),
3040+
SOC_FLAG("AM35*", SOC_AM35),
30283041
SOC_FLAG("OMAP3[45]*", SOC_3430),
30293042
SOC_FLAG("OMAP3[67]*", SOC_3630),
30303043
SOC_FLAG("OMAP443*", SOC_4430),
@@ -3229,7 +3242,7 @@ static int sysc_check_active_timer(struct sysc *ddata)
32293242
* can be dropped if we stop supporting old beagleboard revisions
32303243
* A to B4 at some point.
32313244
*/
3232-
if (sysc_soc->soc == SOC_3430)
3245+
if (sysc_soc->soc == SOC_3430 || sysc_soc->soc == SOC_AM35)
32333246
error = -ENXIO;
32343247
else
32353248
error = -EBUSY;

0 commit comments

Comments
 (0)