summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
Commit message (Collapse)AuthorAgeFilesLines
* 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/MmcDxe: Enable 4-bit mode even if SD_HIGH_SPEED is not supportedLoh, Tien Hock2019-03-151-18/+17
| | | | | | | | | | | | | | If SD doesn't support SD_HIGH_SPEED, function should still continue to setup SD to go into 4 bits more if it is supported. Currently, the code inadvertently exits early, but with a EFI_SUCCESS return code, and so execution proceeds without ever attempting to enable 4-bit mode. Since not having SD_HIGH_SPEED support is not an error, downgrade the message that reports this to DEBUG_INFO. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Loh Tien Hock <tien.hock.loh@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* SD : Updated CMD 6 implememtation.Meenakshi Aggarwal2017-09-071-5/+48
| | | | | | | | | | | | | | | | | 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>
* MMC : Added missing __FUNCTION__ macro.Meenakshi Aggarwal2017-09-071-7/+7
| | | | | | | | | We want to print name of the function resulted in error, but __FUNCTION__ macro was missing. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg/MmcDxe: Align the ExtCSD bufferJun Nie2017-07-051-5/+14
| | | | | | | | | 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: Correct argument of ECSD readJun Nie2017-06-291-1/+1
| | | | | | | | | The argument of CMD8 should be stuff bits according to standard JESD84-A44. 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: Add non-DDR timing mode supportJun Nie2017-06-291-2/+14
| | | | | | | | | Only DDR mode is support for 8bit mode currently. Add non-DDR case when configuring ECSD. 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: set I/O speed and bus width in SD stackHaojian Zhuang2016-11-241-0/+106
| | | | | | | | | 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-3/+182
| | | | | | | | | | | | | | | | 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: declare ECSD structureHaojian Zhuang2016-11-141-2/+2
| | | | | | | | | | 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-3/+2
| | | | | | | | | | 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: Remove dependency on TimerLibOlivier Martin2015-05-061-5/+3
| | | | | | | | | | | | | 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
* 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
* MmcDxe: Adding eMMC supportOlivier Martin2014-01-091-0/+456
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