From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Jun Nie <jun.nie@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
Haojian Zhuang <haojian.zhuang@linaro.org>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Shawn Guo <shawn.guo@linaro.org>,
jason.liu@linaro.org
Subject: Re: [PATCH] EmbeddedPkg/DwEmmcDxe: limit max clock for platform
Date: Mon, 3 Jul 2017 10:40:17 +0100 [thread overview]
Message-ID: <CAKv+Gu8YjtC=-qdYO6uMnzUQy-ZjWBzw6HXCPk_SWJ6nFe8PPg@mail.gmail.com> (raw)
In-Reply-To: <1499054517-22398-1-git-send-email-jun.nie@linaro.org>
On 3 July 2017 at 05:01, Jun Nie <jun.nie@linaro.org> wrote:
> Some boards may have max clock limitation. Add a Pcd to notify
> driver.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> ---
> EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 4 ++++
> EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf | 1 +
> EmbeddedPkg/EmbeddedPkg.dec | 1 +
> 3 files changed, 6 insertions(+)
>
> diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> index fe23d11..308f3a7 100644
> --- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> +++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> @@ -560,6 +560,10 @@ DwEmmcSetIos (
> EFI_STATUS Status = EFI_SUCCESS;
> UINT32 Data;
>
> + if (BusClockFreq > PcdGet32 (PcdDwEmmcDxeMaxClockFrequencyInHz)) {
> + return EFI_UNSUPPORTED;
> + }
> +
> if (TimingMode != EMMCBACKWARD) {
> Data = MmioRead32 (DWEMMC_UHSREG);
> switch (TimingMode) {
> diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf
> index e3c8313..3582997 100644
> --- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf
> +++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf
> @@ -48,6 +48,7 @@
> [Pcd]
> gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress
> gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz
> + gDwEmmcDxeTokenSpaceGuid.PcdDwEmmcDxeMaxClockFrequencyInHz
>
> [Depex]
> TRUE
> diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec
> index 0d4a062..aec8259 100644
> --- a/EmbeddedPkg/EmbeddedPkg.dec
> +++ b/EmbeddedPkg/EmbeddedPkg.dec
> @@ -167,6 +167,7 @@
> # DwEmmc Driver PCDs
> gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress|0x0|UINT32|0x00000035
> gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz|0x0|UINT32|0x00000036
> + gDwEmmcDxeTokenSpaceGuid.PcdDwEmmcDxeMaxClockFrequencyInHz|0x0|UINT32|400000000
>
Please use the correct token space guid, or add it to the correct .dec file.
next prev parent reply other threads:[~2017-07-03 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 4:01 [PATCH] EmbeddedPkg/DwEmmcDxe: limit max clock for platform Jun Nie
2017-07-03 4:01 ` [PATCH 2/2] EmbeddedPkg/DwEmmc: Adjust FIFO threshold Jun Nie
2017-07-03 13:21 ` Leif Lindholm
2017-07-03 9:40 ` Ard Biesheuvel [this message]
2017-07-03 12:36 ` [PATCH] EmbeddedPkg/DwEmmcDxe: limit max clock for platform Leif Lindholm
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+Gu8YjtC=-qdYO6uMnzUQy-ZjWBzw6HXCPk_SWJ6nFe8PPg@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