From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A78CD20945524 for ; Thu, 8 Jun 2017 01:11:33 -0700 (PDT) Received: by mail-pf0-x232.google.com with SMTP id 83so14607646pfr.0 for ; Thu, 08 Jun 2017 01:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=bItVsRRICx4stiTdWSIsBwtndXKY5GhiLMl1lVEyaUI=; b=NUlPZ8rCSfcy7DNIGnUrG/u/K42sxPMn6QiFFqBcX0Sq9FllRGzY+I0C964q3vT8Gi XETAv7+r92CqJyO8gimvipsF+S61vhQbuwqPGLtYjQI9dlQxbjmxMDym44MAASjQEDru Gej7EtLj0nk/XXVFDX/3putQcL+5WntEkGM2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bItVsRRICx4stiTdWSIsBwtndXKY5GhiLMl1lVEyaUI=; b=m3dawJhg3cfkEk9mADbLpvEvmDAQLoxtopHHfis4QzHH9/URNyifoT6slYJCvbVMmD XqLGRI07Hdri/oiCEI7igwi8xelTk0LX0B7Uj0esiJLeSu2Wzin5Br+iTzL6ua3pfg5e b/UFVFIEWjCcV5UoWPCiwPNNFIKTMhRfZ8KeSQLFMLDUk1h9+0YicmZX+/HXT99bsqwB 4BvMgFFyOD62MPAOGEjoW6ApOw8LO9bbY84RqjYcw7+waavU49KvPO5QkL1aehclSCGe CCdGUgSMbCMvuklske7vv/etOOXf0EhDQwA0GCjqMIYAgMTHZSs8+3j1xcmwlhYroXCK /TNQ== X-Gm-Message-State: AODbwcDt2wY112KRcIVH/9nDNHnmHZq81KK9MjaTPDiiUvDWRvhN0XDH zMMP21eQqlyShp05 X-Received: by 10.98.93.7 with SMTP id r7mr23895471pfb.10.1496909562293; Thu, 08 Jun 2017 01:12:42 -0700 (PDT) Received: from localhost.localdomain (60-249-34-38.HINET-IP.hinet.net. [60.249.34.38]) by smtp.gmail.com with ESMTPSA id m81sm8003048pfj.121.2017.06.08.01.12.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Jun 2017 01:12:41 -0700 (PDT) From: Jun Nie To: olivier.martin@arm.com, haojian.zhuang@linaro.org, edk2-devel@lists.01.org Cc: shawn.guo@linaro.org, jason.liu@linaro.org, Jun Nie Date: Thu, 8 Jun 2017 16:12:27 +0800 Message-Id: <1496909547-16085-1-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [PATCH] EmbeddedPkg/MmcDxe: Add non-DDR timing mode support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 08:11:33 -0000 Only DDR mode is support for 8bit mode currently. Add non-DDR case when configuring ECSD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie --- EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c index 574a77e..5c0d7e7 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c @@ -286,7 +286,10 @@ InitializeEmmcDevice ( } Status = Host->SetIos (Host, BusClockFreq, 8, TimingMode[Idx]); if (!EFI_ERROR (Status)) { - Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_DDR_8BIT); + if (Idx < 2) + Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_DDR_8BIT); + else + Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_8BIT); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "InitializeEmmcDevice(): Failed to set EXTCSD bus width, Status:%r\n", Status)); } -- 1.9.1