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:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::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 91C3021B00DC0 for ; Fri, 10 Nov 2017 05:55:01 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id r68so2941886wmr.1 for ; Fri, 10 Nov 2017 05:59:04 -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=BzQqj6RlbgSvtqH8LdQ1lLBvpU948RuL30i6Pul8zUw=; b=LWE2JiroOyupWn1zcYqZWEv0YFet0PMvxieXmgLVJlkz52mMSxnbp2ThEucgdzhvQ1 mwlRujUO0ytWZjSk9oi3M7hO41mrxsCSMqSqG6lG9WZknEEw+mgo6icV6mbimmMhIdr4 bLFWpZLKAEePHUibtWuxWLdvZjmEAEHseSMqg= 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=BzQqj6RlbgSvtqH8LdQ1lLBvpU948RuL30i6Pul8zUw=; b=SKIqM1NgPmbOSEAPyBI56/yU0ERSrMFlLrVBEUMZRAzh4fBuuVsqX4E2BTf7gRbh0a mZiutC1BeF6n7L1gK18Ru2NdrddLec0kZOt3y3kODvhuzEbi4b/fD9CfcXoVJBMhOjDV k13q7dDASZG6aGfImY+O2JKeel1OR5OhBH8DRKr90jeIqiUpdCWNzaxe+c4OlXeuP/wG lOqLHC4C3dTjbhP3DlnKeHgBrQOSw1sjYTZmsasktFvi3kPYPYgWBZCNkWQfDTReDOwM xLzM1Vv+DEuByYujF8vQ2TTHcSOsplsvhVdU98MVHT7faPgNQ9b9ewl2yVnbus65NKA1 drfA== X-Gm-Message-State: AJaThX6GmZPTgozOzsedpQibh5WUrFI+9ukM9dIxyhNDhRDdUaQyRvT2 dFj0hAep44F5kw+RVHJ5JiSfYbqrLeE= X-Google-Smtp-Source: AGs4zMaH8W7u7AOIeDsHvVLENVanbBOPzXKrAF3Rfq4+oz67yuk/4cZZIIeWoRJe5rVb5CwrdbJhfw== X-Received: by 10.28.18.1 with SMTP id 1mr356978wms.88.1510322342761; Fri, 10 Nov 2017 05:59:02 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id d125sm769726wmd.2.2017.11.10.05.59.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 05:59:01 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, michael.d.kinney@intel.com Cc: liming.gao@intel.com, star.zeng@intel.com, feng.tian@intel.com, eric.dong@intel.com, Ard Biesheuvel Date: Fri, 10 Nov 2017 13:58:45 +0000 Message-Id: <20171110135847.361-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [RFC PATCH 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: Fri, 10 Nov 2017 13:55:01 -0000 Many SDHCI implementations exist that are almost spec complicant, and could be driver 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. Ard Biesheuvel (2): MdeModulePkg: introduce SD/MMC override protocol MdeModulePkg/SdMmcPciHcDxe: allow HC capabilities to be overridden MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 111 +++++++++++++++++++- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 6 ++ MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf | 2 + MdeModulePkg/Include/Protocol/SdMmcOverride.h | 95 +++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 3 + 5 files changed, 212 insertions(+), 5 deletions(-) create mode 100644 MdeModulePkg/Include/Protocol/SdMmcOverride.h -- 2.11.0