From da085f801330ee02b1e6ad8e44f158ef1a1931fe Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Fri, 25 Jan 2019 12:07:04 +0900 Subject: [PATCH] ODROID-COMMON:Removed HS400 Change-Id: Ic2082a938ff2966f74717796e3d52a4546fef0e6 --- .../boot/dts/amlogic/mesong12_odroid_common.dtsi | 12 +++++------- drivers/mmc/core/mmc.c | 14 +++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/mesong12_odroid_common.dtsi b/arch/arm64/boot/dts/amlogic/mesong12_odroid_common.dtsi index 96060580e698..49771dd15a4c 100644 --- a/arch/arm64/boot/dts/amlogic/mesong12_odroid_common.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesong12_odroid_common.dtsi @@ -304,6 +304,8 @@ &sd_emmc_c { status = "okay"; + mmc-ddr-1_8v; + mmc-hs200-1_8v; emmc { caps = "MMC_CAP_8_BIT_DATA", "MMC_CAP_MMC_HIGHSPEED", @@ -314,14 +316,10 @@ "MMC_CAP_ERASE", "MMC_CAP_CMD23"; caps2 = "MMC_CAP2_HS200_1_8V_SDR", - "MMC_CAP2_BROKEN_VOLTAGE", - "MMC_CAP2_HS400_ES", - "MMC_CAP2_HS400_1_8V"; + "MMC_CAP2_BROKEN_VOLTAGE"; f_min = <400000>; - f_max = <120000000>; - card_type = <1>; - gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>; - hw_reset = <&gpio BOOT_12 GPIO_ACTIVE_HIGH>; + f_max = <200000000>; + hw_reset = <&gpio BOOT_12 GPIO_ACTIVE_HIGH>; }; }; diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 691db1bcdb1c..addc52358d8d 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1175,18 +1175,18 @@ static int mmc_select_hs400(struct mmc_card *card) /* Switch card to HS400 */ #ifdef CONFIG_AMLOGIC_MMC - if (card->ext_csd.raw_driver_strength & (1 << 1)) { - val = - (0x1 << EXT_CSD_DRV_STR_SHIFT) - | EXT_CSD_TIMING_HS400; - pr_info("%s: support driver strength type 1\n", - mmc_hostname(host)); - } else if (card->ext_csd.raw_driver_strength & (1 << 4)) { + if (card->ext_csd.raw_driver_strength & (1 << 4)) { val = (0x4 << EXT_CSD_DRV_STR_SHIFT) | EXT_CSD_TIMING_HS400; pr_info("%s: support driver strength type 4\n", mmc_hostname(host)); + } else if (card->ext_csd.raw_driver_strength & (1 << 1)) { + val = + (0x1 << EXT_CSD_DRV_STR_SHIFT) + | EXT_CSD_TIMING_HS400; + pr_info("%s: support driver strength type 1\n", + mmc_hostname(host)); } else { val = EXT_CSD_TIMING_HS400; pr_info("%s: no support driver strength type 1 and 4\n",