1. 29 Jul, 2021 5 commits
  2. 28 Jul, 2021 27 commits
  3. 27 Jul, 2021 8 commits
    • David S. Miller's avatar
      Merge branch 'ipa-clock-refs' · 299b50fc
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: add clock references
      
      This series continues preparation for implementing runtime power
      management for IPA.  We need to ensure that the IPA core clock and
      interconnects are operational whenever IPA hardware is accessed.
      And in particular this means that any external entry point that can
      lead to accessing IPA hardware must guarantee the hardware is "up"
      when it is accessed.
      
      The first four patches in this series take IPA clock references when
      needed by such external entry points, dropping those references in
      those same functions when they are no longer required.
      
      The last patch is a bit different, though it too prepares for
      enabling runtime power management.  It avoids suspending/resuming
      endpoints if setup is not complete.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      299b50fc
    • Alex Elder's avatar
      net: ipa: don't suspend endpoints if setup not complete · 2c257248
      Alex Elder authored
      Until we complete the setup stage of initialization, GSI is not
      initialized and therefore endpoints aren't usable.  So avoid
      suspending endpoints during system suspend unless setup is complete.
      
      Clear the setup_complete flag at the top of ipa_teardown() to
      reflect the fact that things are no longer in setup state.
      
      Get rid of a misplaced (and superfluous) comment.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c257248
    • Alex Elder's avatar
      net: ipa: add a clock reference for netdev operations · f2b03553
      Alex Elder authored
      The IPA network device can be opened at any time, and an opened
      network device can be stopped any time.  Both of these callback
      functions require access to the hardware, and therefore they need
      the IPA clock to be operational.  Take an IPA clock reference in
      both the ->open and ->stop callback functions, dropping the
      reference when they are done accessing hardware.
      
      The ->start_xmit callback requires a little different handling,
      and that will be added separately.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f2b03553
    • Alex Elder's avatar
      net: ipa: add clock reference for remoteproc SSR · 34c6034b
      Alex Elder authored
      The remoteproc SSR callback function for the modem requires hardware
      access when handling a modem crash or shutdown.  Take and later
      release an IPA clock reference in ipa_modem_crashed(), to ensure the
      hardware is operational.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34c6034b
    • Alex Elder's avatar
      net: ipa: get another clock for ipa_setup() · cf8dfe6a
      Alex Elder authored
      Two places call ipa_setup().  The first, ipa_probe(), holds an IPA
      clock reference when calling ipa_setup() (if the AP is responsible
      for IPA firmware loading).  But if the modem is loading IPA
      firmware, ipa_smp2p_modem_setup_ready_isr() calls ipa_setup() after
      the modem has signaled the hardware is ready.  This can happen at
      any time, and there is no guarantee the hardware is active.
      
      Have ipa_smp2p_modem_setup() take an IPA clock reference before it
      calls ipa_setup(), and release it once setup is complete.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf8dfe6a
    • Alex Elder's avatar
      net: ipa: get clock in ipa_probe() · 923a6b69
      Alex Elder authored
      Any entry point that leads to IPA hardware access must ensure the
      hardware is operational (clocked).  Currently we ensure this by
      taking an extra clock reference during setup that is not released
      until we receive a system suspend request.  But this extra reference
      will soon go away.
      
      When the platform driver ->probe function is called, we first need
      hardware access in ipa_config().  Although ipa_config() takes an IPA
      clock reference, it the special reference taken to prevent suspending
      the hardware.
      
      Have ipa_probe() take a reference before calling ipa_config(), so
      that the "no-suspend" reference can eventually go away.  Drop this
      reference before ipa_probe() returns.
      
      Similarly, the driver ->remove function can be called at any time.
      Take an IPA clock reference at the beginning of that function, and
      drop it again after the deconfig stage has completed (at which point
      hardware access is no longer needed).
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      923a6b69
    • David S. Miller's avatar
      Merge branch 'ipa-interrupts' · f34d9224
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: IPA interrupt cleanup
      
      The first patch in this series makes all IPA interrupt handling be
      done in a threaded context.  The remaining ones refactor some code
      to simplify that threaded handler function.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f34d9224
    • Alex Elder's avatar
      net: ipa: kill ipa_interrupt_process_all() · 176086d8
      Alex Elder authored
      Now that ipa_isr_thread() is a simple wrapper that gets a clock
      reference around ipa_interrupt_process_all(), get rid of the
      called function and just open-code it in ipa_isr_thread().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      176086d8