Lines Matching refs:uic_cmd
2280 ufshcd_dispatch_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) in ufshcd_dispatch_uic_cmd() argument
2286 hba->active_uic_cmd = uic_cmd; in ufshcd_dispatch_uic_cmd()
2289 ufshcd_writel(hba, uic_cmd->argument1, REG_UIC_COMMAND_ARG_1); in ufshcd_dispatch_uic_cmd()
2290 ufshcd_writel(hba, uic_cmd->argument2, REG_UIC_COMMAND_ARG_2); in ufshcd_dispatch_uic_cmd()
2291 ufshcd_writel(hba, uic_cmd->argument3, REG_UIC_COMMAND_ARG_3); in ufshcd_dispatch_uic_cmd()
2293 ufshcd_add_uic_command_trace(hba, uic_cmd, UFS_CMD_SEND); in ufshcd_dispatch_uic_cmd()
2296 ufshcd_writel(hba, uic_cmd->command & COMMAND_OPCODE_MASK, in ufshcd_dispatch_uic_cmd()
2308 ufshcd_wait_for_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) in ufshcd_wait_for_uic_cmd() argument
2315 if (wait_for_completion_timeout(&uic_cmd->done, in ufshcd_wait_for_uic_cmd()
2317 ret = uic_cmd->argument2 & MASK_UIC_COMMAND_RESULT; in ufshcd_wait_for_uic_cmd()
2322 uic_cmd->command, uic_cmd->argument3); in ufshcd_wait_for_uic_cmd()
2324 if (!uic_cmd->cmd_active) { in ufshcd_wait_for_uic_cmd()
2327 ret = uic_cmd->argument2 & MASK_UIC_COMMAND_RESULT; in ufshcd_wait_for_uic_cmd()
2347 __ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd, in __ufshcd_send_uic_cmd() argument
2360 init_completion(&uic_cmd->done); in __ufshcd_send_uic_cmd()
2362 uic_cmd->cmd_active = 1; in __ufshcd_send_uic_cmd()
2363 ufshcd_dispatch_uic_cmd(hba, uic_cmd); in __ufshcd_send_uic_cmd()
2375 int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) in ufshcd_send_uic_cmd() argument
2388 ret = __ufshcd_send_uic_cmd(hba, uic_cmd, true); in ufshcd_send_uic_cmd()
2391 ret = ufshcd_wait_for_uic_cmd(hba, uic_cmd); in ufshcd_send_uic_cmd()
3799 struct uic_command uic_cmd = {0}; in ufshcd_dme_link_startup() local
3802 uic_cmd.command = UIC_CMD_DME_LINK_STARTUP; in ufshcd_dme_link_startup()
3804 ret = ufshcd_send_uic_cmd(hba, &uic_cmd); in ufshcd_dme_link_startup()
3821 struct uic_command uic_cmd = {0}; in ufshcd_dme_reset() local
3824 uic_cmd.command = UIC_CMD_DME_RESET; in ufshcd_dme_reset()
3826 ret = ufshcd_send_uic_cmd(hba, &uic_cmd); in ufshcd_dme_reset()
3860 struct uic_command uic_cmd = {0}; in ufshcd_dme_enable() local
3863 uic_cmd.command = UIC_CMD_DME_ENABLE; in ufshcd_dme_enable()
3865 ret = ufshcd_send_uic_cmd(hba, &uic_cmd); in ufshcd_dme_enable()
3917 struct uic_command uic_cmd = {0}; in ufshcd_dme_set_attr() local
3926 uic_cmd.command = peer ? in ufshcd_dme_set_attr()
3928 uic_cmd.argument1 = attr_sel; in ufshcd_dme_set_attr()
3929 uic_cmd.argument2 = UIC_ARG_ATTR_TYPE(attr_set); in ufshcd_dme_set_attr()
3930 uic_cmd.argument3 = mib_val; in ufshcd_dme_set_attr()
3934 ret = ufshcd_send_uic_cmd(hba, &uic_cmd); in ufshcd_dme_set_attr()
3961 struct uic_command uic_cmd = {0}; in ufshcd_dme_get_attr() local
3995 uic_cmd.command = peer ? in ufshcd_dme_get_attr()
3997 uic_cmd.argument1 = attr_sel; in ufshcd_dme_get_attr()
4001 ret = ufshcd_send_uic_cmd(hba, &uic_cmd); in ufshcd_dme_get_attr()
4013 *mib_val = uic_cmd.argument3; in ufshcd_dme_get_attr()
4131 struct uic_command uic_cmd = {0}; in ufshcd_uic_change_pwr_mode() local
4144 uic_cmd.command = UIC_CMD_DME_SET; in ufshcd_uic_change_pwr_mode()
4145 uic_cmd.argument1 = UIC_ARG_MIB(PA_PWRMODE); in ufshcd_uic_change_pwr_mode()
4146 uic_cmd.argument3 = mode; in ufshcd_uic_change_pwr_mode()
4148 ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd); in ufshcd_uic_change_pwr_mode()
4188 struct uic_command uic_cmd = {0}; in ufshcd_uic_hibern8_enter() local
4193 uic_cmd.command = UIC_CMD_DME_HIBER_ENTER; in ufshcd_uic_hibern8_enter()
4194 ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd); in ufshcd_uic_hibern8_enter()
4211 struct uic_command uic_cmd = {0}; in ufshcd_uic_hibern8_exit() local
4217 uic_cmd.command = UIC_CMD_DME_HIBER_EXIT; in ufshcd_uic_hibern8_exit()
4218 ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd); in ufshcd_uic_hibern8_exit()