diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index fd482d06de72..da283ed3d0f1 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2072,7 +2072,7 @@ int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen) } EXPORT_SYMBOL(mmc_set_blocklen); -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC static void mmc_hw_reset_for_init(struct mmc_host *host) { mmc_pwrseq_reset(host); @@ -2154,7 +2154,7 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq) * Some eMMCs (with VCCQ always on) may not be reset after power up, so * do a hardware reset if possible. */ -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC mmc_hw_reset_for_init(host); #endif diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 17ece18fadf3..83b08762eddc 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -67,7 +67,7 @@ static const unsigned int taac_mant[] = { /* * Given the decoded CSD structure, decode the raw CID to our CID structure. */ -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC static int mmc_decode_cid(struct mmc_card *card) { u32 *resp = card->raw_cid; @@ -666,7 +666,7 @@ out: return err; } -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC static void *mmc_tb_map_ecsd(phys_addr_t start, size_t len) { int i; @@ -696,7 +696,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) { u8 *ext_csd; int err; -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC void *ecsd; bool valid_ecsd = false; bool valid_reserved = false; @@ -707,7 +707,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) if (!mmc_can_ext_csd(card)) return 0; -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC mem = of_parse_phandle(dev->of_node, "memory-region-ecsd", 0); if (mem) { err = of_address_to_resource(mem, 0, ®); @@ -758,11 +758,11 @@ get_ecsd: return err; } -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC decode: #endif err = mmc_decode_ext_csd(card, ext_csd); -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC if (!valid_ecsd) kfree(ext_csd); else @@ -777,7 +777,7 @@ decode: return err; } -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width) { u8 *bw_ext_csd; @@ -1120,7 +1120,7 @@ int mmc_select_bus_width(struct mmc_card *card) * compare ext_csd previously read in 1 bit mode * against ext_csd at new bus width */ -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST)) err = mmc_compare_ext_csds(card, bus_width); else @@ -1680,7 +1680,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, * respond. * mmc_go_idle is needed for eMMC that are asleep */ -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC mmc_go_idle(host); #endif @@ -1727,7 +1727,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, card->ocr = ocr; card->type = MMC_TYPE_MMC; card->rca = 1; -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC memcpy(card->raw_cid, cid, sizeof(card->raw_cid)); #endif } @@ -1760,7 +1760,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, err = mmc_decode_csd(card); if (err) goto free_card; -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC err = mmc_decode_cid(card); if (err) goto free_card; @@ -1907,7 +1907,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, /* * Enable HPI feature (if supported) */ -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC if (card->ext_csd.hpi) { err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HPI_MGMT, 1, diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index dd5954acbfbe..7128b416251a 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -145,7 +145,7 @@ int mmc_go_idle(struct mmc_host *host) * rules that must accommodate non-MMC slaves which this layer * won't even know about. */ -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC if (!mmc_host_is_spi(host)) { mmc_set_chip_select(host, MMC_CS_HIGH); mmc_delay(1); @@ -157,7 +157,7 @@ int mmc_go_idle(struct mmc_host *host) err = mmc_wait_for_cmd(host, &cmd, 0); -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC mmc_delay(1); if (!mmc_host_is_spi(host)) { @@ -184,7 +184,7 @@ int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr) if (err) break; -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC /* if we're just probing, do a single pass */ if (ocr == 0) break; @@ -219,7 +219,7 @@ int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr) */ if (!ocr && !mmc_host_is_spi(host)) cmd.arg = cmd.resp[0] | BIT(30); -#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifndef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC mmc_delay(1); #else udelay(1); diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index df385fe6dd13..a2114fb47edd 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -239,7 +239,7 @@ static void dw_mci_wait_while_busy(struct dw_mci *host, u32 cmd_flags) * ...also allow sending for SDMMC_CMD_VOLT_SWITCH where busy is * expected. */ -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC if (host->slot->mmc->caps2 & MMC_CAP2_NO_SD && host->slot->mmc->caps2 & MMC_CAP2_NO_SDIO) delay = 0; @@ -3317,7 +3317,7 @@ int dw_mci_probe(struct dw_mci *host) } } -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC if (device_property_read_bool(host->dev, "no-sd") && device_property_read_bool(host->dev, "no-sdio")) { if (readl_poll_timeout(host->regs + SDMMC_STATUS,