new file mode 100644
@@ -0,0 +1,19 @@
+#/** @file
+# SoC specific defines
+#
+# Copyright (c) 2018 Linaro, Ltd. All rights reserved.<BR>
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#**/
+
+#define STYX_SOC_VERSION_MASK 0xFFF
+#define STYX_SOC_VERSION_A0 0x000
+#define STYX_SOC_VERSION_B0 0x010
+#define STYX_SOC_VERSION_B1 0x011
@@ -14,6 +14,7 @@
#include <AmdStyxAcpiLib.h>
#include <IndustryStandard/IoRemappingTable.h>
+#include <SocVersion.h>
#define FIELD_OFFSET(type, name) __builtin_offsetof(type, name)
@@ -354,11 +355,6 @@ STATIC STYX_IO_REMAPPING_STRUCTURE AcpiIort = {
#pragma pack()
-#define STYX_SOC_VERSION_MASK 0xFFF
-#define STYX_SOC_VERSION_A0 0x000
-#define STYX_SOC_VERSION_B0 0x010
-#define STYX_SOC_VERSION_B1 0x011
-
EFI_ACPI_DESCRIPTION_HEADER *
IortHeader (
VOID
@@ -22,6 +22,8 @@
#include <Protocol/NonDiscoverableDevice.h>
+#include <SocVersion.h>
+
STATIC
VOID
ResetSataController (
@@ -144,11 +146,6 @@ InitializeSataController (
AhciBaseAddr, SIZE_4KB);
}
-#define STYX_SOC_VERSION_MASK 0xFFF
-#define STYX_SOC_VERSION_A0 0x000
-#define STYX_SOC_VERSION_B0 0x010
-#define STYX_SOC_VERSION_B1 0x011
-
EFI_STATUS
EFIAPI
StyxSataPlatformDxeEntryPoint (
@@ -28,6 +28,8 @@
#include <Protocol/AmdMpCoreInfo.h>
+#include <SocVersion.h>
+
#define PMU_INT_FLAG_SPI 0
#define PMU_INT_TYPE_HIGH_LEVEL 4
@@ -230,11 +232,6 @@ DisableSmmu (
}
}
-#define STYX_SOC_VERSION_MASK 0xFFF
-#define STYX_SOC_VERSION_A0 0x000
-#define STYX_SOC_VERSION_B0 0x010
-#define STYX_SOC_VERSION_B1 0x011
-
STATIC
VOID
SetSocIdStatus (
Instead of adding yet another redefinition in the next patch, move the silicon revision testing macros into a shared header file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Silicon/AMD/Styx/Common/SocVersion.h | 19 +++++++++++++++++++ Silicon/AMD/Styx/AcpiTables/Iort.c | 6 +----- Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c | 7 ++----- Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c | 7 ++----- 4 files changed, 24 insertions(+), 15 deletions(-) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel