bus: ti-sysc: Handle swsup idle mode quirks
authorTony Lindgren <tony@atomide.com>
Thu, 21 Mar 2019 20:27:08 +0000 (13:27 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 5 Apr 2019 22:10:36 +0000 (15:10 -0700)
In preparation of dropping interconnect target module platform data in
favor of devicetree based data, we must pass swsup idle quirks to the
platform data functions.

For now, let's only tag the UART modules with the SWSUP_SIDLE_ACT quirk.
The other modules will get tagged with swsup quirks as we drop the
platform data and test the changes.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.c
drivers/bus/ti-sysc.c
include/linux/platform_data/ti-sysc.h

index 4a924e444f8d37b0cd3674e0833e856b3df8aee1..4af2e9f0966df3ba500ae2875e74b057ca0f0093 100644 (file)
@@ -3683,6 +3683,12 @@ int omap_hwmod_init_module(struct device *dev,
                oh->flags |= HWMOD_INIT_NO_RESET;
        if (data->cfg->quirks & SYSC_QUIRK_USE_CLOCKACT)
                oh->flags |= HWMOD_SET_DEFAULT_CLOCKACT;
+       if (data->cfg->quirks & SYSC_QUIRK_SWSUP_SIDLE)
+               oh->flags |= HWMOD_SWSUP_SIDLE;
+       if (data->cfg->quirks & SYSC_QUIRK_SWSUP_SIDLE_ACT)
+               oh->flags |= HWMOD_SWSUP_SIDLE_ACT;
+       if (data->cfg->quirks & SYSC_QUIRK_SWSUP_MSTANDBY)
+               oh->flags |= HWMOD_SWSUP_MSTANDBY;
 
        error = omap_hwmod_check_module(dev, oh, data, sysc_fields,
                                        rev_offs, sysc_offs, syss_offs,
index 778bd0fffec094bd08e2174ec97f8d66a3966b32..d10460c0b15ac18a78e4c75f749ad1c393368ca6 100644 (file)
@@ -978,12 +978,12 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
        SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x4fff1301, 0xffff00ff,
                   0),
        SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff,
-                  SYSC_QUIRK_LEGACY_IDLE),
+                  SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
        /* Uarts on omap4 and later */
        SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x50411e03, 0xffff00ff,
-                  SYSC_QUIRK_LEGACY_IDLE),
+                  SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
        SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff,
-                  SYSC_QUIRK_LEGACY_IDLE),
+                  SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
 
        /* Quirks that need to be set based on the module address */
        SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -1, 0x50000800, 0xffffffff,
index 1384e5cdd31008009a40949b0880b147a2962cfc..9256c03059684ee544aa107e29a182c8ef5c5a4a 100644 (file)
@@ -46,6 +46,9 @@ struct sysc_regbits {
        s8 emufree_shift;
 };
 
+#define SYSC_QUIRK_SWSUP_MSTANDBY      BIT(13)
+#define SYSC_QUIRK_SWSUP_SIDLE_ACT     BIT(12)
+#define SYSC_QUIRK_SWSUP_SIDLE         BIT(11)
 #define SYSC_QUIRK_EXT_OPT_CLOCK       BIT(10)
 #define SYSC_QUIRK_LEGACY_IDLE         BIT(9)
 #define SYSC_QUIRK_RESET_STATUS                BIT(8)