]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
arm: rmobile: alt: Add support MMC and MMC command
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Wed, 3 Dec 2014 06:30:30 +0000 (15:30 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Wed, 10 Dec 2014 05:32:22 +0000 (14:32 +0900)
Alt board has been connected to eMMC of 8GB to MMC port.
This enables MMC port and MMC command.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
board/renesas/alt/alt.c
include/configs/alt.h

index c794d43ee4fc587d11cb1eda497ffb3afbdf448d..8cc17e9581a6ec07a427b2431d4e11defafc44e3 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
+#include <asm/arch/mmc.h>
 #include <netdev.h>
 #include <miiphy.h>
 #include <i2c.h>
@@ -42,6 +43,7 @@ void s_init(void)
 #define SCIF2_MSTP719  (1 << 19)
 #define ETHER_MSTP813  (1 << 13)
 #define IIC1_MSTP323   (1 << 23)
+#define MMC0_MSTP315   (1 << 15)
 
 int board_early_init_f(void)
 {
@@ -57,6 +59,10 @@ int board_early_init_f(void)
        /* IIC1 / sh-i2c ch1 */
        mstp_clrbits_le32(MSTPSR3, SMSTPCR3, IIC1_MSTP323);
 
+#ifdef CONFIG_SH_MMCIF
+       /* MMC */
+       mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC0_MSTP315);
+#endif
        return 0;
 }
 
@@ -120,6 +126,19 @@ int board_eth_init(bd_t *bis)
 #endif
 }
 
+int board_mmc_init(bd_t *bis)
+{
+       int ret = 0;
+
+#ifdef CONFIG_SH_MMCIF
+       gpio_request(GPIO_GP_4_31, NULL);
+       gpio_set_value(GPIO_GP_4_31, 1);
+
+       ret = mmcif_mmc_init();
+#endif
+       return ret;
+}
+
 int dram_init(void)
 {
        gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
index d11692020ccda3e9d5e92e15159b5489129a9345..58eac3135870ddec0a7ffb71978106ac595878da 100644 (file)
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
+/* MMCIF */
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_CMD_MMC
+
+#define CONFIG_SH_MMCIF
+#define CONFIG_SH_MMCIF_ADDR           0xee200000
+#define CONFIG_SH_MMCIF_CLK            48000000
+
 /* Module stop status bits */
 /* INTC-RT */
 #define CONFIG_SMSTP0_ENA      0x00400000