Skip to content
Snippets Groups Projects
  1. Jul 27, 2021
  2. Jul 26, 2021
    • David S. Miller's avatar
      Merge branch 'ipa-clock' · 268ca412
      David S. Miller authored
      
      Alex Elder says:
      
      ====================
      net: ipa: defer taking uC proxy clock
      
      This series rearranges some of the IPA initialization code.
      
      The first patch gets rid of two trivial setup and teardown
      functions, open-coding them in their callers instead.
      
      The second patch has memory regions get configured before endpoints.
      
      IPA interrupts do not depend on GSI being initialized.  Therefore
      they can be initialized in the config phase rather than waiting for
      setup.  The third patch moves this initialization earlier; memory
      regions must already be defined, so it's done after memory config.
      
      The microcontroller also has no dependency on GSI, though it does
      require IPA interrupts to be configured.  The fourth patch moves
      microcontroller initialization so it too happens during the config
      phase rather than setup.
      
      Finally, we currently take a "proxy clock" for the microcontroller
      during the config phase, dropping it only after we learn the
      microcontroller is initialized.  But microcontroller initialization
      is started by the modem, so there's no point in taking that clock
      reference before we know the modem has booted.  So the last patch
      arranges to wait to take the "proxy clock" for the microcontroller
      until we know the modem is about to boot.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      268ca412
    • Alex Elder's avatar
      net: ipa: introduce ipa_uc_clock() · e2f154e6
      Alex Elder authored
      
      The first time it's booted, the modem loads and starts the
      IPA-resident microcontroller.  Once the microcontroller has
      completed its initialization, it notifies the AP it's "ready"
      by sending an INIT_COMPLETED response message.
      
      Until it receives that microcontroller message, the AP must ensure
      the IPA core clock remains operational.  Currently, a "proxy" clock
      reference is taken in ipa_uc_config(), dropping it again once the
      message is received.
      
      However there could be a long delay between when ipa_config()
      completes and when modem actually starts.  And because the
      microcontroller gets loaded by the modem, there's no need to
      get the modem "proxy clock" until the first time it starts.
      
      Create a new function ipa_uc_clock() which takes the "proxy" clock
      reference for the microcontroller.  Call it when we get remoteproc
      SSR notification that the modem is about to start.  Keep an
      additional flag to record whether this proxy clock reference needs
      to be dropped at shutdown time, and issue a warning if we get the
      microcontroller message either before the clock reference is taken,
      or after it has already been dropped.
      
      Drop the nearby use of "hh" length modifiers, which are no longer
      encouraged in the kernel.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2f154e6
Loading