Loading drivers/scsi/ufs/ufshcd.c +6 −8 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ #include <linux/async.h> #include <scsi/ufs/ioctl.h> #include <linux/devfreq.h> #include <linux/nls.h> #include <linux/of.h> #include <linux/bitfield.h> Loading Loading @@ -490,12 +489,6 @@ static void *gov_data = &ufshcd_ondemand_data; static void *gov_data; #endif static struct devfreq_dev_profile ufs_devfreq_profile = { .polling_ms = 60, .target = ufshcd_devfreq_target, .get_dev_status = ufshcd_devfreq_get_dev_status, }; static inline bool ufshcd_valid_tag(struct ufs_hba *hba, int tag) { return tag >= 0 && tag < hba->nutrs; Loading Loading @@ -1957,6 +1950,7 @@ static int ufshcd_devfreq_init(struct ufs_hba *hba) struct list_head *clk_list = &hba->clk_list_head; struct ufs_clk_info *clki; struct devfreq *devfreq; struct ufs_clk_scaling *scaling = &hba->clk_scaling; int ret; /* Skip devfreq if we don't have any clocks in the list */ Loading @@ -1967,8 +1961,12 @@ static int ufshcd_devfreq_init(struct ufs_hba *hba) dev_pm_opp_add(hba->dev, clki->min_freq, 0); dev_pm_opp_add(hba->dev, clki->max_freq, 0); scaling->profile.polling_ms = 60; scaling->profile.target = ufshcd_devfreq_target; scaling->profile.get_dev_status = ufshcd_devfreq_get_dev_status; devfreq = devfreq_add_device(hba->dev, &ufs_devfreq_profile, &scaling->profile, DEVFREQ_GOV_SIMPLE_ONDEMAND, gov_data); if (IS_ERR(devfreq)) { Loading drivers/scsi/ufs/ufshcd.h +4 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * This code is based on drivers/scsi/ufs/ufshcd.h * Copyright (C) 2011-2013 Samsung India Software Operations * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * Authors: * Santosh Yaraganavi <santosh.sy@samsung.com> Loading Loading @@ -59,6 +59,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/reset.h> #include <linux/extcon.h> #include <linux/devfreq.h> #include "unipro.h" #include <asm/irq.h> Loading Loading @@ -518,6 +519,7 @@ struct ufs_hibern8_on_idle { * @workq: workqueue to schedule devfreq suspend/resume work * @suspend_work: worker to suspend devfreq * @resume_work: worker to resume devfreq * @profile: devfreq profile * @is_allowed: tracks if scaling is currently allowed or not * @is_busy_started: tracks if busy period has started or not * @is_suspended: tracks if devfreq is suspended or not Loading @@ -533,6 +535,7 @@ struct ufs_clk_scaling { struct workqueue_struct *workq; struct work_struct suspend_work; struct work_struct resume_work; struct devfreq_dev_profile profile; bool is_allowed; bool is_busy_started; bool is_suspended; Loading Loading
drivers/scsi/ufs/ufshcd.c +6 −8 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ #include <linux/async.h> #include <scsi/ufs/ioctl.h> #include <linux/devfreq.h> #include <linux/nls.h> #include <linux/of.h> #include <linux/bitfield.h> Loading Loading @@ -490,12 +489,6 @@ static void *gov_data = &ufshcd_ondemand_data; static void *gov_data; #endif static struct devfreq_dev_profile ufs_devfreq_profile = { .polling_ms = 60, .target = ufshcd_devfreq_target, .get_dev_status = ufshcd_devfreq_get_dev_status, }; static inline bool ufshcd_valid_tag(struct ufs_hba *hba, int tag) { return tag >= 0 && tag < hba->nutrs; Loading Loading @@ -1957,6 +1950,7 @@ static int ufshcd_devfreq_init(struct ufs_hba *hba) struct list_head *clk_list = &hba->clk_list_head; struct ufs_clk_info *clki; struct devfreq *devfreq; struct ufs_clk_scaling *scaling = &hba->clk_scaling; int ret; /* Skip devfreq if we don't have any clocks in the list */ Loading @@ -1967,8 +1961,12 @@ static int ufshcd_devfreq_init(struct ufs_hba *hba) dev_pm_opp_add(hba->dev, clki->min_freq, 0); dev_pm_opp_add(hba->dev, clki->max_freq, 0); scaling->profile.polling_ms = 60; scaling->profile.target = ufshcd_devfreq_target; scaling->profile.get_dev_status = ufshcd_devfreq_get_dev_status; devfreq = devfreq_add_device(hba->dev, &ufs_devfreq_profile, &scaling->profile, DEVFREQ_GOV_SIMPLE_ONDEMAND, gov_data); if (IS_ERR(devfreq)) { Loading
drivers/scsi/ufs/ufshcd.h +4 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * This code is based on drivers/scsi/ufs/ufshcd.h * Copyright (C) 2011-2013 Samsung India Software Operations * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * Authors: * Santosh Yaraganavi <santosh.sy@samsung.com> Loading Loading @@ -59,6 +59,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/reset.h> #include <linux/extcon.h> #include <linux/devfreq.h> #include "unipro.h" #include <asm/irq.h> Loading Loading @@ -518,6 +519,7 @@ struct ufs_hibern8_on_idle { * @workq: workqueue to schedule devfreq suspend/resume work * @suspend_work: worker to suspend devfreq * @resume_work: worker to resume devfreq * @profile: devfreq profile * @is_allowed: tracks if scaling is currently allowed or not * @is_busy_started: tracks if busy period has started or not * @is_suspended: tracks if devfreq is suspended or not Loading @@ -533,6 +535,7 @@ struct ufs_clk_scaling { struct workqueue_struct *workq; struct work_struct suspend_work; struct work_struct resume_work; struct devfreq_dev_profile profile; bool is_allowed; bool is_busy_started; bool is_suspended; Loading