summaryrefslogtreecommitdiffstats
path: root/drivers/mci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mci')
-rw-r--r--drivers/mci/imx-esdhc.c28
-rw-r--r--drivers/mci/imx-esdhc.h4
-rw-r--r--drivers/mci/mci-core.c4
-rw-r--r--drivers/mci/mci_spi.c13
-rw-r--r--drivers/mci/mxs.c4
-rw-r--r--drivers/mci/omap_hsmmc.c6
-rw-r--r--drivers/mci/s3c.c4
7 files changed, 24 insertions, 39 deletions
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 585cab9e54..7c12eba5da 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -19,10 +19,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*/
#include <config.h>
#include <common.h>
@@ -335,7 +331,7 @@ esdhc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
esdhc_write32(&regs->irqstat, -1);
/* Wait for the bus to be idle */
- ret = wait_on_timeout(100 * MSECOND,
+ ret = wait_on_timeout(SECOND,
!(esdhc_read32(&regs->prsstat) &
(PRSSTAT_CICHB | PRSSTAT_CIDHB)));
if (ret) {
@@ -567,16 +563,28 @@ static int fsl_esdhc_probe(struct device_d *dev)
return 0;
}
+static __maybe_unused struct of_device_id fsl_esdhc_compatible[] = {
+ {
+ .compatible = "fsl,imx51-esdhc",
+ }, {
+ .compatible = "fsl,imx53-esdhc",
+ }, {
+ .compatible = "fsl,imx6q-usdhc",
+ }, {
+ /* sentinel */
+ }
+};
+
static struct driver_d fsl_esdhc_driver = {
- .name = "imx-esdhc",
- .probe = fsl_esdhc_probe,
+ .name = "imx-esdhc",
+ .probe = fsl_esdhc_probe,
+ .of_compatible = DRV_OF_COMPAT(fsl_esdhc_compatible),
};
static int fsl_esdhc_init_driver(void)
{
- register_driver(&fsl_esdhc_driver);
- return 0;
+ register_driver(&fsl_esdhc_driver);
+ return 0;
}
device_initcall(fsl_esdhc_init_driver);
-
diff --git a/drivers/mci/imx-esdhc.h b/drivers/mci/imx-esdhc.h
index 7d5ed85dfd..2be63a5ba0 100644
--- a/drivers/mci/imx-esdhc.h
+++ b/drivers/mci/imx-esdhc.h
@@ -14,10 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*
*-------------------------------------------------------------------
*
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 85f5dbc6b6..9336d36b30 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -21,10 +21,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*/
/* #define DEBUG */
diff --git a/drivers/mci/mci_spi.c b/drivers/mci/mci_spi.c
index a659ebb274..5894104231 100644
--- a/drivers/mci/mci_spi.c
+++ b/drivers/mci/mci_spi.c
@@ -23,9 +23,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
@@ -181,7 +178,7 @@ static uint mmc_spi_readdata(struct mmc_spi_host *host, void *xbuf,
mmc_spi_readbytes(host, bsize, buf);
mmc_spi_readbytes(host, 2, &crc);
#ifdef CONFIG_MMC_SPI_CRC_ON
- if (swab16(cyg_crc16(buf, bsize)) != crc) {
+ if (be16_to_cpu(cyg_crc16(buf, bsize)) != crc) {
dev_dbg(host->dev, "%s: CRC error\n", __func__);
r1 = R1_SPI_COM_CRC;
break;
@@ -212,7 +209,7 @@ static uint mmc_spi_writedata(struct mmc_spi_host *host, const void *xbuf,
while (bcnt--) {
#ifdef CONFIG_MMC_SPI_CRC_ON
- crc = swab16(cyg_crc16((u8 *)buf, bsize));
+ crc = be16_to_cpu(cyg_crc16((u8 *)buf, bsize));
#endif
mmc_spi_writebytes(host, 2, tok);
mmc_spi_writebytes(host, bsize, (void *)buf);
@@ -291,7 +288,7 @@ static int mmc_spi_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci
} else if (cmd->resp_type == MMC_RSP_R2) {
r1 = mmc_spi_readdata(host, cmd->response, 1, 16);
for (i = 0; i < 4; i++)
- cmd->response[i] = swab32(cmd->response[i]);
+ cmd->response[i] = be32_to_cpu(cmd->response[i]);
dev_dbg(host->dev, "MMC_RSP_R2 -> %x %x %x %x\n", cmd->response[0], cmd->response[1],
cmd->response[2], cmd->response[3]);
} else if (!data) {
@@ -299,7 +296,7 @@ static int mmc_spi_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci
case SD_CMD_SEND_IF_COND:
case MMC_CMD_SPI_READ_OCR:
mmc_spi_readbytes(host, 4, cmd->response);
- cmd->response[0] = swab32(cmd->response[0]);
+ cmd->response[0] = be32_to_cpu(cmd->response[0]);
break;
}
} else {
@@ -423,7 +420,7 @@ static struct driver_d spi_mci_driver = {
static int spi_mci_init_driver(void)
{
- register_driver(&spi_mci_driver);
+ spi_register_driver(&spi_mci_driver);
return 0;
}
diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c
index eaef41b120..b311682ea0 100644
--- a/drivers/mci/mxs.c
+++ b/drivers/mci/mxs.c
@@ -21,10 +21,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*/
/**
diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index e0b245b51c..eba1a6aedf 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -16,10 +16,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*/
/* #define DEBUG */
#include <config.h>
@@ -238,7 +234,7 @@ static int mmc_init_setup(struct mci_host *mci, struct device_d *dev)
start = get_time_ns();
while ((readl(&mmc_base->sysstatus) & RESETDONE) == 0) {
if (is_timeout(start, SECOND)) {
- dev_dbg(hsmmc->dev, "timedout waiting for cc2!\n");
+ dev_dbg(hsmmc->dev, "timeout waiting for reset done\n");
return -ETIMEDOUT;
}
}
diff --git a/drivers/mci/s3c.c b/drivers/mci/s3c.c
index c905c07527..d014400ef6 100644
--- a/drivers/mci/s3c.c
+++ b/drivers/mci/s3c.c
@@ -21,10 +21,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*/
/**