• Konrad Dybcio's avatar
    interconnect: qcom: icc-rpm: Introduce keep_alive · b979049c
    Konrad Dybcio authored
    The downstream kernel employs the concept of "keeping the bus alive"
    by voting for the minimum (XO/19.2MHz) rate at all times on certain
    (well, most) buses. This is a very important thing to have, as if we
    either have a lackluster/wrong DT that doesn't specify a (high enough)
    vote on a certain bus, we may lose access to the entire bus altogether.
    This is very apparent when we only start introducing interconnect
    support on a given platform and haven't yet introduced voting on all
    peripherals.
    
    The same can happen if we only have a single driver casting a vote on
    a certain bus and that driver exits/crashes/suspends.
    
    The keepalive vote is limited to the ACTIVE bucket, as keeping a
    permanent vote on the SLEEP one could prevent the platform from properly
    entering low power mode states.
    
    Introduce the very same concept, with a slight twist: the vendor
    kernel checks whether the rate is zero before setting the minimum
    vote, but that's rather silly, as in doing so we're at the mercy
    of CCF. Instead, explicitly clamp the rates to always be >= 19.2 MHz
    for providers with keep_alive=true.
    Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Signed-off-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
    Acked-by: default avatarGeorgi Djakov <djakov@kernel.org>
    Link: https://lore.kernel.org/r/20230526-topic-smd_icc-v7-6-09c78c175546@linaro.orgSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
    b979049c
icc-rpm.h 3.45 KB