Skip to content

Commit 0619372

Browse files
committed
Merge tag 'omap-for-v5.6/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers
ti-sysc driver changes for omaps for v5.6 merge window Few changes to implement quirk handling for cases where we need to block clockdomain autoidle, drop old MMU specific quirks, and simplify the return code for sysc_init_resets(). * tag 'omap-for-v5.6/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Use PTR_ERR_OR_ZERO() to simplify code bus: ti-sysc: Drop MMU quirks bus: ti-sysc: Implement quirk handling for CLKDM_NOAUTO Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Olof Johansson <[email protected]>
2 parents 333505a + 3f2c420 commit 0619372

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

drivers/bus/ti-sysc.c

Lines changed: 9 additions & 9 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);
@@ -503,10 +503,8 @@ static int sysc_init_resets(struct sysc *ddata)
503503
{
504504
ddata->rsts =
505505
devm_reset_control_get_optional_shared(ddata->dev, "rstctrl");
506-
if (IS_ERR(ddata->rsts))
507-
return PTR_ERR(ddata->rsts);
508506

509-
return 0;
507+
return PTR_ERR_OR_ZERO(ddata->rsts);
510508
}
511509

512510
/**
@@ -1210,10 +1208,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
12101208
/* These drivers need to be fixed to not use pm_runtime_irq_safe() */
12111209
SYSC_QUIRK("gpio", 0, 0, 0x10, 0x114, 0x50600801, 0xffff00ff,
12121210
SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_OPT_CLKS_IN_RESET),
1213-
SYSC_QUIRK("mmu", 0, 0, 0x10, 0x14, 0x00000020, 0xffffffff,
1214-
SYSC_QUIRK_LEGACY_IDLE),
1215-
SYSC_QUIRK("mmu", 0, 0, 0x10, 0x14, 0x00000030, 0xffffffff,
1216-
SYSC_QUIRK_LEGACY_IDLE),
12171211
SYSC_QUIRK("sham", 0, 0x100, 0x110, 0x114, 0x40000c03, 0xffffffff,
12181212
SYSC_QUIRK_LEGACY_IDLE),
12191213
SYSC_QUIRK("smartreflex", 0, -1, 0x24, -1, 0x00000000, 0xffffffff,
@@ -1245,6 +1239,12 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
12451239
/* Quirks that need to be set based on detected module */
12461240
SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff,
12471241
SYSC_MODULE_QUIRK_AESS),
1242+
SYSC_QUIRK("dcan", 0x48480000, 0x20, -1, -1, 0xa3170504, 0xffffffff,
1243+
SYSC_QUIRK_CLKDM_NOAUTO),
1244+
SYSC_QUIRK("dwc3", 0x48880000, 0, 0x10, -1, 0x500a0200, 0xffffffff,
1245+
SYSC_QUIRK_CLKDM_NOAUTO),
1246+
SYSC_QUIRK("dwc3", 0x488c0000, 0, 0x10, -1, 0x500a0200, 0xffffffff,
1247+
SYSC_QUIRK_CLKDM_NOAUTO),
12481248
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
12491249
SYSC_MODULE_QUIRK_HDQ1W),
12501250
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)