From patchwork Thu Nov 30 10:11:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120098 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp470691qgn; Thu, 30 Nov 2017 02:11:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMao+DVq+1+ODeyooZw+8iW/FeRHg7XfkpsJIoPac+1e1wGUp72QKeMAm6LZniDO9RxOXanj X-Received: by 10.84.178.195 with SMTP id z61mr2056934plb.205.1512036713981; Thu, 30 Nov 2017 02:11:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512036713; cv=none; d=google.com; s=arc-20160816; b=JrYgZzJn2Pg6oAZawlUJUs38NtRSieCVmsy2He/7TprpFEYbxR9Csh3MbBCU17vNvq 0hTcU/CESPvtFnV4Z+TWx1KdhJ3zf5QwS9JDhvELQeRKtfF+IPbmOOkoY9mXuz+/c9dS tFweNxbkcYPsD7epAgfDMEiawUzPuz3XI6N3bOPWL9qNJe7giKLs82UQSpVOb9HA96pi DNtJvTIC/k0FNBpMxpE3em43cdMTH4E8mvyBGx4XVufYcj9TizL81Of1oVG+uB4ejQUk jZzjDLJIe/CXPZ9XPGFp0+804bFlUQICDitrMvk9yN4aHcODDxgAZc7YQ7D+Q8ljZ89g EUhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=8qSAH+oosag3Vp7dqe/rIGsRGOywPLB+XtgWkV70s3Y=; b=QHNXX0p1Un9VElGJWxlBXn2uVHCY9vZc+BQD+28HkPMzsL8ywIGvBRv3WE+PJY9NC6 2E/6pt/m/kmJPs5/d9/DJApgAm9UH+pxLZxMU7ep3T2hpOJ9p0bMWfmq5AoBbY0TdHsU GQtux64k4Y8/cLHIbJz8bEQBCqTQitVjNLrlscHe2kSNQu/wMf4yQCnxTOTor+v5y9/S vxNIvb2lL7jM1c9racl+fW7QKndUMxsaWIAbN+zgpc5bv3nGU03kbfjkgsdVtwmk9LWc lvwmU7dl/MbqaGAegVn55XVLr2fgZaJDQDBzjStKeYBcR9A4oDZvK/5GwMkvnTu/S11e ztpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cWDie2Ei; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id e136si2975399pfh.243.2017.11.30.02.11.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2017 02:11:53 -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 header.s=google header.b=cWDie2Ei; 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 sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9809E220C162D; Thu, 30 Nov 2017 02:07:27 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 DE54421A1099A for ; Thu, 30 Nov 2017 02:07:25 -0800 (PST) Received: by mail-wr0-x243.google.com with SMTP id l22so5975728wrc.11 for ; Thu, 30 Nov 2017 02:11:50 -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; bh=HENm13qv3eBQ6SmAfkZxCxFkKJckBbKSYZB99L6BcwI=; b=cWDie2Eirsqs2CElZjKQZimaMqKwz1wKdyO2ZAlCVy3TOQ3F1VVA4R2zGWvWjDT6ze 0HeUN7xH+Tf9IVTX9TxiiHD4ffibUmOuWyMPGY7M0bzHdwlfc7P8IvA7T7Soqos6YMS3 8IdLEuifVxEDmvsk0z96OaOLVxqlSkt/rZ+ss= 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=HENm13qv3eBQ6SmAfkZxCxFkKJckBbKSYZB99L6BcwI=; b=LdiNJUnUmWUP1vUgC4EkZjJTUd00SNgth4fehuJiq0gKFv8WuK1u14b/7sW1FMfuQP 0QfuJUUDN5CLTyXSV5lZw3ewiP09o55a91li1ZKQ9+rLPjeiG09O9/As2SQFu81RD6BG joPzQzIGuOwTLE2pv/FupmADkLRaoKXqDfd2Uo08kNrOOuxU0NUGmC45rqcZK5SCnXrF XPPOKyuc4ElytWCmv4x+p/LRbeE/Lj3f/w9IW75y0z2d5A29uz5BH04oukILXJUoY36y AXT7L5QTuLQxHw6YkAepOMRTTo0fcc3mNmNTHCN0o2UNfZDh+DtIM7QYui+CBNLDXyhl CNqw== X-Gm-Message-State: AJaThX4I4ys8iRU13Y9ljzeGkiI+t5SNrXKpkiUOaIyKTofbliBkSQ6F IO6l1mdjBJMeUV/hIGIrZl4lpHDQtdM= X-Received: by 10.223.163.11 with SMTP id c11mr1520320wrb.214.1512036700571; Thu, 30 Nov 2017 02:11:40 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id z108sm6572353wrb.67.2017.11.30.02.11.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2017 02:11:39 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 30 Nov 2017 10:11:30 +0000 Message-Id: <20171130101132.18317-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH v2 0/2] quirks handling for SDHCI controllers 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: , Cc: hao.a.wu@intel.com, feng.tian@intel.com, star.zeng@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Many SDHCI implementations exist that are almost spec complicant, and could be driven by the generic SD/MMC host controller driver except for some minimal necessary init time tweaks. Adding such tweaks to the generic driver is undesirable. On the other hand, forking the driver for every platform that has such a SDHCI controller is problematic when it comes to upstreaming and ongoing maintenance (which is arguably the point of upstreaming in the first place). So these patches propose a workaround that is minimally invasive on the EDK2 side, but gives platforms a lot of leeway when it comes to applying SDHCI quirks. Changes since RFC/v1: - add EFI_SD_MMC_PASS_THRU_PROTOCOL* member to override methods - use UINT64* not VOID* to pass capability structure (which is alwys 64 bits in size) Ard Biesheuvel (2): MdeModulePkg: introduce SD/MMC override protocol MdeModulePkg/SdMmcPciHcDxe: allow HC capabilities to be overridden MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 116 +++++++++++++++++++- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 6 + MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf | 2 + MdeModulePkg/Include/Protocol/SdMmcOverride.h | 103 +++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 3 + 5 files changed, 225 insertions(+), 5 deletions(-) create mode 100644 MdeModulePkg/Include/Protocol/SdMmcOverride.h -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel