Skip to content

Commit

Permalink
bus: ti-sysc: Handle missed no-idle property in addition to no-idle-o…
Browse files Browse the repository at this point in the history
…n-init

We have ti,no-idle in use in addition to ti,no-idle-on-init but we're
missing handling for it in the ti-sysc interconnect target module driver.

Let's also group the idle defines together and update the binding
documentation for it.

Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Tony Lindgren committed Apr 1, 2019
1 parent aaa29bb commit 386cb76
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/bus/ti-sysc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Optional properties:

- ti,no-idle-on-init interconnect target module should not be idled at init

- ti,no-idle interconnect target module should not be idled

Example: Single instance of MUSB controller on omap4 using interconnect ranges
using offsets from l4_cfg second segment (0x4a000000 + 0x80000 = 0x4a0ab000):

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -3675,6 +3675,8 @@ int omap_hwmod_init_module(struct device *dev,
if (error)
return error;

if (data->cfg->quirks & SYSC_QUIRK_NO_IDLE)
oh->flags |= HWMOD_NO_IDLE;
if (data->cfg->quirks & SYSC_QUIRK_NO_IDLE_ON_INIT)
oh->flags |= HWMOD_INIT_NO_IDLE;
if (data->cfg->quirks & SYSC_QUIRK_NO_RESET_ON_INIT)
Expand Down
5 changes: 4 additions & 1 deletion drivers/bus/ti-sysc.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,8 @@ static int sysc_init_module(struct sysc *ddata)
{
int error;

if (ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE_ON_INIT) {
if (ddata->cfg.quirks &
(SYSC_QUIRK_NO_IDLE | SYSC_QUIRK_NO_IDLE_ON_INIT)) {
ddata->revision = sysc_read_revision(ddata);
goto rev_quirks;
}
Expand Down Expand Up @@ -1281,6 +1282,8 @@ static const struct sysc_dts_quirk sysc_dts_quirks[] = {
.mask = SYSC_QUIRK_NO_IDLE_ON_INIT, },
{ .name = "ti,no-reset-on-init",
.mask = SYSC_QUIRK_NO_RESET_ON_INIT, },
{ .name = "ti,no-idle",
.mask = SYSC_QUIRK_NO_IDLE, },
};

static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
Expand Down
5 changes: 3 additions & 2 deletions include/linux/platform_data/ti-sysc.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ struct sysc_regbits {
s8 emufree_shift;
};

#define SYSC_QUIRK_LEGACY_IDLE BIT(8)
#define SYSC_QUIRK_RESET_STATUS BIT(7)
#define SYSC_QUIRK_LEGACY_IDLE BIT(9)
#define SYSC_QUIRK_RESET_STATUS BIT(8)
#define SYSC_QUIRK_NO_IDLE BIT(7)
#define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6)
#define SYSC_QUIRK_NO_RESET_ON_INIT BIT(5)
#define SYSC_QUIRK_OPT_CLKS_NEEDED BIT(4)
Expand Down

0 comments on commit 386cb76

Please sign in to comment.