Re: [PATCH V3 12/16] scsi: ufs: Add support for clock gating

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 10 September 2014 05:24 PM, Dolev Raviv wrote:
> From: Sahitya Tummala <stummala@xxxxxxxxxxxxxx>
> 
> 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.
> 

<snip>

>  
> @@ -1902,12 +2149,16 @@ out:
>  static int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode)
>  {
>  	struct uic_command uic_cmd = {0};
> +	int ret;
>  
>  	uic_cmd.command = UIC_CMD_DME_SET;
>  	uic_cmd.argument1 = UIC_ARG_MIB(PA_PWRMODE);
>  	uic_cmd.argument3 = mode;
> -
> -	return ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
> +	ufshcd_hold(hba, false);
> +	ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
> +	ufshcd_release(hba);
> +out:

May be you can remove this label because it is not used anywhere.

> +	return ret;
>  }
>  
>  static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba)
> @@ -2306,6 +2557,7 @@ static int ufshcd_verify_dev_init(struct ufs_hba *hba)
>  	int err = 0;
>  	int retries;
>  
> +	ufshcd_hold(hba, false);
>  	mutex_lock(&hba->dev_cmd.lock);
>  	for (retries = NOP_OUT_RETRIES; retries > 0; retries--) {
>  		err = ufshcd_exec_dev_cmd(hba, DEV_CMD_TYPE_NOP,
> @@ -2317,6 +2569,7 @@ static int ufshcd_verify_dev_init(struct ufs_hba *hba)
>  		dev_dbg(hba->dev, "%s: error %d retrying\n", __func__, err);
>  	}
>  	mutex_unlock(&hba->dev_cmd.lock);
> +	ufshcd_release(hba);
>  

Thanks,
--Kiran

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux