• Yaniv Gardi's avatar
    ufs: Active Power Mode - configuring bActiveICCLevel · 3a4bf06d
    Yaniv Gardi authored
    The maximum power consumption in active is determined by bActiveICCLevel.
    The configuration is done by reading max current supported by the
    regulators connected to VCC, VCCQ and VCCQ2 rails on the boards, and
    reading the current consumption levels from the device for each rails
    (vcc/vccq/vccq2) using power descriptor.
    We configure the bActiveICCLevel attribute, with the max value that
    correspond to the minimum-of(VCC-current-level,VCCQ-current-level,
    VCCQ2-current-level).
    In order to minimize resume latency, pre-fetch icc levels and reference
    clock during initialization and avoid reading them each link startup
    during resume.
    Signed-off-by: default avatarRaviv Shvili <rshvili@codeaurora.org>
    Signed-off-by: default avatarYaniv Gardi <ygardi@codeaurora.org>
    Signed-off-by: default avatarDolev Raviv <draviv@codeaurora.org>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    3a4bf06d
ufshcd.c 104 KB