• Sahitya Tummala's avatar
    ufs: Add support for clock gating · 1ab27c9c
    Sahitya Tummala authored
    The UFS controller clocks can be gated after certain period of
    inactivity, which is typically less than runtime suspend timeout.
    In addition to clocks the link will also be put into Hibern8 mode
    to save more power.
    
    The clock gating can be turned on by enabling the capability
    UFSHCD_CAP_CLK_GATING. To enable entering into Hibern8 mode as part of
    clock gating, set the capability UFSHCD_CAP_HIBERN8_WITH_CLK_GATING.
    
    The tracing events for clock gating can be enabled through debugfs as:
    echo 1 > /sys/kernel/debug/tracing/events/ufs/ufshcd_clk_gating/enable
    cat /sys/kernel/debug/tracing/trace_pipe
    Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
    Signed-off-by: default avatarDolev Raviv <draviv@codeaurora.org>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    1ab27c9c
ufshcd.c 139 KB