scale_up
scale_up(rwb);
scale_up(rwb);
scale_up(rwb);
u8 scale_up)
u8 cmd_scaler[] = { MCS_PARAM_SCALER_FUNCTION, scale_up };
static int ufshcd_set_clk_freq(struct ufs_hba *hba, bool scale_up)
if (scale_up && clki->max_freq) {
} else if (!scale_up && clki->min_freq) {
bool scale_up)
ret = ufshcd_vops_clk_scale_notify(hba, scale_up, freq, PRE_CHANGE);
ret = ufshcd_set_clk_freq(hba, scale_up);
ret = ufshcd_vops_clk_scale_notify(hba, scale_up, freq, POST_CHANGE);
ufshcd_set_clk_freq(hba, !scale_up);
ufshcd_pm_qos_update(hba, scale_up);
(scale_up ? "up" : "down"),
unsigned long freq, bool scale_up)
if (scale_up && clki->max_freq) {
} else if (!scale_up && clki->min_freq) {
static int ufshcd_scale_gear(struct ufs_hba *hba, u32 target_gear, bool scale_up)
if (scale_up) {
bool scale_up)
if (!scale_up) {
ret = ufshcd_scale_clks(hba, freq, scale_up);
if (!scale_up)
if (scale_up) {
bool scale_up = false, sched_clk_scaling_suspend_work = false;
scale_up = *freq > hba->clk_scaling.target_freq;
scale_up = *freq == clki->max_freq;
if (!hba->use_pm_opp && !scale_up)
if (!ufshcd_is_devfreq_scaling_required(hba, *freq, scale_up)) {
ret = ufshcd_devfreq_scale(hba, *freq, scale_up);
(scale_up ? "up" : "down"),
(!scale_up || hba->clk_scaling.suspend_on_no_request))
bool scale_up);
TP_PROTO(const char *name, bool scale_up, unsigned long clk_rate),
TP_ARGS(name, scale_up, clk_rate),
__field(bool, scale_up)
__entry->scale_up = scale_up;
__entry->scale_up ? "up" : "down",
static void _ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up)
if (scale_up) {
static void ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up)
if (host->clk_scale_up == scale_up)
if (scale_up)
host->clk_scale_up = scale_up;
if (scale_up)
trace_ufs_mtk_clk_scale(clki->name, scale_up, clk_get_rate(clki->clk));
static int ufs_mtk_clk_scale_notify(struct ufs_hba *hba, bool scale_up,
ufs_mtk_clk_scale(hba, scale_up);
ufs_mtk_scale_perf(hba, scale_up);
static void _ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up);
static void ufs_mtk_scale_perf(struct ufs_hba *hba, bool scale_up)
ufs_mtk_boost_crypt(hba, scale_up);
static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, bool scale_up,
if (scale_up)
if (scale_up)