Skip to content
Snippets Groups Projects

Add support for the ISIS-OBC and MIST OBCSW

Closed Erik Flink requested to merge isis-obc into master
2 unresolved threads
@@ -58,7 +58,11 @@ struct atmel_mci_priv {
/* Read Atmel MCI IP version */
static unsigned int atmel_mci_get_version(struct atmel_mci *mci)
{
#ifndef CONFIG_AT91SAM9G20ISIS
return readl(&mci->version) & 0x00000fff;
#else
return 0;
#endif
}
/*
@@ -186,9 +190,13 @@ static u32 mci_encode_cmd(
*error_flags |= MMCI_BIT(RCRCE);
if (cmd->resp_type & MMC_RSP_136)
cmdr |= MMCI_BF(RSPTYP, 2);
else if (cmd->resp_type & MMC_RSP_BUSY)
else if (cmd->resp_type & MMC_RSP_BUSY) {
#ifndef CONFIG_AT91SAM9G20ISIS
cmdr |= MMCI_BF(RSPTYP, 3);
else if (cmd->resp_type & MMC_RSP_PRESENT)
#else
cmdr |= MMCI_BF(RSPTYP, 1);
#endif
} else if (cmd->resp_type & MMC_RSP_PRESENT)
cmdr |= MMCI_BF(RSPTYP, 1);
return cmdr | MMCI_BF(CMDNB, cmd->cmdidx);
@@ -297,8 +305,9 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
cmd->response[1] = readl(&mci->rspr1);
cmd->response[2] = readl(&mci->rspr2);
cmd->response[3] = readl(&mci->rspr3);
} else
} else if (cmd->resp_type & MMC_RSP_PRESENT) {
cmd->response[0] = readl(&mci->rspr);
}
/* transfer all of the blocks */
if (data) {
@@ -433,7 +442,6 @@ static int mci_init(struct mmc *mmc)
struct atmel_mci_priv *priv = mmc->priv;
atmel_mci_t *mci = priv->mci;
#endif
/* Initialize controller */
writel(MMCI_BIT(SWRST), &mci->cr); /* soft reset */
writel(MMCI_BIT(PWSDIS), &mci->cr); /* disable power save */
Loading