diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-10-19 15:07:40 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-10-19 15:07:40 +0200 |
commit | 7f04124c149fa4d8e8f657907c581f10987003e2 (patch) | |
tree | d4f9c129f5ef7f4f28231766f449a12fb755b7e6 /drivers/mci | |
parent | 71d764a4b05d3ca4ec8d14f71c9149fd0023424e (diff) | |
parent | 25c3fb28d8017595942115d4dbffc16d96f43930 (diff) | |
download | barebox-7f04124c149fa4d8e8f657907c581f10987003e2.tar.gz barebox-7f04124c149fa4d8e8f657907c581f10987003e2.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/mci')
-rw-r--r-- | drivers/mci/mci-core.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 07911d43d7..208b7666d6 100644 --- a/drivers/mci/mci-core.c +++ b/drivers/mci/mci-core.c @@ -1682,10 +1682,13 @@ static int mci_card_probe(struct mci *mci) } /* Check if this card can handle the "SD Card Physical Layer Specification 2.0" */ - rc = sd_send_if_cond(mci); - rc = sd_send_op_cond(mci); - if (rc && rc == -ETIMEDOUT) { - /* If the command timed out, we check for an MMC card */ + if (!host->no_sd) { + rc = sd_send_if_cond(mci); + rc = sd_send_op_cond(mci); + } + if (host->no_sd || rc == -ETIMEDOUT) { + /* If SD card initialization was skipped or if it timed out, + * we check for an MMC card */ dev_dbg(&mci->dev, "Card seems to be a MultiMediaCard\n"); rc = mmc_send_op_cond(mci); } @@ -1904,6 +1907,7 @@ void mci_of_parse_node(struct mci_host *host, } host->non_removable = of_property_read_bool(np, "non-removable"); + host->no_sd = of_property_read_bool(np, "no-sd"); } void mci_of_parse(struct mci_host *host) |