The firmware reports the emmc2 frequency with a slightly
different mailbox command, lets select the correct one
based on which controller we are binding to.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
.../RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c b/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c
index a7b538a91a..b0f03cefc9 100644
--- a/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c
+++ b/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c
@@ -250,7 +250,11 @@ CalculateClockFrequencyDivisor (
UINT32 Divisor;
UINT32 BaseFrequency = 0;
- Status = mFwProtocol->GetClockRate (RPI_MBOX_CLOCK_RATE_EMMC, &BaseFrequency);
+ if (PcdGet32 (PcdSdIsArasan)) {
+ Status = mFwProtocol->GetClockRate (RPI_MBOX_CLOCK_RATE_EMMC, &BaseFrequency);
+ } else {
+ Status = mFwProtocol->GetClockRate (RPI_MBOX_CLOCK_RATE_EMMC2, &BaseFrequency);
+ }
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Couldn't get RPI_MBOX_CLOCK_RATE_EMMC\n"));
return Status;
@@ -472,8 +476,8 @@ MMCNotifyState (
switch (State) {
case MmcHwInitializationState:
{
- EFI_STATUS Status;
- UINT32 Divisor;
+
+ DEBUG ((DEBUG_MMCHOST_SD, "ArasanMMCHost: current divisor %x\n", MmioRead32(MMCHS_SYSCTL)));
Status = SoftReset (SRA);
if (EFI_ERROR (Status)) {
--
2.13.7
-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68817):
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F68817&data=04%7C01%7Cawarkentin%40vmware.com%7C3e52cf5f8620415a603f08d8a0875747%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850451597004%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=YxlrM8qbYHtMl1ULi3pTnHnJyyepSmSxsSc3hPnqdY8%3D&reserved=0
Mute This Topic:
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.io%2Fmt%2F78964894%2F4387333&data=04%7C01%7Cawarkentin%40vmware.com%7C3e52cf5f8620415a603f08d8a0875747%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850451597004%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MFG8KdTLIf%2FzzP5taWbyHf94q%2FMd3CR%2B9l76FhBLlqg%3D&reserved=0
Group Owner: devel+owner@edk2.groups.io
Unsubscribe:
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&data=04%7C01%7Cawarkentin%40vmware.com%7C3e52cf5f8620415a603f08d8a0875747%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850451597004%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=18%2F5sdBQAPKGtwJDGPqwqWmLpLQeWDVGm1PQmZp%2B%2BUM%3D&reserved=0
[awarkentin@vmware.com]
-=-=-=-=-=-=