Merge tag 'drivers_soc_for_5.15' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Thu, 12 Aug 2021 20:37:50 +0000 (22:37 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 12 Aug 2021 20:37:51 +0000 (22:37 +0200)
soc: Keystone SOC drivers for v5.15

The pull request contains:
 - ICSSG subsystem support for Keystone3 AM64x SOCs
 - Removes smartrefelx PM dependency for deeper low power states

* tag 'drivers_soc_for_5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  dt-bindings: soc: ti: pruss: Add dma-coherent property
  soc: ti: Remove pm_runtime_irq_safe() usage for smartreflex
  soc: ti: pruss: Enable support for ICSSG subsystems on K3 AM64x SoCs
  dt-bindings: soc: ti: pruss: Update bindings for K3 AM64x SoCs

Link: https://lore.kernel.org/r/0A637A41-2353-4900-962C-DBE50BBDE75A@oracle.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1  2 
drivers/bus/ti-sysc.c

diff --combined drivers/bus/ti-sysc.c
@@@ -100,7 -100,6 +100,7 @@@ static const char * const clock_names[S
   * @cookie: data used by legacy platform callbacks
   * @name: name if available
   * @revision: interconnect target module revision
 + * @reserved: target module is reserved and already in use
   * @enabled: sysc runtime enabled status
   * @needs_resume: runtime resume needed on resume from suspend
   * @child_needs_resume: runtime resume needed for child on resume from suspend
@@@ -131,7 -130,6 +131,7 @@@ struct sysc 
        struct ti_sysc_cookie cookie;
        const char *name;
        u32 revision;
 +      unsigned int reserved:1;
        unsigned int enabled:1;
        unsigned int needs_resume:1;
        unsigned int child_needs_resume:1;
@@@ -855,7 -853,7 +855,7 @@@ static int sysc_check_registers(struct 
  }
  
  /**
 - * syc_ioremap - ioremap register space for the interconnect target module
 + * sysc_ioremap - ioremap register space for the interconnect target module
   * @ddata: device driver data
   *
   * Note that the interconnect target module registers can be anywhere
@@@ -1446,10 -1444,6 +1446,6 @@@ static const struct sysc_revision_quir
                   SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_OPT_CLKS_IN_RESET),
        SYSC_QUIRK("sham", 0, 0x100, 0x110, 0x114, 0x40000c03, 0xffffffff,
                   SYSC_QUIRK_LEGACY_IDLE),
-       SYSC_QUIRK("smartreflex", 0, -ENODEV, 0x24, -ENODEV, 0x00000000, 0xffffffff,
-                  SYSC_QUIRK_LEGACY_IDLE),
-       SYSC_QUIRK("smartreflex", 0, -ENODEV, 0x38, -ENODEV, 0x00000000, 0xffffffff,
-                  SYSC_QUIRK_LEGACY_IDLE),
        SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000046, 0xffffffff,
                   SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
        SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff,
                   SYSC_MODULE_QUIRK_SGX),
        SYSC_QUIRK("lcdc", 0, 0, 0x54, -ENODEV, 0x4f201000, 0xffffffff,
                   SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
 +      SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44306302, 0xffffffff,
 +                 SYSC_QUIRK_SWSUP_SIDLE),
        SYSC_QUIRK("rtc", 0, 0x74, 0x78, -ENODEV, 0x4eb01908, 0xffff00f0,
                   SYSC_MODULE_QUIRK_RTC_UNLOCK),
        SYSC_QUIRK("tptc", 0, 0, 0x10, -ENODEV, 0x40006c00, 0xffffefff,
        SYSC_QUIRK("hsi", 0, 0, 0x10, 0x14, 0x50043101, 0xffffffff, 0),
        SYSC_QUIRK("iss", 0, 0, 0x10, -ENODEV, 0x40000101, 0xffffffff, 0),
        SYSC_QUIRK("keypad", 0x4a31c000, 0, 0x10, 0x14, 0x00000020, 0xffffffff, 0),
 -      SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44306302, 0xffffffff, 0),
        SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44307b02, 0xffffffff, 0),
        SYSC_QUIRK("mcbsp", 0, -ENODEV, 0x8c, -ENODEV, 0, 0, 0),
        SYSC_QUIRK("mcspi", 0, 0, 0x10, -ENODEV, 0x40300a0b, 0xffff00ff, 0),
        SYSC_QUIRK("sdma", 0, 0, 0x2c, 0x28, 0x00010900, 0xffffffff, 0),
        SYSC_QUIRK("slimbus", 0, 0, 0x10, -ENODEV, 0x40000902, 0xffffffff, 0),
        SYSC_QUIRK("slimbus", 0, 0, 0x10, -ENODEV, 0x40002903, 0xffffffff, 0),
+       SYSC_QUIRK("smartreflex", 0, -ENODEV, 0x24, -ENODEV, 0x00000000, 0xffffffff, 0),
+       SYSC_QUIRK("smartreflex", 0, -ENODEV, 0x38, -ENODEV, 0x00000000, 0xffffffff, 0),
        SYSC_QUIRK("spinlock", 0, 0, 0x10, -ENODEV, 0x50020000, 0xffffffff, 0),
        SYSC_QUIRK("rng", 0, 0x1fe0, 0x1fe4, -ENODEV, 0x00000020, 0xffffffff, 0),
        SYSC_QUIRK("timer", 0, 0, 0x10, 0x14, 0x00000013, 0xffffffff, 0),
@@@ -3096,8 -3091,8 +3094,8 @@@ static int sysc_probe(struct platform_d
                return error;
  
        error = sysc_check_active_timer(ddata);
 -      if (error)
 -              return error;
 +      if (error == -EBUSY)
 +              ddata->reserved = true;
  
        error = sysc_get_clocks(ddata);
        if (error)
                goto unprepare;
  
        pm_runtime_enable(ddata->dev);
 -      error = pm_runtime_get_sync(ddata->dev);
 +      error = pm_runtime_resume_and_get(ddata->dev);
        if (error < 0) {
 -              pm_runtime_put_noidle(ddata->dev);
                pm_runtime_disable(ddata->dev);
                goto unprepare;
        }
        sysc_show_registers(ddata);
  
        ddata->dev->type = &sysc_device_type;
 -      error = of_platform_populate(ddata->dev->of_node, sysc_match_table,
 -                                   pdata ? pdata->auxdata : NULL,
 -                                   ddata->dev);
 -      if (error)
 -              goto err;
 +
 +      if (!ddata->reserved) {
 +              error = of_platform_populate(ddata->dev->of_node,
 +                                           sysc_match_table,
 +                                           pdata ? pdata->auxdata : NULL,
 +                                           ddata->dev);
 +              if (error)
 +                      goto err;
 +      }
  
        INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle);
  
@@@ -3171,8 -3163,9 +3169,8 @@@ static int sysc_remove(struct platform_
  
        cancel_delayed_work_sync(&ddata->idle_work);
  
 -      error = pm_runtime_get_sync(ddata->dev);
 +      error = pm_runtime_resume_and_get(ddata->dev);
        if (error < 0) {
 -              pm_runtime_put_noidle(ddata->dev);
                pm_runtime_disable(ddata->dev);
                goto unprepare;
        }