Skip to content

Commit e275d21

Browse files
committed
bus: ti-sysc: Fix reset status check for modules with quirks
Commit d46f9fb ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit") started showing a "OCP softreset timed out" warning on enable if the interconnect target module is not out of reset. This caused the warning to be often triggered for i2c and hdq while the devices are working properly. Turns out that some interconnect target modules seem to have an unusable reset status bits unless the module specific reset quirks are activated. Let's just skip the reset status check for those modules as we only want to activate the reset quirks when doing a reset, and not on enable. This way we don't see the bogus "OCP softreset timed out" warnings during boot. Fixes: d46f9fb ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit") Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent b69fd00 commit e275d21

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

drivers/bus/ti-sysc.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -970,9 +970,15 @@ static int sysc_enable_module(struct device *dev)
970970
return error;
971971
}
972972
}
973-
error = sysc_wait_softreset(ddata);
974-
if (error)
975-
dev_warn(ddata->dev, "OCP softreset timed out\n");
973+
/*
974+
* Some modules like i2c and hdq1w have unusable reset status unless
975+
* the module reset quirk is enabled. Skip status check on enable.
976+
*/
977+
if (!(ddata->cfg.quirks & SYSC_MODULE_QUIRK_ENA_RESETDONE)) {
978+
error = sysc_wait_softreset(ddata);
979+
if (error)
980+
dev_warn(ddata->dev, "OCP softreset timed out\n");
981+
}
976982
if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
977983
sysc_disable_opt_clocks(ddata);
978984

@@ -1373,17 +1379,17 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
13731379
SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50030200, 0xffffffff,
13741380
SYSC_QUIRK_OPT_CLKS_NEEDED),
13751381
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
1376-
SYSC_MODULE_QUIRK_HDQ1W),
1382+
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13771383
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
1378-
SYSC_MODULE_QUIRK_HDQ1W),
1384+
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13791385
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000036, 0x000000ff,
1380-
SYSC_MODULE_QUIRK_I2C),
1386+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13811387
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x0000003c, 0x000000ff,
1382-
SYSC_MODULE_QUIRK_I2C),
1388+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13831389
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000040, 0x000000ff,
1384-
SYSC_MODULE_QUIRK_I2C),
1390+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13851391
SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
1386-
SYSC_MODULE_QUIRK_I2C),
1392+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13871393
SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
13881394
SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
13891395
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)