• Alex Elder's avatar
    net: ipa: don't use ipa_clock_get() in "ipa_smp2p.c" · c43adc75
    Alex Elder authored
    If the "modem-init" Device Tree property is present for a platform,
    the modem performs early IPA hardware initialization, and signals
    this is complete with an "ipa-setup-ready" SMP2P interrupt.  This
    triggers a call to ipa_setup(), which requires the hardware to be
    powered.
    
    Replace the call to ipa_clock_get() in this case with a call to
    pm_runtime_get_sync().  And replace the corresponding calls to
    ipa_clock_put() with calls to pm_runtime_put() instead.
    
    There is a chance we get an error when taking this power reference.
    This is an unlikely scenario, where system suspend is initiated just
    before the modem signals it has finished initializing the IPA
    hardware.  For now we'll just accept that this could occur, and
    report it if it does.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c43adc75
ipa_smp2p.c 9.3 KB