From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AGs4zMafxs9JW01hVOPWlxrCj4mZBB4AwCUxqKf46/2o2nBQW6G8K6Xq7BDC4HNMC0ruuVdbwbEBYg== 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 Cc: leif.lindholm@linaro.org, star.zeng@intel.com, hao.a.wu@intel.com, feng.tian@intel.com, Ard Biesheuvel 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: [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: , X-List-Received-Date: Thu, 30 Nov 2017 10:07:26 -0000 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