summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Universal
Commit message (Collapse)AuthorAgeFilesLines
* EmbeddedPkg/MmcDxe: expand to support multiple blocksHaojian Zhuang2016-11-242-59/+121
| | | | | | | | | | 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-242-0/+122
| | | | | | | | | 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-242-3/+187
| | | | | | | | | | | | | | | | 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-142-3/+158
| | | | | | | | | | 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-142-3/+3
| | | | | | | | | | 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: MmcDxe: wait OCR busy bit freeHaojian Zhuang2016-11-141-3/+8
| | | | | | | | | | | According to eMMC spec, OCR.PowerUp bit is also busy bit. If the busy bit is '0', CMD1 should be sent and OCR should be fetched again. And add a timeout counter on the repeated steps. 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: eliminate deprecated string function callsArd Biesheuvel2016-10-281-2/+2
| | | | | | | | | | | | | Get rid of calls to unsafe string functions. These are deprecated and may be removed in the future. Note that this also fixes an existing issue in the code, where the buffer may be overrun by one character when en == mLogRemainChar, in which case the NUL terminator ends up after the end of the buffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg: Remove dependency on TimerLibOlivier Martin2015-05-064-11/+8
| | | | | | | | | | | | | 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-195-53/+53
| | | | | | | | | | | | 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
* MmcIdentification: Don't error out for SD cardsOlivier Martin2014-02-051-4/+3
| | | | | | | | | | | SD cards don't respond to CMD1 immediately following CMD0. 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@15210 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fix mixed EOLOlivier Martin2014-01-231-1/+1
| | | | | | | | | 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@15165 6f19259b-4bc3-4df7-8a09-765794883524
* MmcDxe: Perform diagnostics specifically on the requested controllerOlivier Martin2014-01-091-21/+30
| | | | | | | | | | | | | In RunDiagnostics, find the controller specified by ControllerHandle and run diagnostics only on that controller, returning EFI_UNSUPPORTED if it isn't in the driver's pool of managed devices. 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@15075 6f19259b-4bc3-4df7-8a09-765794883524
* MmcDxe: Adding eMMC supportOlivier Martin2014-01-094-262/+471
| | | | | | | | | 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
* MmcDxe Diagnostics: return EFI_UNSUPPORTED for Language other than englishOlivier Martin2013-09-231-5/+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@14706 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Moved all the 'Print*()' functions to MmcDebug.cOlivier Martin2013-08-305-128/+199
| | | | | | | | | 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: Removed redundant CMD12 calls from MMCOlivier Martin2013-08-061-6/+18
| | | | | | | | | | | | Command 12 - Stop transmission (ends read or write). Normally only needed for streaming transfers or after error. 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@14525 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Update Mmc code to conform to coding standardOlivier Martin2013-08-061-77/+59
| | | | | | | | | 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@14524 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Make the driver more compliant with the UEFI specificationoliviermartin2013-04-141-7/+17
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14264 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Fixed coding style and typosoliviermartin2013-03-121-132/+135
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14179 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Fixed line endingsoliviermartin2013-01-251-1/+1
| | | | | | | | | This large code change only modifies the line endings to be CRLF to be compliant with the EDK2 coding convention document. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14088 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Ensure MMC is in Identification Modeoliviermartin2012-10-191-7/+6
| | | | | | | | | | | | | | This change ensure the MMC card is in Identification Mode. The card might be in Data Transfer Mode if a pre UEFI Boot Loader had initialized the card. A potential optimization would be to skip the Identification Mode in this case. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13872 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: The timeout while waiting for the programming to be ↵oliviermartin2012-08-311-1/+0
| | | | | | | | | | complete was decreased twice. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13694 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fixed typooliviermartin2012-08-021-11/+17
| | | | | | | | Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13585 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Avoid nanosecond delay when command succeedsoliviermartin2012-08-021-1/+4
| | | | | | | | | | Check response just after receiving it to avoid the delay. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13584 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fixed MmcIdentificationMode()oliviermartin2012-08-022-4/+4
| | | | | | | | | | 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: Fixed XCLANG buildoliviermartin2012-03-261-5/+6
| | | | | | | | | | | | Move the constant array from its declaration inside the function to a global declaration. Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13140 6f19259b-4bc3-4df7-8a09-765794883524
* Arm Packages: Fixed coding style/Line endings to follow EDK2 coding conventionoliviermartin2011-09-221-149/+174
| | | | | | | | | | | Arm Packages: Fixed mispelling Arm Packages: Reduced warnings all over the code git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12407 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Add 'This' pointer attribute to protocol functionoliviermartin2011-09-013-39/+39
| | | | | | | | | | | | | | | | 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-303-80/+95
| | | | | | | | | | | | | | | | | | | | | | 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
* ArmPkg: Fix ARMGCC buildoliviermartin2011-08-181-1/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12165 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Set the BlockLength at the beginning of the BlockIo transferoliviermartin2011-08-151-10/+12
| | | | | | | | Before the SetBlockLength command was called prior to a Read or Write command. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12133 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-152-3/+3
| | | | | | 2 High Density cards git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12131 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fix the CMD3 sequenceoliviermartin2011-08-151-11/+13
| | | | | | | | | | In the former version, we were checking the card was in the new state (Standby state). But the transition to the nez state is only visible in the response of the next command. This commit removes the check on the MMC state. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12130 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Improved parameters checkingoliviermartin2011-08-151-9/+19
| | | | | | | | Ensure the passed parameters are correct. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12129 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Create a periodic function to check if a card is presentoliviermartin2011-08-153-6/+87
| | | | | | | | | | 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
* ArmPkg: Fix warnings raised by ARMGCColiviermartin2011-06-151-0/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11829 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Fix coding styleoliviermartin2011-06-032-678/+710
| | | | | | | | Make the coding style more compliant with the EDK2 coding convention. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11727 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Wait for the MMC controller to be in Transfer Modeoliviermartin2011-06-032-5/+17
| | | | | | | | | | 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-036-0/+1714
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