Lines Matching refs:cmd_cfg

145 	u32 cmd_cfg;  member
688 static void meson_mmc_set_response_bits(struct mmc_command *cmd, u32 *cmd_cfg) in meson_mmc_set_response_bits() argument
692 *cmd_cfg |= CMD_CFG_RESP_128; in meson_mmc_set_response_bits()
693 *cmd_cfg |= CMD_CFG_RESP_NUM; in meson_mmc_set_response_bits()
696 *cmd_cfg |= CMD_CFG_RESP_NOCRC; in meson_mmc_set_response_bits()
699 *cmd_cfg |= CMD_CFG_R1B; in meson_mmc_set_response_bits()
701 *cmd_cfg |= CMD_CFG_NO_RESP; in meson_mmc_set_response_bits()
705 static void meson_mmc_desc_chain_transfer(struct mmc_host *mmc, u32 cmd_cfg) in meson_mmc_desc_chain_transfer() argument
715 cmd_cfg |= CMD_CFG_DATA_WR; in meson_mmc_desc_chain_transfer()
718 cmd_cfg |= CMD_CFG_BLOCK_MODE; in meson_mmc_desc_chain_transfer()
728 desc[i].cmd_cfg = cmd_cfg; in meson_mmc_desc_chain_transfer()
729 desc[i].cmd_cfg |= FIELD_PREP(CMD_CFG_LENGTH_MASK, len); in meson_mmc_desc_chain_transfer()
731 desc[i].cmd_cfg |= CMD_CFG_NO_CMD; in meson_mmc_desc_chain_transfer()
736 desc[data->sg_count - 1].cmd_cfg |= CMD_CFG_END_OF_CHAIN; in meson_mmc_desc_chain_transfer()
794 u32 cmd_cfg = 0, cmd_data = 0; in meson_mmc_start_cmd() local
802 cmd_cfg |= FIELD_PREP(CMD_CFG_CMD_INDEX_MASK, cmd->opcode); in meson_mmc_start_cmd()
803 cmd_cfg |= CMD_CFG_OWNER; /* owned by CPU */ in meson_mmc_start_cmd()
805 meson_mmc_set_response_bits(cmd, &cmd_cfg); in meson_mmc_start_cmd()
810 cmd_cfg |= CMD_CFG_DATA_IO; in meson_mmc_start_cmd()
811 cmd_cfg |= FIELD_PREP(CMD_CFG_TIMEOUT_MASK, in meson_mmc_start_cmd()
815 meson_mmc_desc_chain_transfer(mmc, cmd_cfg); in meson_mmc_start_cmd()
820 cmd_cfg |= CMD_CFG_BLOCK_MODE; in meson_mmc_start_cmd()
821 cmd_cfg |= FIELD_PREP(CMD_CFG_LENGTH_MASK, in meson_mmc_start_cmd()
825 cmd_cfg |= FIELD_PREP(CMD_CFG_LENGTH_MASK, data->blksz); in meson_mmc_start_cmd()
830 cmd_cfg |= CMD_CFG_DATA_WR; in meson_mmc_start_cmd()
842 cmd_cfg |= FIELD_PREP(CMD_CFG_TIMEOUT_MASK, in meson_mmc_start_cmd()
847 cmd_cfg |= CMD_CFG_END_OF_CHAIN; in meson_mmc_start_cmd()
848 writel(cmd_cfg, host->regs + SD_EMMC_CMD_CFG); in meson_mmc_start_cmd()