[edk2-devel] [PATCH][edk2-platforms 2/5] Platform/ARM/SgiPkg: remove the use of SMSC Lan91x controller

Aditya Angadi aditya.angadi at arm.com
Fri Dec 18 14:07:23 UTC 2020


Virtio network is supported for all the platforms in SgiPkg and so
remove the use of SMSC Lan91x controller from all the platforms.

Signed-off-by: Aditya Angadi <aditya.angadi at arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl               | 17 -----------------
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf  |  3 ---
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 10 +---------
 Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc                 |  3 ---
 Platform/ARM/SgiPkg/SgiPlatform.dsc.inc                  |  5 +----
 Platform/ARM/SgiPkg/SgiPlatform.fdf                      |  4 ----
 6 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
index 55a8ed04d5aa..785f426fc29b 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
@@ -29,23 +29,6 @@ DefinitionBlock ("SsdtRosTable.aml", "SSDT", 1, "ARMLTD", "ARMSGI",
       })
     }
 
-    // SMSC 91C111
-    Device (ETH0) {
-      Name (_HID, "LNRO0003")
-      Name (_UID, Zero)
-      Name (_STA, 0xF)
-      Name (_CRS, ResourceTemplate () {
-        Memory32Fixed (ReadWrite, 0x18000000, 0x1000)
-        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 111 }
-      })
-      Name (_DSD, Package() {
-        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
-                Package() {
-                  Package(2) {"reg-io-width", 4 },
-                }
-      })
-    }
-
     // VIRTIO DISK
     Device (VR00) {
       Name (_HID, "LNRO0005")
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
index 2ed0ff1fb62e..333247d0d808 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
@@ -19,7 +19,6 @@ [Packages]
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
   Platform/ARM/SgiPkg/SgiPlatform.dec
-  Platform/ARM/VExpressPkg/ArmVExpressPkg.dec
   StandaloneMmPkg/StandaloneMmPkg.dec
 
 [LibraryClasses]
@@ -69,8 +68,6 @@ [FixedPcd]
   gArmSgiTokenSpaceGuid.PcdSmcCs1Base
   gArmSgiTokenSpaceGuid.PcdSysPeriphBase
 
-  gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress
-
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
index ecca91e0f51b..9bdc63b9e3d4 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
@@ -17,7 +17,7 @@
 
 // Total number of descriptors, including the final "end-of-table" descriptor.
 #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS                 \
-          (11 + (FixedPcdGet32 (PcdChipCount) * 2))
+          (10 + (FixedPcdGet32 (PcdChipCount) * 2))
 
 /**
   Returns the Virtual Memory Map of the platform.
@@ -117,14 +117,6 @@ ArmPlatformGetVirtualMemoryMap (
   VirtualMemoryTable[Index].Length          = SIZE_64MB;
   VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
 
-#if defined (EDK2_ENABLE_SMSC_91X)
-  // Expansion AXI - SMSC 91X (Ethernet)
-  VirtualMemoryTable[++Index].PhysicalBase  = FixedPcdGet32 (PcdLan91xDxeBaseAddress);
-  VirtualMemoryTable[Index].VirtualBase     = FixedPcdGet32 (PcdLan91xDxeBaseAddress);
-  VirtualMemoryTable[Index].Length          = SIZE_64MB;
-  VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
-#endif
-
   // Expansion AXI - System Peripherals
   VirtualMemoryTable[++Index].PhysicalBase  = FixedPcdGet64 (PcdSysPeriphBase);
   VirtualMemoryTable[Index].VirtualBase     = FixedPcdGet64 (PcdSysPeriphBase);
diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc
index 2549c3129b0f..e423a6b50c91 100644
--- a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc
+++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc
@@ -35,9 +35,6 @@ [PcdsFixedAtBuild.common]
   gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202
 
   # Ethernet
-!ifdef EDK2_ENABLE_SMSC_91X
-  gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x18000000
-!endif
   gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress|0x1C150000
   gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|204
 
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
index 2beab1f07278..ed7c7d6c4581 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
@@ -262,10 +262,7 @@ [Components.common]
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
 
-  # SMSC LAN 91C111 / Virtio Network
-!ifdef EDK2_ENABLE_SMSC_91X
-  Platform/ARM/VExpressPkg/Drivers/Lan91xDxe/Lan91xDxe.inf
-!endif
+  # Virtio Network
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
 
   #
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index 546021a8bf33..da23804828e5 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -182,10 +182,6 @@ [FV.FvMain]
   # Networking stack
   #
 !include NetworkPkg/Network.fdf.inc
-
-!ifdef EDK2_ENABLE_SMSC_91X
-  INF Platform/ARM/VExpressPkg/Drivers/Lan91xDxe/Lan91xDxe.inf
-!endif
   INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
 
 [FV.FVMAIN_COMPACT]
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69192): https://edk2.groups.io/g/devel/message/69192
Mute This Topic: https://groups.io/mt/79061405/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list