Skip to content

Commit df85429

Browse files
committed
Merge tag 'ti-sysc-fixes' into fixes
2 parents 99fba32 + e7ae08d commit df85429

3 files changed

Lines changed: 21 additions & 10 deletions

File tree

arch/arm/mach-omap2/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ config ARCH_OMAP2
77
depends on ARCH_MULTI_V6
88
select ARCH_OMAP2PLUS
99
select CPU_V6
10-
select PM_GENERIC_DOMAINS if PM
1110
select SOC_HAS_OMAP2_SDRC
1211

1312
config ARCH_OMAP3
@@ -106,6 +105,8 @@ config ARCH_OMAP2PLUS
106105
select OMAP_DM_TIMER
107106
select OMAP_GPMC
108107
select PINCTRL
108+
select PM_GENERIC_DOMAINS if PM
109+
select PM_GENERIC_DOMAINS_OF if PM
109110
select RESET_CONTROLLER
110111
select SOC_BUS
111112
select TI_SYSC

drivers/bus/ti-sysc.c

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata)
227227
u32 sysc_mask, syss_done, rstval;
228228
int syss_offset, error = 0;
229229

230+
if (ddata->cap->regbits->srst_shift < 0)
231+
return 0;
232+
230233
syss_offset = ddata->offsets[SYSC_SYSSTATUS];
231234
sysc_mask = BIT(ddata->cap->regbits->srst_shift);
232235

@@ -970,9 +973,15 @@ static int sysc_enable_module(struct device *dev)
970973
return error;
971974
}
972975
}
973-
error = sysc_wait_softreset(ddata);
974-
if (error)
975-
dev_warn(ddata->dev, "OCP softreset timed out\n");
976+
/*
977+
* Some modules like i2c and hdq1w have unusable reset status unless
978+
* the module reset quirk is enabled. Skip status check on enable.
979+
*/
980+
if (!(ddata->cfg.quirks & SYSC_MODULE_QUIRK_ENA_RESETDONE)) {
981+
error = sysc_wait_softreset(ddata);
982+
if (error)
983+
dev_warn(ddata->dev, "OCP softreset timed out\n");
984+
}
976985
if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
977986
sysc_disable_opt_clocks(ddata);
978987

@@ -1373,17 +1382,17 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
13731382
SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50030200, 0xffffffff,
13741383
SYSC_QUIRK_OPT_CLKS_NEEDED),
13751384
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
1376-
SYSC_MODULE_QUIRK_HDQ1W),
1385+
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13771386
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
1378-
SYSC_MODULE_QUIRK_HDQ1W),
1387+
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13791388
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000036, 0x000000ff,
1380-
SYSC_MODULE_QUIRK_I2C),
1389+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13811390
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x0000003c, 0x000000ff,
1382-
SYSC_MODULE_QUIRK_I2C),
1391+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13831392
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000040, 0x000000ff,
1384-
SYSC_MODULE_QUIRK_I2C),
1393+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13851394
SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
1386-
SYSC_MODULE_QUIRK_I2C),
1395+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13871396
SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
13881397
SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
13891398
SYSC_MODULE_QUIRK_SGX),

include/linux/platform_data/ti-sysc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct sysc_regbits {
5050
s8 emufree_shift;
5151
};
5252

53+
#define SYSC_MODULE_QUIRK_ENA_RESETDONE BIT(25)
5354
#define SYSC_MODULE_QUIRK_PRUSS BIT(24)
5455
#define SYSC_MODULE_QUIRK_DSS_RESET BIT(23)
5556
#define SYSC_MODULE_QUIRK_RTC_UNLOCK BIT(22)

0 commit comments

Comments
 (0)