From: "Ard Biesheuvel" <ard.biesheuvel@arm.com>
To: Jeremy Linton <jeremy.linton@arm.com>, devel@edk2.groups.io
Cc: leif@nuviainc.com, pete@akeo.ie, andrey.warkentin@gmail.com,
samer.el-haj-mahmoud@arm.com
Subject: Re: [PATCH v2 6/9] Platform/RaspberryPi: Power up sd, and tweak GPIOs
Date: Mon, 4 Jan 2021 17:10:22 +0100 [thread overview]
Message-ID: <39008fcb-92f1-5aea-0bf7-741fd98db062@arm.com> (raw)
In-Reply-To: <fe77d1b1-6038-52a2-736a-e564aee3407b@arm.com>
On 1/4/21 5:08 PM, Jeremy Linton wrote:
> Hi,
>
> On 12/15/20 3:00 PM, Jeremy Linton wrote:
>> It seems we should be powering up the sd cards, and possibly
>> the clocks as well to assure they are setup properly before
>> we attempt to access the controller.
>
> Looks like this hasn't been merged yet. I sent this patch as a
> replacement for 6/9 in the original set, rather than resend the entire set.
>
> Would it help if I resent the entire series?
>
Yes please,
--
Ard.
>
>>
>> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
>> ---
>> Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
>> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
>> index 28f57438c5..e55ed63efa 100644
>> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
>> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
>> @@ -552,6 +552,16 @@ ApplyVariables (
>> GpioPinFuncSet (37, GPIO_FSEL_ALT3);
>> GpioPinFuncSet (38, GPIO_FSEL_ALT3);
>> GpioPinFuncSet (39, GPIO_FSEL_ALT3);
>> +
>> + /*
>> + * power and clock everything by default
>> + */
>> + Status = mFwProtocol->SetPowerState (RPI_MBOX_POWER_STATE_SDHCI,
>> + TRUE, TRUE); //SD on with
>> wait
>> + Status = mFwProtocol->SetGpioConfig (RPI_EXP_GPIO_SD_VOLT,
>> + RPI_EXP_GPIO_DIR_OUT,
>> TRUE); //3.3v
>> + Status = mFwProtocol->SetClockState (RPI_MBOX_CLOCK_RATE_EMMC2,
>> TRUE);
>> + Status = mFwProtocol->SetClockState (RPI_MBOX_CLOCK_RATE_EMMC,
>> TRUE);
>> }
>> } else {
>> DEBUG ((DEBUG_ERROR, "Model Family %d not supported...\n",
>> mModelFamily));
>>
>
prev parent reply other threads:[~2021-01-04 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 21:00 [PATCH v2 6/9] Platform/RaspberryPi: Power up sd, and tweak GPIOs Jeremy Linton
2021-01-04 16:08 ` Jeremy Linton
2021-01-04 16:10 ` Ard Biesheuvel [this message]
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=39008fcb-92f1-5aea-0bf7-741fd98db062@arm.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