aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-03-21 05:46:39 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-05-20 00:06:56 -0400
commit5080a08d0f8a4b2ba3a15e5ddc5ece84a444cad8 (patch)
treee1e6c873a8cd61f469b8b9146bada65bc6ca7b6a
parent3faf80dfa342e98b5780e0b78b7a670c7b61a9be (diff)
mmc: mmci: Enforce max frequency configuration through DT
Remove the option to provide a maximum frequency as platform data, enforce it through DT. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/mmci.c5
-rw-r--r--include/linux/amba/mmci.h4
2 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 9c60325f1a30..758efea184c9 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1500,13 +1500,10 @@ static int mmci_probe(struct amba_device *dev,
1500 * If no maximum operating frequency is supplied, fall back to use 1500 * If no maximum operating frequency is supplied, fall back to use
1501 * the module parameter, which has a (low) default value in case it 1501 * the module parameter, which has a (low) default value in case it
1502 * is not specified. Either value must not exceed the clock rate into 1502 * is not specified. Either value must not exceed the clock rate into
1503 * the block, of course. Also note that DT takes precedence over 1503 * the block, of course.
1504 * platform data.
1505 */ 1504 */
1506 if (mmc->f_max) 1505 if (mmc->f_max)
1507 mmc->f_max = min(host->mclk, mmc->f_max); 1506 mmc->f_max = min(host->mclk, mmc->f_max);
1508 else if (plat->f_max)
1509 mmc->f_max = min(host->mclk, plat->f_max);
1510 else 1507 else
1511 mmc->f_max = min(host->mclk, fmax); 1508 mmc->f_max = min(host->mclk, fmax);
1512 dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max); 1509 dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h
index b992fc931295..3f95d32d5277 100644
--- a/include/linux/amba/mmci.h
+++ b/include/linux/amba/mmci.h
@@ -12,9 +12,6 @@ struct dma_chan;
12/** 12/**
13 * struct mmci_platform_data - platform configuration for the MMCI 13 * struct mmci_platform_data - platform configuration for the MMCI
14 * (also known as PL180) block. 14 * (also known as PL180) block.
15 * @f_max: the maximum operational frequency for this host in this
16 * platform configuration. When this is specified it takes precedence
17 * over the module parameter for the same frequency.
18 * @ocr_mask: available voltages on the 4 pins from the block, this 15 * @ocr_mask: available voltages on the 4 pins from the block, this
19 * is ignored if a regulator is used, see the MMC_VDD_* masks in 16 * is ignored if a regulator is used, see the MMC_VDD_* masks in
20 * mmc/host.h 17 * mmc/host.h
@@ -42,7 +39,6 @@ struct dma_chan;
42 * bidirectional channel 39 * bidirectional channel
43 */ 40 */
44struct mmci_platform_data { 41struct mmci_platform_data {
45 unsigned int f_max;
46 unsigned int ocr_mask; 42 unsigned int ocr_mask;
47 int (*ios_handler)(struct device *, struct mmc_ios *); 43 int (*ios_handler)(struct device *, struct mmc_ios *);
48 unsigned int (*status)(struct device *); 44 unsigned int (*status)(struct device *);