rk3026: rk3028a_tb: emmc support

This commit is contained in:
kfx
2013-08-05 16:10:21 +08:00
parent e97088419a
commit a98d749559
2 changed files with 22 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_ARCH_RK3026=y
CONFIG_DDR_FREQ=y
# CONFIG_DDR_TEST is not set
CONFIG_RK_CLOCK_PROC=y
CONFIG_MACH_RK3028A_TB=y
CONFIG_ARM_ERRATA_761320=y
CONFIG_ARM_ERRATA_775420=y
@@ -401,7 +402,8 @@ CONFIG_MMC=y
CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MMC_EMBEDDED_SDIO=y
CONFIG_MMC_PARANOID_SD_INIT=y
CONFIG_MMC_BLOCK_MINORS=12
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_EMMC_RK=y
CONFIG_SDMMC_RK29=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

View File

@@ -1240,16 +1240,33 @@ static irqreturn_t rk_mmc_interrupt(int irq, void *dev_id)
#define EMMC_FLAHS_SEL (1<<11)
static int internal_storage_is_emmc(void)
{
#ifdef CONFIG_ARCH_RK3026
if((iomux_is_set(EMMC_CLKOUT) == 1) &&
(iomux_is_set(EMMC_CMD) == 1) &&
(iomux_is_set(EMMC_D0) == 1))
return 1;
#else
if(readl_relaxed(RK30_GRF_BASE + GRF_SOC_CON0) & EMMC_FLAHS_SEL)
return 1;
else
return 0;
#endif
return 0;
}
static void rk_mmc_set_iomux(void)
{
iomux_set(EMMC_CLKOUT);
iomux_set(EMMC_CMD);
iomux_set(EMMC_RSTNOUT);
#ifdef CONFIG_ARCH_RK3026
iomux_set(EMMC_PWREN);
iomux_set(EMMC_D0);
iomux_set(EMMC_D1);
iomux_set(EMMC_D2);
iomux_set(EMMC_D3);
iomux_set(EMMC_D4);
iomux_set(EMMC_D5);
iomux_set(EMMC_D6);
iomux_set(EMMC_D7);
#endif
}
static int rk_mmc_probe(struct platform_device *pdev)