]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: Removed the 'Identify' functions
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 May 2012 19:52:49 +0000 (19:52 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 May 2012 19:52:49 +0000 (19:52 +0000)
This function was introduced in some drivers to check if the ARM controller
was present in the memory map.
It was using a 8 bit access to get the value from the Identification registers.
These accesses could generate access error on some buses. Instead of replacing
the 8bit access by a 32bit access, these fcuntions have been removed because
they are only useful when the boot firmware is ported on a new platform.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13247 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111Lcd.c
ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c

index ec1a1998244bd45f8731f5e77a503488aeb40bc9..a955acb4dc5878f918645de4b4161919bae8d79e 100644 (file)
@@ -1,6 +1,7 @@
 /** @file  PL111Lcd.c\r
 \r
-  Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>\r
+  Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
+\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
  *\r
  **********************************************************************/\r
 \r
-EFI_STATUS\r
-PL111Indentify (\r
-  VOID\r
-  )\r
-{\r
-  // Check if this is a PrimeCell Peripheral\r
-  if (    ( MmioRead8( PL111_REG_CLCD_P_CELL_ID_0 ) != 0x0D )\r
-       || ( MmioRead8( PL111_REG_CLCD_P_CELL_ID_1 ) != 0xF0 )\r
-       || ( MmioRead8( PL111_REG_CLCD_P_CELL_ID_2 ) != 0x05 )\r
-       || ( MmioRead8( PL111_REG_CLCD_P_CELL_ID_3 ) != 0xB1 ) ) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  // Check if this PrimeCell Peripheral is the PL111 LCD\r
-  if (    ( MmioRead8( PL111_REG_CLCD_PERIPH_ID_0 ) != 0x11 )\r
-       || ( MmioRead8( PL111_REG_CLCD_PERIPH_ID_1 ) != 0x11 )\r
-       || ( (MmioRead8( PL111_REG_CLCD_PERIPH_ID_2 ) & 0xF) != 0x04 )\r
-       || ( MmioRead8( PL111_REG_CLCD_PERIPH_ID_3 ) != 0x00 ) ) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 EFI_STATUS\r
 LcdInitialize (\r
   IN EFI_PHYSICAL_ADDRESS   VramBaseAddress\r
   )\r
 {\r
-  EFI_STATUS  Status = EFI_SUCCESS;\r
-\r
-  // Check if the PL111 is fitted on this motherboard\r
-  Status = PL111Indentify ();\r
-  if (EFI_ERROR( Status )) {\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-\r
   // Define start of the VRAM. This never changes for any graphics mode\r
   MmioWrite32(PL111_REG_LCD_UP_BASE, (UINT32) VramBaseAddress);\r
   MmioWrite32(PL111_REG_LCD_LP_BASE, 0); // We are not using a double buffer\r
index a9ec88c333545f0d16394167cb5ef07cfea15800..5b78b2b3f4395bb591426b639dc20680c7cea5ab 100644 (file)
 
 EFI_EVENT                           EfiExitBootServicesEvent = (EFI_EVENT)NULL;
 
-EFI_STATUS
-SP805Identify (
-  VOID
-  )
-{
-  // Check if this is a PrimeCell Peripheral
-  if (    (MmioRead8 (SP805_WDOG_PCELL_ID0) != 0x0D)
-      ||  (MmioRead8 (SP805_WDOG_PCELL_ID1) != 0xF0)
-      ||  (MmioRead8 (SP805_WDOG_PCELL_ID2) != 0x05)
-      ||  (MmioRead8 (SP805_WDOG_PCELL_ID3) != 0xB1)) {
-    return EFI_NOT_FOUND;
-  }
-
-  // Check if this PrimeCell Peripheral is the SP805 Watchdog Timer
-  if (    (MmioRead8 (SP805_WDOG_PERIPH_ID0) != 0x05)
-      ||  (MmioRead8 (SP805_WDOG_PERIPH_ID1) != 0x18)
-      || ((MmioRead8 (SP805_WDOG_PERIPH_ID2) & 0x0000000F) != 0x04)
-      ||  (MmioRead8 (SP805_WDOG_PERIPH_ID3) != 0x00)) {
-    return EFI_NOT_FOUND;
-  }
-
-  return EFI_SUCCESS;
-}
-
 /**
   Make sure the SP805 registers are unlocked for writing.
 
@@ -363,13 +339,6 @@ SP805Initialize (
   EFI_STATUS  Status;
   EFI_HANDLE  Handle;
 
-  // Check if the SP805 hardware watchdog module exists on board
-  Status = SP805Identify();
-  if (EFI_ERROR(Status)) {
-    Status = EFI_DEVICE_ERROR;
-    goto EXIT;
-  }
-
   // Unlock access to the SP805 registers
   SP805Unlock ();
 
@@ -409,7 +378,7 @@ SP805Initialize (
     goto EXIT;
   }
 
-  EXIT:
+EXIT:
   if(EFI_ERROR(Status)) {
     // The watchdog failed to initialize
     ASSERT(FALSE);