Lines Matching refs:cmd_cfg

145 	u32 cmd_cfg;  member
703 static void meson_mmc_set_response_bits(struct mmc_command *cmd, u32 *cmd_cfg) in meson_mmc_set_response_bits() argument
707 *cmd_cfg |= CMD_CFG_RESP_128; in meson_mmc_set_response_bits()
708 *cmd_cfg |= CMD_CFG_RESP_NUM; in meson_mmc_set_response_bits()
711 *cmd_cfg |= CMD_CFG_RESP_NOCRC; in meson_mmc_set_response_bits()
714 *cmd_cfg |= CMD_CFG_R1B; in meson_mmc_set_response_bits()
716 *cmd_cfg |= CMD_CFG_NO_RESP; in meson_mmc_set_response_bits()
720 static void meson_mmc_desc_chain_transfer(struct mmc_host *mmc, u32 cmd_cfg) in meson_mmc_desc_chain_transfer() argument
730 cmd_cfg |= CMD_CFG_DATA_WR; in meson_mmc_desc_chain_transfer()
733 cmd_cfg |= CMD_CFG_BLOCK_MODE; in meson_mmc_desc_chain_transfer()
743 desc[i].cmd_cfg = cmd_cfg; in meson_mmc_desc_chain_transfer()
744 desc[i].cmd_cfg |= FIELD_PREP(CMD_CFG_LENGTH_MASK, len); in meson_mmc_desc_chain_transfer()
746 desc[i].cmd_cfg |= CMD_CFG_NO_CMD; in meson_mmc_desc_chain_transfer()
751 desc[data->sg_count - 1].cmd_cfg |= CMD_CFG_END_OF_CHAIN; in meson_mmc_desc_chain_transfer()
809 u32 cmd_cfg = 0, cmd_data = 0; in meson_mmc_start_cmd() local
817 cmd_cfg |= FIELD_PREP(CMD_CFG_CMD_INDEX_MASK, cmd->opcode); in meson_mmc_start_cmd()
818 cmd_cfg |= CMD_CFG_OWNER; /* owned by CPU */ in meson_mmc_start_cmd()
819 cmd_cfg |= CMD_CFG_ERROR; /* stop in case of error */ in meson_mmc_start_cmd()
821 meson_mmc_set_response_bits(cmd, &cmd_cfg); in meson_mmc_start_cmd()
826 cmd_cfg |= CMD_CFG_DATA_IO; in meson_mmc_start_cmd()
827 cmd_cfg |= FIELD_PREP(CMD_CFG_TIMEOUT_MASK, in meson_mmc_start_cmd()
831 meson_mmc_desc_chain_transfer(mmc, cmd_cfg); in meson_mmc_start_cmd()
836 cmd_cfg |= CMD_CFG_BLOCK_MODE; in meson_mmc_start_cmd()
837 cmd_cfg |= FIELD_PREP(CMD_CFG_LENGTH_MASK, in meson_mmc_start_cmd()
841 cmd_cfg |= FIELD_PREP(CMD_CFG_LENGTH_MASK, data->blksz); in meson_mmc_start_cmd()
846 cmd_cfg |= CMD_CFG_DATA_WR; in meson_mmc_start_cmd()
858 cmd_cfg |= FIELD_PREP(CMD_CFG_TIMEOUT_MASK, in meson_mmc_start_cmd()
863 cmd_cfg |= CMD_CFG_END_OF_CHAIN; in meson_mmc_start_cmd()
864 writel(cmd_cfg, host->regs + SD_EMMC_CMD_CFG); in meson_mmc_start_cmd()