summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Universal/MmcDxe/Mmc.c
Commit message (Collapse)AuthorAgeFilesLines
* EmbeddedPkg: Apply uncrustify changesMichael Kubacki2021-12-071-133/+146
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmbeddedPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
* EmbeddedPkg: rename gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuidArd Biesheuvel2020-04-301-5/+5
| | | | | | | | | | | | In EDK2, identifiers carrying the EFI prefix are reserved for ones that are defined in the UEFI or PI specifications. Since the MMC host protocol defined in EmbeddedPkg is not the one that the UEFI spec defines, and given the confusion around this, let's rename it to from gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuid. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
* EmbeddedPkg/Universal/MmcDxe: "fix" CloseProtocol() call in BindingStop()Laszlo Ersek2019-10-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | The 3rd and 4th parameters of the CloseProtocol() call are wrong. Given that we're not dissociating a child controller from a parent controller (= closing a BY_CHILD_CONTROLLER open), but closing a BY_DRIVER open, the 4th parameter (ControllerHandle) should equal the 1st parameter (Handle). It's unclear why this code hasn't crashed before. Note that the patch doesn't fix the underlying driver model bug. I don't understand what the loop in MmcDriverBindingStop() attempts to do. Is this driver supposed to be a bus driver? It seems to create new handles, and to append device path nodes. But it doesn't set up proper parent/child protocol opens, and it doesn't close them. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@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/MmcDxe: Align the ExtCSD bufferJun Nie2017-07-051-0/+3
| | | | | | | | | 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>
* ARM Packages: Removed trailing spacesRonald Cron2014-08-191-12/+12
| | | | | | | | | | | | 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
* EmbeddedPkg/MmcDxe: Moved all the 'Print*()' functions to MmcDebug.cOlivier Martin2013-08-301-3/+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@14612 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg/MmcDxe: Add 'This' pointer attribute to protocol functionoliviermartin2011-09-011-4/+4
| | | | | | | | | | | | | | | | 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/+8
| | | | | | | | | | | | | | | | | | | | | | 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: Create a periodic function to check if a card is presentoliviermartin2011-08-151-1/+62
| | | | | | | | | | 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: Fix coding styleoliviermartin2011-06-031-212/+212
| | | | | | | | 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: Move Universal/MmcDxe from ArmPkg to EmbeddedPkgoliviermartin2011-06-031-0/+387
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