From patchwork Sun Nov 13 06:47:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 81947 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp503366qge; Sat, 12 Nov 2016 22:48:27 -0800 (PST) X-Received: by 10.99.39.132 with SMTP id n126mr59044864pgn.85.1479019707280; Sat, 12 Nov 2016 22:48:27 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id x27si17568970pff.112.2016.11.12.22.48.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Nov 2016 22:48:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8B7ED81DC8; Sat, 12 Nov 2016 22:48:22 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (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 EECCD81DCD for ; Sat, 12 Nov 2016 22:48:20 -0800 (PST) Received: by mail-pg0-x22a.google.com with SMTP id 3so37253491pgd.0 for ; Sat, 12 Nov 2016 22:48:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2aZHwvtgZ7RLcXtQB1dQ991xBFK+OUOw3Ec+/GYIeXA=; b=HUDxnOJeeh8Th3wFjXiJu/AqcJF4weqTgHNsM6vAh3Zevi5A4V8twAZcl9KntqTTQG corTGOvX0PXLCBKMrvqxl2viljx3nNB/BwLPGfgEZnUDpaJze+xfOry7yqafKNAeU2BG 1i0VPn+JoGjb1vweepONHMH2i2DwqZOvYfpKc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2aZHwvtgZ7RLcXtQB1dQ991xBFK+OUOw3Ec+/GYIeXA=; b=a7V9Flvnk7Hvw6GuPbVc7ZmSYE2b28Nwut8icZFQHWAwYFjC0VQVQQZR0rlyZBm6oo euIuulPX5sLSp8EDVNf9SKCKd37EfBeFcI3nDAhB2rCIWhWqmrXP2B7YOoNYBJA0tJT0 Mn1lywExpe0qaq7f0lp3jJf67Bhii7po5bWGABqQPB2VD/BJ4lTZXibWMV32k92xCmlC Kxym8If3KoCBD+a5jxvPvj1jyfmY5cSPB87i8geJko2qy/WwGAQ91+PsT1WJ63jwf22I VDaiqh0iiXV68oeTeCdkUY7smy5bAREG91yeNWtkHAnDBPwx9ItF88FK51TGz3ZM8t5x 5Cfg== X-Gm-Message-State: ABUngvehfKFjYWbetKHAD87ha/P9ZCam71eUQo9nBpv1kjmFS5MMCu12+u2ZfsEtlfbe+hKI X-Received: by 10.98.213.7 with SMTP id d7mr23520636pfg.3.1479019705048; Sat, 12 Nov 2016 22:48:25 -0800 (PST) Received: from localhost.localdomain ([45.56.159.75]) by smtp.gmail.com with ESMTPSA id a66sm26198365pfa.64.2016.11.12.22.48.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Nov 2016 22:48:24 -0800 (PST) From: Haojian Zhuang To: ryan.harkin@linaro.org, edk2-devel@lists.01.org, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Sun, 13 Nov 2016 14:47:54 +0800 Message-Id: <1479019678-12621-6-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479019678-12621-1-git-send-email-haojian.zhuang@linaro.org> References: <1479019678-12621-1-git-send-email-haojian.zhuang@linaro.org> Subject: [edk2] [PATCH v5 5/9] MmcDxe: add interface to change io width and speed X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haojian Zhuang MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" By default, MMC is initialized with 1-bit mode and less than 400KHz bus clock. It causes MMC working inefficiently. Add the interface to change the bus width and speed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang Tested-by: Ryan Harkin --- EmbeddedPkg/Include/Protocol/MmcHost.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/EmbeddedPkg/Include/Protocol/MmcHost.h b/EmbeddedPkg/Include/Protocol/MmcHost.h index 89f2e80..a242291 100644 --- a/EmbeddedPkg/Include/Protocol/MmcHost.h +++ b/EmbeddedPkg/Include/Protocol/MmcHost.h @@ -131,6 +131,12 @@ typedef EFI_STATUS (EFIAPI *MMC_WRITEBLOCKDATA) ( IN UINT32 *Buffer ); +typedef EFI_STATUS (EFIAPI *MMC_SETIOS) ( + IN EFI_MMC_HOST_PROTOCOL *This, + IN UINT32 BusClockRate, + IN UINT32 BusWidth + ); + struct _EFI_MMC_HOST_PROTOCOL { @@ -147,6 +153,8 @@ struct _EFI_MMC_HOST_PROTOCOL { MMC_READBLOCKDATA ReadBlockData; MMC_WRITEBLOCKDATA WriteBlockData; + MMC_SETIOS SetIos; + }; #define MMC_HOST_PROTOCOL_REVISION 0x00010001 // 1.1