diff options
author | Marcin Wojtas <mw@semihalf.com> | 2017-09-27 19:05:35 +0200 |
---|---|---|
committer | Leif Lindholm <leif@developerbox> | 2017-10-29 16:47:41 +0000 |
commit | 20f6f144d3a8ece26f2970220b6a2b09c9fa2613 (patch) | |
tree | 9de46c25e2c075b846c4d278d07f44726d9ffe8c /Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h | |
parent | ed226a5d4ee8fb93f9e2a054e6905e99c70bf50c (diff) | |
download | edk2-platforms-20f6f144d3a8ece26f2970220b6a2b09c9fa2613.tar.xz |
Marvell/Drivers: XenonDxe: Allow overriding base clock frequency
Some SdMmc host controllers are run by clocks with different
frequency than it is reflected in Capabilities Register 1.
Because the bitfield is only 8 bits wide, a maximum value
that could be obtained from hardware is 255(MHz).
In case the actual frequency exceeds 255MHz, the 8-bit BaseClkFreq
member of SD_MMC_HC_SLOT_CAP structure occurs to be not sufficient
to be used for setting the clock speed in SdMmcHcClockSupply
function.
This patch adds new UINT32 array ('BaseClkFreq[]') to
SD_MMC_HC_PRIVATE_DATA structure for specifying
the input clock speed for each slot of the host controller.
All routines that are used for clock configuration are
updated accordingly.
Thanks to above the Xenon host controller driver
could be modified to configure clock speed relatively
to actual 400MHz input.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h')
-rw-r--r-- | Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h b/Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h index 6a2a279699..067b9acf61 100644 --- a/Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h +++ b/Platform/Marvell/Drivers/SdMmc/XenonDxe/SdMmcPciHcDxe.h @@ -115,6 +115,12 @@ typedef struct { UINT64 MaxCurrent[SD_MMC_HC_MAX_SLOT];
UINT32 ControllerVersion;
+
+ //
+ // Some controllers may require to override base clock frequency
+ // value stored in Capabilities Register 1.
+ //
+ UINT32 BaseClkFreq[SD_MMC_HC_MAX_SLOT];
} SD_MMC_HC_PRIVATE_DATA;
#define SD_MMC_HC_TRB_SIG SIGNATURE_32 ('T', 'R', 'B', 'T')
|