diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-08-25 13:11:02 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-08-25 13:11:02 +0000 |
commit | 300fc77a8a4bf4bb160004dd6e5bec7333d1dc7a (patch) | |
tree | 013564e65118b6332361a9a78e8f0ff10d059e62 /ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c | |
parent | 703da8b4ec9d04b7d4184e0322d5177becc984b1 (diff) | |
download | edk2-platforms-300fc77a8a4bf4bb160004dd6e5bec7333d1dc7a.tar.xz |
ArmPlatformPkg/PL180MciDxe: check PrimeCell ID before initializing
To deal gracefully with the absence of the PL180 hardware on
the Foundation model, check the PrimeCell ID before proceeding
with the installation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18307 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c')
-rw-r--r-- | ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c index 411a61ed04..688cd8a98c 100644 --- a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c +++ b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c @@ -521,6 +521,22 @@ PL180MciDxeInitialize ( EFI_STATUS Status;
EFI_HANDLE Handle;
+ DEBUG ((EFI_D_WARN, "Probing ID registers at 0x%lx for a PL180\n",
+ MCI_PERIPH_ID_REG0));
+
+ // Check if this is a PL180
+ if (MmioRead8 (MCI_PERIPH_ID_REG0) != MCI_PERIPH_ID0 ||
+ MmioRead8 (MCI_PERIPH_ID_REG1) != MCI_PERIPH_ID1 ||
+ MmioRead8 (MCI_PERIPH_ID_REG2) != MCI_PERIPH_ID2 ||
+ MmioRead8 (MCI_PERIPH_ID_REG3) != MCI_PERIPH_ID3 ||
+ MmioRead8 (MCI_PCELL_ID_REG0) != MCI_PCELL_ID0 ||
+ MmioRead8 (MCI_PCELL_ID_REG1) != MCI_PCELL_ID1 ||
+ MmioRead8 (MCI_PCELL_ID_REG2) != MCI_PCELL_ID2 ||
+ MmioRead8 (MCI_PCELL_ID_REG3) != MCI_PCELL_ID3) {
+
+ return EFI_NOT_FOUND;
+ }
+
Handle = NULL;
MCI_TRACE ("PL180MciDxeInitialize()");
|