]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mmc: remove the MMC_MODE_HC flag
authorRob Herring <robh@kernel.org>
Mon, 23 Mar 2015 22:56:59 +0000 (17:56 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:37:10 +0000 (22:37 +0200)
High capacity support is not a host capability, but a device capability
that is queried via the OCR. The flag in the operating conditions
request argument can just be set unconditionally. This matches the Linux
implementation.

[panto] Hand merged and renumbering MMC_MODE_DDR_52MHz.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
14 files changed:
drivers/mmc/dw_mmc.c
drivers/mmc/fsl_esdhc.c
drivers/mmc/kona_sdhci.c
drivers/mmc/mmc.c
drivers/mmc/mvebu_mmc.c
drivers/mmc/mxsmmc.c
drivers/mmc/omap_hsmmc.c
drivers/mmc/s3c_sdi.c
drivers/mmc/s5p_sdhci.c
drivers/mmc/sh_mmcif.c
drivers/mmc/sunxi_mmc.c
drivers/mmc/tegra_mmc.c
drivers/mmc/zynq_sdhci.c
include/mmc.h

index 76fa0b0534d1b5b135317ec2841b5bba7d472378..53a8aca84b615e9a8e5e185ac4ad28f6fc00a841 100644 (file)
@@ -388,7 +388,7 @@ int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk)
                host->cfg.host_caps |= MMC_MODE_4BIT;
                host->cfg.host_caps &= ~MMC_MODE_8BIT;
        }
-       host->cfg.host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_HC;
+       host->cfg.host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
 
        host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 
index 61465651400810b6bceb23f4af4939ee34bccf87..ce57bf4c92f608515e39640aa439ab08f9061b06 100644 (file)
@@ -720,7 +720,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
                return -EINVAL;
        }
 
-       cfg->cfg.host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT | MMC_MODE_HC;
+       cfg->cfg.host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT;
 #ifdef CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
        cfg->cfg.host_caps |= MMC_MODE_DDR_52MHz;
 #endif
index f804f4c0dbfc1f9af79b9289bc88790ef8143cac..3653d00b1bd70b02877668d73e2084d825cad7be 100644 (file)
@@ -121,7 +121,6 @@ int kona_sdhci_init(int dev_index, u32 min_clk, u32 quirks)
        host->name = "kona-sdhci";
        host->ioaddr = reg_base;
        host->quirks = quirks;
-       host->host_caps = MMC_MODE_HC;
 
        if (init_kona_mmc_core(host)) {
                free(host);
index 1099908a72d25b2712eaf1fdc5d69d459feb72cd..bf26f2a4cb95c5e06b9de327aedf09b44231433e 100644 (file)
@@ -364,15 +364,12 @@ static int mmc_send_op_cond_iter(struct mmc *mmc, int use_arg)
        cmd.cmdidx = MMC_CMD_SEND_OP_COND;
        cmd.resp_type = MMC_RSP_R3;
        cmd.cmdarg = 0;
-       if (use_arg && !mmc_host_is_spi(mmc)) {
-               cmd.cmdarg =
+       if (use_arg && !mmc_host_is_spi(mmc))
+               cmd.cmdarg = OCR_HCS |
                        (mmc->cfg->voltages &
                        (mmc->ocr & OCR_VOLTAGE_MASK)) |
                        (mmc->ocr & OCR_ACCESS_MODE);
 
-               if (mmc->cfg->host_caps & MMC_MODE_HC)
-                       cmd.cmdarg |= OCR_HCS;
-       }
        err = mmc_send_cmd(mmc, &cmd, NULL);
        if (err)
                return err;
index 8ca09042d8d9280c94b9f5620b8e8a10ae8862a8..056aef5bef07c54e8ac8759dcaf17869a0ebc7ad 100644 (file)
@@ -418,7 +418,7 @@ static struct mmc_config mvebu_mmc_cfg = {
        .f_min          = MVEBU_MMC_BASE_FAST_CLOCK / MVEBU_MMC_BASE_DIV_MAX,
        .f_max          = MVEBU_MMC_CLOCKRATE_MAX,
        .voltages       = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .host_caps      = MMC_MODE_4BIT | MMC_MODE_HS | MMC_MODE_HC |
+       .host_caps      = MMC_MODE_4BIT | MMC_MODE_HS |
                          MMC_MODE_HS_52MHz,
        .part_type      = PART_TYPE_DOS,
        .b_max          = CONFIG_SYS_MMC_MAX_BLK_COUNT,
index d9d855b87523da5c294fdf0aa837de4b59b09d24..c5002ae778ea74ef49bae64eb30f6b9fe6cc8007 100644 (file)
@@ -407,8 +407,7 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int))
        priv->cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 
        priv->cfg.host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT |
-                        MMC_MODE_HS_52MHz | MMC_MODE_HS |
-                        MMC_MODE_HC;
+                        MMC_MODE_HS_52MHz | MMC_MODE_HS;
 
        /*
         * SSPCLK = 480 * 18 / 29 / 1 = 297.731 MHz
index 813b90946cacd4a3ad47c9c457cb1958a5696235..cf64a84d65b5c46364493e27a506a7d9d7ed3e4c 100644 (file)
@@ -668,8 +668,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
        if (priv_data == NULL)
                return -ENOMEM;
 
-       host_caps_val = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS |
-                            MMC_MODE_HC;
+       host_caps_val = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS;
 
        switch (dev_index) {
        case 0:
index 1b5b70512d1446b2c6af340de5655eb5492d685d..02d1138a5fd1a92537c2dcbe6ae7d62d9687be98 100644 (file)
@@ -298,7 +298,7 @@ int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
        cfg->name = "S3C MMC";
        cfg->ops = &s3cmmc_ops;
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
-       cfg->host_caps = MMC_MODE_4BIT | MMC_MODE_HC | MMC_MODE_HS;
+       cfg->host_caps = MMC_MODE_4BIT | MMC_MODE_HS;
        cfg->f_min = 400000;
        cfg->f_max = get_PCLK() / 2;
        cfg->b_max = 0x80;
index 0eec7310e4d7300a54f12379a1c1d4df3da78dc1..8e1968a4eadd74dd984939656305c32fe2805074 100644 (file)
@@ -76,7 +76,6 @@ static int s5p_sdhci_core_init(struct sdhci_host *host)
        host->set_control_reg = &s5p_sdhci_set_control_reg;
        host->set_clock = set_mmc_clk;
 
-       host->host_caps = MMC_MODE_HC;
        if (host->bus_width == 8)
                host->host_caps |= MMC_MODE_8BIT;
 
index 76ba93b81d4f42e4307aaeca3213e956eef58462..f92cf00cf4477f6cd275cffbc411efd9fe41efe9 100644 (file)
@@ -577,7 +577,7 @@ static struct mmc_config sh_mmcif_cfg = {
        .name           = DRIVER_NAME,
        .ops            = &sh_mmcif_ops,
        .host_caps      = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT |
-                         MMC_MODE_8BIT | MMC_MODE_HC,
+                         MMC_MODE_8BIT,
        .voltages       = MMC_VDD_32_33 | MMC_VDD_33_34,
        .b_max          = CONFIG_SYS_MMC_MAX_BLK_COUNT,
 };
index c4300f25fd7f0cf5544acd41d7fd0536a0d6d30a..bb0814706c56597d7131f434cc246b3d71e36672 100644 (file)
@@ -449,7 +449,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
        cfg->host_caps = MMC_MODE_4BIT;
-       cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_HC;
+       cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
        cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 
        cfg->f_min = 400000;
index 2cd8cf10aec557cc3a3579f3e292d9ee3f686e90..ca41b4de78fb22174e249ce6aa8d0b58e9d8a4ab 100644 (file)
@@ -559,7 +559,7 @@ static int do_mmc_init(int dev_index)
                host->cfg.host_caps |= MMC_MODE_8BIT;
        if (host->width >= 4)
                host->cfg.host_caps |= MMC_MODE_4BIT;
-       host->cfg.host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_HC;
+       host->cfg.host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
 
        /*
         * min freq is for card identification, and is the highest
index d4f3882cbd38d4151d6fd395cd034927b76e2941..971acbb6dffaf4716b70d742a526f760cd858ab3 100644 (file)
@@ -29,8 +29,6 @@ int zynq_sdhci_init(phys_addr_t regbase)
                       SDHCI_QUIRK_BROKEN_R1B;
        host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
 
-       host->host_caps = MMC_MODE_HC;
-
        add_sdhci(host, 52000000, 52000000 >> 9);
        return 0;
 }
index 611c5691015fcfd2c0bae0bb61deaf870cc93ae1..3eaebe5295124998b120d41ed48410afbef9aab3 100644 (file)
@@ -55,8 +55,7 @@
 #define MMC_MODE_4BIT          (1 << 2)
 #define MMC_MODE_8BIT          (1 << 3)
 #define MMC_MODE_SPI           (1 << 4)
-#define MMC_MODE_HC            (1 << 5)
-#define MMC_MODE_DDR_52MHz     (1 << 6)
+#define MMC_MODE_DDR_52MHz     (1 << 5)
 
 #define SD_DATA_4BIT   0x00040000