ODROIDC:sdhc: Fix to dedicate SDHC as mmcblk0 device always

Change-Id: Ib6ca8501ac7527c15d11721dab42e2e5b341169a

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
ckkim
2014-11-11 18:22:49 +09:00
committed by Dongjin Kim
parent f6299a6ac8
commit bf3dc46b6d
3 changed files with 18 additions and 3 deletions

View File

@@ -6,8 +6,6 @@ ifeq ($(CONFIG_MMC_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif
obj-$(CONFIG_MMC_AML) += aml_sdio.o amlsd.o amlsd_of.o
ifeq ($(CONFIG_ARCH_MESON8),y)
obj-$(CONFIG_MMC_AML) += aml_sdhc_m8.o
endif
@@ -20,3 +18,4 @@ endif
# obj-$(CONFIG_MMC_AML) += aml_sdhc.o
# endif
obj-$(CONFIG_MMC_AML) += aml_sdio.o amlsd.o amlsd_of.o

2
drivers/amlogic/mmc/aml_sdio.c Executable file → Normal file
View File

@@ -531,8 +531,10 @@ timeout_handle:
host->mrq->cmd->error = -ETIMEDOUT;
spin_unlock_irqrestore(&host->mrq_lock, flags);
#if defined(CONFIG_MMC_AML_DEBUG)
sdio_err("time_start_cnt:%ld\n", time_start_cnt);
aml_sdio_print_err(host, "Timeout error");
#endif
// if (pdata->port == MESON_SDIO_PORT_A) {
// sdio_err("power_on_pin=%d\n",
// amlogic_get_value(185, "sdio_wifi")); // G24-113, G33-185

View File

@@ -2191,13 +2191,27 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
* partitions, devidx will not coincide with a per-physical card
* index anymore so we keep track of a name index.
*/
#if defined(CONFIG_MACH_MESON8B_ODROIDC)
if (strncmp(dev_name(mmc_dev(card->host)), "aml_sdhc.0", 8) == 0) {
md->name_idx = 0;
__set_bit(md->name_idx, name_use);
} else if (strncmp(dev_name(mmc_dev(card->host)), "aml_sdio.0", 8) == 0) {
if (!subname) {
md->name_idx = find_first_zero_bit(name_use, max_devices);
__set_bit(md->name_idx, name_use);
} else {
md->name_idx = ((struct mmc_blk_data *)
dev_to_disk(parent)->private_data)->name_idx;
}
}
#else
if (!subname) {
md->name_idx = find_first_zero_bit(name_use, max_devices);
__set_bit(md->name_idx, name_use);
} else
md->name_idx = ((struct mmc_blk_data *)
dev_to_disk(parent)->private_data)->name_idx;
#endif
md->area_type = area_type;
/*