diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c index 7a6d390..acd23a4 100644 --- a/commands/mmc_extcsd.c +++ b/commands/mmc_extcsd.c @@ -2357,7 +2357,7 @@ break; } - mci_switch(mci, 0, index, value); + mci_switch(mci, index, value); out: return; diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 208b766..c6b4e02 100644 --- a/drivers/mci/mci-core.c +++ b/drivers/mci/mci-core.c @@ -396,8 +396,7 @@ * @param value FIXME * @return Transaction status (0 on success) */ -int mci_switch(struct mci *mci, unsigned set, unsigned index, - unsigned value) +int mci_switch(struct mci *mci, unsigned index, unsigned value) { struct mci_cmd cmd; @@ -471,7 +470,7 @@ cardtype = mci->ext_csd[EXT_CSD_DEVICE_TYPE] & EXT_CSD_CARD_TYPE_MASK; - err = mci_switch(mci, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1); + err = mci_switch(mci, EXT_CSD_HS_TIMING, 1); if (err) { dev_dbg(&mci->dev, "MMC frequency changing failed: %d\n", err); @@ -1044,9 +1043,7 @@ * 4bit transfer mode. On success set the corresponding * bus width on the host. */ - err = mci_switch(mci, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_BUS_WIDTH, - ext_csd_bits[idx]); + err = mci_switch(mci, EXT_CSD_BUS_WIDTH, ext_csd_bits[idx]); if (err) { if (idx == 0) dev_warn(&mci->dev, "Changing MMC bus width failed: %d\n", err); @@ -1253,8 +1250,7 @@ part_config &= ~EXT_CSD_PART_CONFIG_ACC_MASK; part_config |= part->part_cfg; - ret = mci_switch(mci, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_PARTITION_CONFIG, part_config); + ret = mci_switch(mci, EXT_CSD_PARTITION_CONFIG, part_config); if (ret) return ret; @@ -1568,8 +1564,8 @@ mci->ext_csd_part_config &= ~(7 << 3); mci->ext_csd_part_config |= mci->bootpart << 3; - return mci_switch(mci, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_PARTITION_CONFIG, mci->ext_csd_part_config); + return mci_switch(mci, + EXT_CSD_PARTITION_CONFIG, mci->ext_csd_part_config); } static const char *mci_boot_names[] = { diff --git a/include/mci.h b/include/mci.h index 1f65333..072008e 100644 --- a/include/mci.h +++ b/include/mci.h @@ -478,8 +478,7 @@ void mci_of_parse_node(struct mci_host *host, struct device_node *np); int mci_detect_card(struct mci_host *); int mci_send_ext_csd(struct mci *mci, char *ext_csd); -int mci_switch(struct mci *mci, unsigned set, unsigned index, - unsigned value); +int mci_switch(struct mci *mci, unsigned index, unsigned value); static inline int mmc_host_is_spi(struct mci_host *host) {