Lines Matching refs:cmd
98 struct uniphier_mmc_cmd *cmd) in uniphier_emmc_send_cmd() argument
106 mmio_write_32(host_base + SDHCI_ARGUMENT, cmd->cmdarg); in uniphier_emmc_send_cmd()
108 if (cmd->is_data) in uniphier_emmc_send_cmd()
115 if (!(cmd->resp_type & MMC_RSP_PRESENT)) in uniphier_emmc_send_cmd()
117 else if (cmd->resp_type & MMC_RSP_136) in uniphier_emmc_send_cmd()
119 else if (cmd->resp_type & MMC_RSP_BUSY) in uniphier_emmc_send_cmd()
124 if (cmd->resp_type & MMC_RSP_CRC) in uniphier_emmc_send_cmd()
126 if (cmd->resp_type & MMC_RSP_OPCODE) in uniphier_emmc_send_cmd()
128 if (cmd->is_data) in uniphier_emmc_send_cmd()
131 if (cmd->resp_type & MMC_RSP_BUSY || cmd->is_data) in uniphier_emmc_send_cmd()
137 SDHCI_MAKE_CMD(cmd->cmdidx, flags)); in uniphier_emmc_send_cmd()
156 struct uniphier_mmc_cmd cmd = {0}; in uniphier_emmc_switch_part() local
158 cmd.cmdidx = MMC_CMD_SWITCH; in uniphier_emmc_switch_part()
159 cmd.resp_type = MMC_RSP_R1b; in uniphier_emmc_switch_part()
160 cmd.cmdarg = (EXT_CSD_PART_CONF << 16) | (part_num << 8) | (3 << 24); in uniphier_emmc_switch_part()
162 return uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_switch_part()
168 struct uniphier_mmc_cmd cmd = {0}; in uniphier_emmc_check_device_size() local
172 cmd.cmdidx = MMC_CMD_SEND_CSD; in uniphier_emmc_check_device_size()
173 cmd.resp_type = MMC_RSP_R2; in uniphier_emmc_check_device_size()
174 cmd.cmdarg = UNIPHIER_EMMC_RCA << 16; in uniphier_emmc_check_device_size()
176 ret = uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_check_device_size()
194 struct uniphier_mmc_cmd cmd = {0}; in uniphier_emmc_load_image() local
212 cmd.cmdidx = MMC_CMD_READ_MULTIPLE_BLOCK; in uniphier_emmc_load_image()
213 cmd.resp_type = MMC_RSP_R1; in uniphier_emmc_load_image()
214 cmd.cmdarg = dev_addr; in uniphier_emmc_load_image()
215 cmd.is_data = 1; in uniphier_emmc_load_image()
217 return uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_load_image()
246 struct uniphier_mmc_cmd cmd = {0}; in uniphier_emmc_hw_init() local
254 cmd.cmdidx = MMC_CMD_SELECT_CARD; in uniphier_emmc_hw_init()
255 cmd.resp_type = MMC_RSP_R1; in uniphier_emmc_hw_init()
257 uniphier_emmc_send_cmd(host_base, &cmd); /* CMD7 (arg=0) */ in uniphier_emmc_hw_init()
270 cmd.cmdarg = UNIPHIER_EMMC_RCA << 16; in uniphier_emmc_hw_init()
273 ret = uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_hw_init()