From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Sun, 13 Nov 2016 06:48:21 -0000 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(+) 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 -- 2.7.4