From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::232; helo=mail-it0-x232.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (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 25EF92214E32B for ; Mon, 11 Dec 2017 15:08:20 -0800 (PST) Received: by mail-it0-x232.google.com with SMTP id m11so14806539iti.1 for ; Mon, 11 Dec 2017 15:12:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=B8P6HwPibKrxThHe9V/tqWJn0nE5LYrZ/7rfnAeNxAk=; b=BCABsbFhKWqT+SScGFHlu8GTixDqungM9y7gZm+pJu4j1Yua3ok70NivqWs6dGhe2i SmQkdFrvNWj/sH9AJcJGYEzuDh1goiBsne9BDcZGm1PNhKjHYY06a7+DysTvZ/lNyLt8 W7TJtS64CcviVAN6QRQgD9lKr8/25mI/lSWMs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=B8P6HwPibKrxThHe9V/tqWJn0nE5LYrZ/7rfnAeNxAk=; b=qZd5Fk3y/RS4rzB1nvWrE23SqqDa1X91CA92TE2/NDY1+awQDMyNGp1PiFCh0RwyN4 5TgDs9AcAKhFOCNMPAlXGj8NYP2LaOlsa5hTcItEr7D/thTsvV0tBqfhVD/jMukBvCah yS13U9n0h1aomo3vlWVkJkCjFsaqjH9zDud6bcfNL79SaaIl+Bwg5VKOkYYAD2Z/4R2s S5u1NP9cGvNxAu4tZtc76DvjpVDAWiFqxNo3FmdQmxAWpTGfMFo0jq/3osYiBNcg7Axk BEDPtbX47d/cw89Rye+ubjhMwBsN3Qcq20bJZjhJP7ATXpaPhq8bHXMrDkenfAJ94jNj KPHQ== X-Gm-Message-State: AKGB3mImkl6D0Yf8NKDGN/qNYcrBtDtQKukphJglKo6ycJjhnv84mKr1 YvYd+fKjvC4B2oRTdKPhYo2T+lPlG9IABXe2IMhCr3Lo X-Google-Smtp-Source: ACJfBouM7P8y2Caag55OnTz4dJUlehR1iRoBXwj1tYS3DBmU86bYa5OcAgOwzOn4qNrwUBv8I3i9bmOc0QBu/LsVgzU= X-Received: by 10.107.151.142 with SMTP id z136mr2743313iod.248.1513033976921; Mon, 11 Dec 2017 15:12:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Mon, 11 Dec 2017 15:12:56 -0800 (PST) In-Reply-To: <20171205180152.15758-1-ard.biesheuvel@linaro.org> References: <20171205180152.15758-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Mon, 11 Dec 2017 23:12:56 +0000 Message-ID: To: "edk2-devel@lists.01.org" Cc: Leif Lindholm , "Kinney, Michael D" , "Zeng, Star" , "Tian, Feng" , Ruiyu Ni , "Wu, Hao A" , Ard Biesheuvel Subject: Re: [PATCH v3 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: Mon, 11 Dec 2017 23:08:21 -0000 Content-Type: text/plain; charset="UTF-8" On 5 December 2017 at 18:01, Ard Biesheuvel wrote: > 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 v2: > - use a singleton instance of the SD/MMC protocol rather than one per > controller; this is needed to support 'reconnect -r', as pointed out > by Ray > - use EDKII prefixes for all types defined by the protocol > - replace 'hook' with 'notify', and tweak some other identifiers > - add missing function comment headers for factored out functions > > 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 always 64 bits > in size) > Comments anyone?