|
@@ -239,24 +239,6 @@ static int mmci_card_busy(struct mmc_host *mmc)
|
|
return busy;
|
|
return busy;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * Validate mmc prerequisites
|
|
|
|
- */
|
|
|
|
-static int mmci_validate_data(struct mmci_host *host,
|
|
|
|
- struct mmc_data *data)
|
|
|
|
-{
|
|
|
|
- if (!data)
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
- if (!is_power_of_2(data->blksz)) {
|
|
|
|
- dev_err(mmc_dev(host->mmc),
|
|
|
|
- "unsupported block size (%d bytes)\n", data->blksz);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void mmci_reg_delay(struct mmci_host *host)
|
|
static void mmci_reg_delay(struct mmci_host *host)
|
|
{
|
|
{
|
|
/*
|
|
/*
|
|
@@ -392,6 +374,27 @@ void mmci_dma_setup(struct mmci_host *host)
|
|
host->use_dma = true;
|
|
host->use_dma = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Validate mmc prerequisites
|
|
|
|
+ */
|
|
|
|
+static int mmci_validate_data(struct mmci_host *host,
|
|
|
|
+ struct mmc_data *data)
|
|
|
|
+{
|
|
|
|
+ if (!data)
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
+ if (!is_power_of_2(data->blksz)) {
|
|
|
|
+ dev_err(mmc_dev(host->mmc),
|
|
|
|
+ "unsupported block size (%d bytes)\n", data->blksz);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (host->ops && host->ops->validate_data)
|
|
|
|
+ return host->ops->validate_data(host, data);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
int mmci_prep_data(struct mmci_host *host, struct mmc_data *data, bool next)
|
|
int mmci_prep_data(struct mmci_host *host, struct mmc_data *data, bool next)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|