[PATCH v1 0/2] ufs: allow vendor disable wb toggle in clock scaling

Bean Huo huobean at gmail.com
Thu Jul 28 14:26:29 PDT 2022


On Thu, 2022-07-28 at 14:09 -0700, Bart Van Assche wrote:
> On 7/28/22 00:16, peter.wang at mediatek.com wrote:
> > Mediatek ufs do not want to toggle write booster when clock
> > scaling.
> > This patch set allow vendor disable wb toggle in clock scaling.
> 
> I don't like this approach. Whether or not to toggle the write
> booster 
> when scaling the clock is not dependent on the host controller and
> hence 
> should not depend on the host controller driver.
> 
> Has it been considered to add a sysfs attribute in the UFS driver
> core 
> to control this behavior?
> 

Bart, 
we already have wb_on sysfs node, but it only allows to write this node
when clock scaling is not supported.


static ssize_t wb_on_store(..)
{
	struct ufs_hba *hba = dev_get_drvdata(dev);
	unsigned int wb_enable;
	ssize_t res;

	if (ufshcd_is_clkscaling_supported(hba)) {
		/*
		 * If the platform supports
UFSHCD_CAP_AUTO_BKOPS_SUSPEND,
		 * turn WB on/off will be done while clock scaling
up/down.
		 */
		dev_warn(dev, "To control WB through wb_on is not
allowed!\n");
		return -EOPNOTSUPP;
	}


Kind regards,
Bean

> Thanks,
> 
> Bart.




More information about the Linux-mediatek mailing list