summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Universal/MmcDxe/Mmc.h
Commit message (Collapse)AuthorAgeFilesLines
* EmbeddedPkg: Fix various typosCœur2019-07-041-1/+1
| | | | | | | Fix various typos in EmbeddedPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: Fix Command Argument for SD/eMMC R/W operation.Meenakshi Aggarwal2019-01-301-0/+2
| | | | | | | | | | | | | | | | | | Issue : SD read failure for high capacity cards e.g. 64 GB Reason : Command argument value exceeds 32 bit for block number 0x3787FFF and cant be fit into 32 bit wide SD host controller register. Fix : AccessMode bits [29:30] of OCR is a valid definition to calculate data address for eMMC cards. For SD cards, data address is calculated on the basis of card capacity status bit[30] of OCR. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* SD : Updated CMD 6 implememtation.Meenakshi Aggarwal2017-09-071-0/+8
| | | | | | | | | | | | | | | | | For setting high speed in SD card, First CMD 6 (Switch) is send to check if card supports High Speed and Second command is send to switch card to high speed mode. In current inplementation, CMD 6 was sent only once to switch the card into HS mode without checking if card supports HS or not, which is not as per specification and also we are not setting the HS i.e. 50000000 but directly asking the card to switch to 26000000 which is incorrect as SD card supports either 25000000 or 50000000. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/MmcDxe: Align the ExtCSD bufferJun Nie2017-07-051-1/+1
| | | | | | | | | ExtCSD structure may be read via DMA. So align it to page to avoid data corruption. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/MmcDxe: expand to support multiple blocksHaojian Zhuang2016-11-241-0/+4
| | | | | | | | | | Make use of DMA to transfer multiple blocks at one time. It could improve the performance on MMC/SD driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg/MmcDxe: set I/O speed and bus width in SD stackHaojian Zhuang2016-11-241-0/+16
| | | | | | | | | Add more SD commands to support 4-bit bus width & iospeed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg/MmcDxe: invoke SetIos() protocol method to set speed and widthHaojian Zhuang2016-11-241-0/+5
| | | | | | | | | | | | | | | | Add the interface to change the bus width and speed. By default, MMC is initialized with 1-bit mode and less than 400KHz bus clock. It causes MMC working inefficiently. Set I/O bus width on both MMC controller and EXTCSD. Otherwise, it may cause unmatched failure case. And support more timing mode, high speed, HS200 & HS400 mode. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg: MmcDxe: add SPEC_VERS field in CSD structureHaojian Zhuang2016-11-141-1/+2
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: MmcDxe: declare ECSD structureHaojian Zhuang2016-11-141-1/+156
| | | | | | | | | | Declare fields in ECSD structure. And drop the original 128 words arrary. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: MmcDxe: move ECSD into CardInfo structureHaojian Zhuang2016-11-141-0/+1
| | | | | | | | | | Since ECSD also describes the information of card, move it into structure CardInfo. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: Remove dependency on TimerLibOlivier Martin2015-05-061-1/+2
| | | | | | | | | | | | | UEFI drivers should not depend on TimerLib. They should use BS.Stall() instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17343 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Removed trailing spacesRonald Cron2014-08-191-17/+17
| | | | | | | | | | | | Trailing spaces create issue/warning when generating/applying patches. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15833 6f19259b-4bc3-4df7-8a09-765794883524
* MmcDxe: Adding eMMC supportOlivier Martin2014-01-091-3/+11
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15074 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Moved all the 'Print*()' functions to MmcDebug.cOlivier Martin2013-08-301-1/+27
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14612 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fixed MmcIdentificationMode()oliviermartin2012-08-021-1/+1
| | | | | | | | | | The condition to check if the card is ready was not correct. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13583 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Add 'This' pointer attribute to protocol functionoliviermartin2011-09-011-1/+1
| | | | | | | | | | | | | | | | This attribute allows the EFI_MMC_HOST_PROTOCOL interface to manage multiple instances in one driver. EmbeddedPkg/MmcDxe: Add Revision attribute to the EFI_MMC_HOST_PROTOCOL Note: The ARM PL180 and Omap35xx MMC host drivers has been updated. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12255 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Card Presence Detect Race Conditionoliviermartin2011-08-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | The MMC driver defaults to assume a card is not present. It then starts a timer in MmcDxeInitialize to check for card presence every 200ms. However it does not immediately check to see if a card is present so if the EFI driver connection process occurs less than 200ms after the driver load, the connection process for partition or filesystem drivers will fail because MediaPresent still is FALSE. To resolve this race condition, we need to immediately perform the presence check in the Start routine. EmbeddedPkg/MmcDxe: Media ID Handling Initialize the MMC device on Start or when presence changes instead of doing it on the Block IO calls. This way the layered drivers can be stopped and rebuilt with new Media IDs instead of experiencing errors on calls to Block IO. Proposed-by: Eugene Cohen (HP) Reviewed-by: oliviermartin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12237 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fix the indexes in the response arrayoliviermartin2011-08-151-8/+8
| | | | | | | | | The indexes have been reversed compare to the specification which created confusions in some MMC responses. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12132 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Implement the correct macro to get the device size of SD ↵oliviermartin2011-08-151-0/+1
| | | | | | 2 High Density cards git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12131 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Create a periodic function to check if a card is presentoliviermartin2011-08-151-0/+2
| | | | | | | | | | In the former version, the check was done for every BlockIo operation. By using a periodical function, we check less time in consequence performance are better. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12128 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Wait for the MMC controller to be in Transfer Modeoliviermartin2011-06-031-0/+2
| | | | | | | | | | The MMC controller might be ready for data but not be in a 'ready' state to send or receive commands. This fix waits for the MMC controller to be in the correct state. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11726 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg: Move Universal/MmcDxe from ArmPkg to EmbeddedPkgoliviermartin2011-06-031-0/+286
The MmcDxe is not ARM architecture specific. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11725 6f19259b-4bc3-4df7-8a09-765794883524