From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>,
"Zeng, Star" <star.zeng@intel.com>,
Eric Dong <eric.dong@intel.com>, Ruiyu Ni <ruiyu.ni@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Tian, Feng" <feng.tian@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Leif Lindholm" <leif.lindholm@linaro.org>,
"Wu, Hao A" <hao.a.wu@intel.com>,
"Nadav Haklai" <nadavh@marvell.com>,
"Jan Dąbroś" <jsd@semihalf.com>,
"Tomasz Michalec" <tm@semihalf.com>
Subject: Re: [PATCH v2 1/4] MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhase
Date: Mon, 8 Oct 2018 14:21:30 +0200 [thread overview]
Message-ID: <CAKv+Gu_8adLmYtc1W_REq1Op8DLJhv4AJM19ySAdYtbZUO6mFg@mail.gmail.com> (raw)
In-Reply-To: <1538745911-22484-2-git-send-email-mw@semihalf.com>
(add MdeModulePkg maintainers)
On 5 October 2018 at 15:25, Marcin Wojtas <mw@semihalf.com> wrote:
> In order to ensure bigger flexibility in the NotifyPhase
> routine of the SdMmcOverride protocol, enable using an
> optional phase-specific data. This will allow to exchange
> more information between the protocol producer driver
> and SdMmcPciHcDxe in the newly added callbacks.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> ---
> MdeModulePkg/Include/Protocol/SdMmcOverride.h | 4 +++-
> MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 12 ++++++++----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> index 0766252..178945f 100644
> --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> @@ -63,6 +63,7 @@ EFI_STATUS
> @param[in] PhaseType The type of operation and whether the
> hook is invoked right before (pre) or
> right after (post)
> + @param[in,out] Data The pointer to a phase-specific data.
>
> @retval EFI_SUCCESS The override function completed successfully.
> @retval EFI_NOT_FOUND The specified controller or slot does not exist.
> @@ -74,7 +75,8 @@ EFI_STATUS
> (EFIAPI * EDKII_SD_MMC_NOTIFY_PHASE) (
> IN EFI_HANDLE ControllerHandle,
> IN UINT8 Slot,
> - IN EDKII_SD_MMC_PHASE_TYPE PhaseType
> + IN EDKII_SD_MMC_PHASE_TYPE PhaseType,
> + IN OUT VOID *OptParam
Please use the same name in the comment block and in the actual prototype.
Also, could we use PhaseData as the name perhaps?
With those changes
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> );
>
> struct _EDKII_SD_MMC_OVERRIDE {
> diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> index 25771dc..02eb4ad 100644
> --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> @@ -444,7 +444,8 @@ SdMmcHcReset (
> Status = mOverride->NotifyPhase (
> Private->ControllerHandle,
> Slot,
> - EdkiiSdMmcResetPre);
> + EdkiiSdMmcResetPre,
> + NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_WARN,
> "%a: SD/MMC pre reset notifier callback failed - %r\n",
> @@ -494,7 +495,8 @@ SdMmcHcReset (
> Status = mOverride->NotifyPhase (
> Private->ControllerHandle,
> Slot,
> - EdkiiSdMmcResetPost);
> + EdkiiSdMmcResetPost,
> + NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_WARN,
> "%a: SD/MMC post reset notifier callback failed - %r\n",
> @@ -1087,7 +1089,8 @@ SdMmcHcInitHost (
> Status = mOverride->NotifyPhase (
> Private->ControllerHandle,
> Slot,
> - EdkiiSdMmcInitHostPre);
> + EdkiiSdMmcInitHostPre,
> + NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_WARN,
> "%a: SD/MMC pre init notifier callback failed - %r\n",
> @@ -1122,7 +1125,8 @@ SdMmcHcInitHost (
> Status = mOverride->NotifyPhase (
> Private->ControllerHandle,
> Slot,
> - EdkiiSdMmcInitHostPost);
> + EdkiiSdMmcInitHostPost,
> + NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_WARN,
> "%a: SD/MMC post init notifier callback failed - %r\n",
> --
> 2.7.4
>
next prev parent reply other threads:[~2018-10-08 12:21 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 13:25 [PATCH v2 0/4] SdMmcOverride extension Marcin Wojtas
2018-10-05 13:25 ` [PATCH v2 1/4] MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhase Marcin Wojtas
2018-10-08 12:21 ` Ard Biesheuvel [this message]
2018-10-05 13:25 ` [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol Marcin Wojtas
2018-10-05 15:12 ` Philippe Mathieu-Daudé
2018-10-05 15:17 ` Marcin Wojtas
2018-10-08 12:41 ` Ard Biesheuvel
2018-10-08 12:59 ` Marcin Wojtas
2018-10-08 13:07 ` Ard Biesheuvel
2018-10-08 13:17 ` Marcin Wojtas
2018-10-08 13:27 ` Ard Biesheuvel
2018-10-08 13:37 ` Marcin Wojtas
2018-10-08 13:43 ` Ard Biesheuvel
2018-10-08 14:52 ` Marcin Wojtas
2018-10-08 15:10 ` Ard Biesheuvel
2018-10-09 11:22 ` Wu, Hao A
2018-10-09 11:32 ` Marcin Wojtas
2018-10-09 11:45 ` Ard Biesheuvel
2018-10-09 11:51 ` Marcin Wojtas
2018-10-11 15:43 ` Marcin Wojtas
2018-10-12 1:39 ` Wu, Hao A
2018-10-12 5:06 ` Marcin Wojtas
2018-10-12 15:55 ` Ard Biesheuvel
2018-10-12 16:04 ` Marcin Wojtas
2018-10-12 16:24 ` Ard Biesheuvel
2018-10-12 16:49 ` Marcin Wojtas
2018-11-01 7:04 ` Wu, Hao A
2018-11-02 8:21 ` Marcin Wojtas
2018-11-02 12:16 ` Marcin Wojtas
2018-11-03 2:57 ` Wu, Hao A
2018-10-05 13:25 ` [PATCH v2 3/4] MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverride Marcin Wojtas
2018-10-08 12:44 ` Ard Biesheuvel
2018-11-01 7:06 ` Wu, Hao A
2018-11-02 9:39 ` Marcin Wojtas
2018-11-03 3:19 ` Wu, Hao A
2018-10-05 13:25 ` [PATCH v2 4/4] MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency Marcin Wojtas
2018-10-08 12:49 ` Ard Biesheuvel
2018-11-01 7:11 ` Wu, Hao A
2018-11-02 9:52 ` Marcin Wojtas
2018-10-12 5:24 ` [PATCH v2 0/4] SdMmcOverride extension Wu, Hao A
2018-10-12 5:33 ` Marcin Wojtas
2018-10-12 12:48 ` Wu, Hao A
2018-10-12 12:50 ` Marcin Wojtas
2018-10-25 12:43 ` Marcin Wojtas
2018-10-26 7:22 ` Wu, Hao A
2018-11-01 7:11 ` Wu, Hao A
2018-11-02 10:09 ` Marcin Wojtas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKv+Gu_8adLmYtc1W_REq1Op8DLJhv4AJM19ySAdYtbZUO6mFg@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox