rk3026: rk3028a_tb: emmc support
authorkfx <kfx@rock-chips.com>
Mon, 5 Aug 2013 08:10:21 +0000 (16:10 +0800)
committerkfx <kfx@rock-chips.com>
Mon, 5 Aug 2013 08:10:21 +0000 (16:10 +0800)
arch/arm/configs/rk3028a_tb_defconfig
drivers/mmc/host/rkemmc.c

index b1a437bafa7226c419519d49b0df25efc183fa09..eb63dd2f68872e85aafa8cf96969bcc83634ba55 100644 (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
index 6d195124c10fedfe68122e2bde1b0a7149428591..e53c821864cfcd0ce176e1f776c47d0f25cf47f3 100644 (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)