return !((reg & UFSHCD_STATUS_READY) == UFSHCD_STATUS_READY);
}
-/**
- * ufshcd_get_uic_cmd_result - Get the UIC command result
- * @hba: Pointer to adapter instance
- *
- * This function gets the result of UIC command completion
- *
- * Return: 0 on success; non-zero value on error.
- */
-static inline int ufshcd_get_uic_cmd_result(struct ufs_hba *hba)
-{
- return ufshcd_readl(hba, REG_UIC_COMMAND_ARG_2) &
- MASK_UIC_COMMAND_RESULT;
-}
-
-/**
- * ufshcd_get_dme_attr_val - Get the value of attribute returned by UIC command
- * @hba: Pointer to adapter instance
- *
- * This function gets UIC command argument3
- *
- * Return: 0 on success; non-zero value on error.
- */
-static inline u32 ufshcd_get_dme_attr_val(struct ufs_hba *hba)
-{
- return ufshcd_readl(hba, REG_UIC_COMMAND_ARG_3);
-}
-
/**
* ufshcd_get_req_rsp - returns the TR response transaction type
* @ucd_rsp_ptr: pointer to response UPIU
hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);
if (intr_status & UIC_COMMAND_COMPL) {
- cmd->argument2 |= ufshcd_get_uic_cmd_result(hba);
- cmd->argument3 = ufshcd_get_dme_attr_val(hba);
+ /*
+ * Store the UIC command result in the lowest byte of
+ * cmd->argument2.
+ */
+ cmd->argument2 |= ufshcd_readl(hba, REG_UIC_COMMAND_ARG_2) &
+ MASK_UIC_COMMAND_RESULT;
+ /* Store the DME attribute value in cmd->argument3. */
+ cmd->argument3 = ufshcd_readl(hba, REG_UIC_COMMAND_ARG_3);
if (!hba->uic_async_done)
cmd->cmd_active = false;
complete(&cmd->done);