Skip to content

Commit 94f6345

Browse files
committed
bus: ti-sysc: Implement quirk handling for CLKDM_NOAUTO
For dra7 dcan and dwc3 instances we need to block clockdomain autoidle. Let's do this with CLKDM_NOAUTO quirk flag and enable it for dcan and dwc3. Cc: Keerthy <[email protected]> Cc: Roger Quadros <[email protected]> Cc: Tero Kristo <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent e709ed7 commit 94f6345

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

drivers/bus/ti-sysc.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ static void sysc_clkdm_deny_idle(struct sysc *ddata)
473473
{
474474
struct ti_sysc_platform_data *pdata;
475475

476-
if (ddata->legacy_mode)
476+
if (ddata->legacy_mode || (ddata->cfg.quirks & SYSC_QUIRK_CLKDM_NOAUTO))
477477
return;
478478

479479
pdata = dev_get_platdata(ddata->dev);
@@ -485,7 +485,7 @@ static void sysc_clkdm_allow_idle(struct sysc *ddata)
485485
{
486486
struct ti_sysc_platform_data *pdata;
487487

488-
if (ddata->legacy_mode)
488+
if (ddata->legacy_mode || (ddata->cfg.quirks & SYSC_QUIRK_CLKDM_NOAUTO))
489489
return;
490490

491491
pdata = dev_get_platdata(ddata->dev);
@@ -1245,6 +1245,12 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
12451245
/* Quirks that need to be set based on detected module */
12461246
SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff,
12471247
SYSC_MODULE_QUIRK_AESS),
1248+
SYSC_QUIRK("dcan", 0x48480000, 0x20, -1, -1, 0xa3170504, 0xffffffff,
1249+
SYSC_QUIRK_CLKDM_NOAUTO),
1250+
SYSC_QUIRK("dwc3", 0x48880000, 0, 0x10, -1, 0x500a0200, 0xffffffff,
1251+
SYSC_QUIRK_CLKDM_NOAUTO),
1252+
SYSC_QUIRK("dwc3", 0x488c0000, 0, 0x10, -1, 0x500a0200, 0xffffffff,
1253+
SYSC_QUIRK_CLKDM_NOAUTO),
12481254
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
12491255
SYSC_MODULE_QUIRK_HDQ1W),
12501256
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,

include/linux/platform_data/ti-sysc.h

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

52+
#define SYSC_QUIRK_CLKDM_NOAUTO BIT(21)
5253
#define SYSC_QUIRK_FORCE_MSTANDBY BIT(20)
5354
#define SYSC_MODULE_QUIRK_AESS BIT(19)
5455
#define SYSC_MODULE_QUIRK_SGX BIT(18)

0 commit comments

Comments
 (0)