[edk2-platforms PATCH 5/6] Marvell: Armada7k8k/OcteonTX: Enable additional board configuration


Marcin Wojtas
 

Introduce new board description library extension that allows
to execute custom initialization sequence. Add stubs for all
existing platforms.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.inf =
| 1 +
Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h =
| 9 +++++++++
Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDe=
scLib.c | 11 +++++++++++
Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDe=
scLib.c | 11 +++++++++++
Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c =
| 11 +++++++++++
Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9132DbABoardDescLib.c =
| 11 +++++++++++
Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0Mc=
BinBoardDescLib.c | 11 +++++++++++
Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.c =
| 2 ++
8 files changed, 67 insertions(+)

diff --git a/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.inf=
b/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.inf
index b63e9b6325..398baebcf5 100644
--- a/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.inf
+++ b/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.inf
@@ -26,6 +26,7 @@
Silicon/Marvell/Marvell.dec=0D
=0D
[LibraryClasses]=0D
+ ArmadaBoardDescLib=0D
ArmadaIcuLib=0D
ArmSmcLib=0D
ComPhyLib=0D
diff --git a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h b/Silicon=
/Marvell/Include/Library/ArmadaBoardDescLib.h
index 80c55eb3a7..6dc296371d 100644
--- a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
+++ b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
@@ -11,6 +11,15 @@
#include <Library/ArmadaSoCDescLib.h>=0D
#include <Library/MvGpioLib.h>=0D
=0D
+//=0D
+// General purpose routine for per-board initalization=0D
+//=0D
+EFI_STATUS=0D
+EFIAPI=0D
+ArmadaBoardInit (=0D
+ VOID=0D
+ );=0D
+=0D
//=0D
// COMPHY controllers per-board description=0D
//=0D
diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada7=
0x0DbBoardDescLib.c b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLi=
b/Armada70x0DbBoardDescLib.c
index b0b6855bbb..33e40d0bd9 100644
--- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBo=
ardDescLib.c
+++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBo=
ardDescLib.c
@@ -16,6 +16,17 @@
#include <Library/MvGpioLib.h>=0D
#include <Library/UefiBootServicesTableLib.h>=0D
=0D
+//=0D
+// General purpose routine for per-board initalization=0D
+//=0D
+EFI_STATUS=0D
+ArmadaBoardInit (=0D
+ VOID=0D
+ )=0D
+{=0D
+ return EFI_SUCCESS;=0D
+}=0D
+=0D
//=0D
// GPIO Expander=0D
//=0D
diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada8=
0x0DbBoardDescLib.c b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLi=
b/Armada80x0DbBoardDescLib.c
index 2b119fa2a7..e4ee2e04ae 100644
--- a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBo=
ardDescLib.c
+++ b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBo=
ardDescLib.c
@@ -16,6 +16,17 @@
#include <Library/MvGpioLib.h>=0D
#include <Library/UefiBootServicesTableLib.h>=0D
=0D
+//=0D
+// General purpose routine for per-board initalization=0D
+//=0D
+EFI_STATUS=0D
+ArmadaBoardInit (=0D
+ VOID=0D
+ )=0D
+{=0D
+ return EFI_SUCCESS;=0D
+}=0D
+=0D
//=0D
// GPIO Expanders=0D
//=0D
diff --git a/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDe=
scLib.c b/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescL=
ib.c
index 2755600f53..d53c7086a1 100644
--- a/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c
+++ b/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c
@@ -16,6 +16,17 @@
#include <Library/MvGpioLib.h>=0D
#include <Library/UefiBootServicesTableLib.h>=0D
=0D
+//=0D
+// General purpose routine for per-board initalization=0D
+//=0D
+EFI_STATUS=0D
+ArmadaBoardInit (=0D
+ VOID=0D
+ )=0D
+{=0D
+ return EFI_SUCCESS;=0D
+}=0D
+=0D
//=0D
// GPIO Expander=0D
//=0D
diff --git a/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9132DbABoardDe=
scLib.c b/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9132DbABoardDescL=
ib.c
index d2846dde30..920c7436c2 100644
--- a/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9132DbABoardDescLib.c
+++ b/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9132DbABoardDescLib.c
@@ -16,6 +16,17 @@
#include <Library/MvGpioLib.h>=0D
#include <Library/UefiBootServicesTableLib.h>=0D
=0D
+//=0D
+// General purpose routine for per-board initalization=0D
+//=0D
+EFI_STATUS=0D
+ArmadaBoardInit (=0D
+ VOID=0D
+ )=0D
+{=0D
+ return EFI_SUCCESS;=0D
+}=0D
+=0D
//=0D
// GPIO Expander=0D
//=0D
diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/=
Armada80x0McBinBoardDescLib.c b/Platform/SolidRun/Armada80x0McBin/Armada80x=
0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c
index ebe7386df1..b11195c5a1 100644
--- a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada8=
0x0McBinBoardDescLib.c
+++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada8=
0x0McBinBoardDescLib.c
@@ -15,6 +15,17 @@
#include <Library/MemoryAllocationLib.h>=0D
#include <Library/UefiBootServicesTableLib.h>=0D
=0D
+//=0D
+// General purpose routine for per-board initalization=0D
+//=0D
+EFI_STATUS=0D
+ArmadaBoardInit (=0D
+ VOID=0D
+ )=0D
+{=0D
+ return EFI_SUCCESS;=0D
+}=0D
+=0D
//=0D
// GPIO Expander=0D
//=0D
diff --git a/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.c b=
/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.c
index 927abb9400..78ad1c8a7a 100644
--- a/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.c
+++ b/Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.c
@@ -110,6 +110,8 @@ ArmadaPlatInitDxeEntryPoint (
UtmiPhyInit ();=0D
MppInitialize ();=0D
ArmadaIcuInitialize ();=0D
+ Status =3D ArmadaBoardInit ();=0D
+ ASSERT_EFI_ERROR (Status);=0D
=0D
/*=0D
* Enable EL3 PMU interrupt handler and=0D
--=20
2.29.0