From: Jan Dąbroś jsd@semihalf.com
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com --- Platforms/Marvell/Armada/Apn806.dsc | 16 +++++++++++++ Platforms/Marvell/Armada/Armada.dsc.inc | 1 + Platforms/Marvell/Armada/Armada7040_rz.dsc | 28 ++++++++++++++++++++++ .../Armada/Library/Armada7040Lib/Armada7040Lib.c | 2 ++ .../Armada/Library/Armada7040Lib/Armada7040Lib.inf | 2 ++ 5 files changed, 49 insertions(+)
diff --git a/Platforms/Marvell/Armada/Apn806.dsc b/Platforms/Marvell/Armada/Apn806.dsc index 62edf69..d3c73cf 100644 --- a/Platforms/Marvell/Armada/Apn806.dsc +++ b/Platforms/Marvell/Armada/Apn806.dsc @@ -46,3 +46,19 @@ FLASH_DEFINITION = OpenPlatformPkg/Platforms/Marvell/Armada/Armada7040.fdf
!include Armada.dsc.inc + +################################################################################ +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +################################################################################ +[PcdsFixedAtBuild.common] + # MPP + gMarvellTokenSpaceGuid.PcdMppChipCount|1 + + # APN806-Z1 MPP SET + gMarvellTokenSpaceGuid.PcdChip0MppReverseFlag|TRUE + gMarvellTokenSpaceGuid.PcdChip0MppBaseAddress|0xF06F008C + gMarvellTokenSpaceGuid.PcdChip0MppPinCount|16 + gMarvellTokenSpaceGuid.PcdChip0MppSel0|{ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0 } + gMarvellTokenSpaceGuid.PcdChip0MppSel1|{ 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } diff --git a/Platforms/Marvell/Armada/Armada.dsc.inc b/Platforms/Marvell/Armada/Armada.dsc.inc index 027c95f..b5108d9 100644 --- a/Platforms/Marvell/Armada/Armada.dsc.inc +++ b/Platforms/Marvell/Armada/Armada.dsc.inc @@ -31,6 +31,7 @@ # [LibraryClasses.common] ArmPlatformLib|OpenPlatformPkg/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.inf + MppLib|OpenPlatformPkg/Platforms/Marvell/Library/MppLib/MppLib.inf
!if $(TARGET) == RELEASE DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf diff --git a/Platforms/Marvell/Armada/Armada7040_rz.dsc b/Platforms/Marvell/Armada/Armada7040_rz.dsc index 5510c85..8627885 100644 --- a/Platforms/Marvell/Armada/Armada7040_rz.dsc +++ b/Platforms/Marvell/Armada/Armada7040_rz.dsc @@ -46,3 +46,31 @@ FLASH_DEFINITION = OpenPlatformPkg/Platforms/Marvell/Armada/Armada7040.fdf
!include Armada.dsc.inc + +################################################################################ +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +################################################################################ +[PcdsFixedAtBuild.common] + #MPP + gMarvellTokenSpaceGuid.PcdMppChipCount|2 + + # APN806-Z1 MPP SET + gMarvellTokenSpaceGuid.PcdChip0MppReverseFlag|TRUE + gMarvellTokenSpaceGuid.PcdChip0MppBaseAddress|0xF06F008C + gMarvellTokenSpaceGuid.PcdChip0MppPinCount|16 + gMarvellTokenSpaceGuid.PcdChip0MppSel0|{ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0 } + gMarvellTokenSpaceGuid.PcdChip0MppSel1|{ 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } + + # CP110 MPP SET - Router configuration + gMarvellTokenSpaceGuid.PcdChip1MppReverseFlag|FALSE + gMarvellTokenSpaceGuid.PcdChip1MppBaseAddress|0xF2440000 + gMarvellTokenSpaceGuid.PcdChip1MppPinCount|64 + gMarvellTokenSpaceGuid.PcdChip1MppSel0|{ 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 } + gMarvellTokenSpaceGuid.PcdChip1MppSel1|{ 0x3, 0x3, 0x0, 0x3, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0 } + gMarvellTokenSpaceGuid.PcdChip1MppSel2|{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0xA } + gMarvellTokenSpaceGuid.PcdChip1MppSel3|{ 0xA, 0x0, 0x7, 0x0, 0x7, 0x0, 0x6, 0x2, 0x2, 0x0 } + gMarvellTokenSpaceGuid.PcdChip1MppSel4|{ 0x7, 0x7, 0x8, 0x8, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 } + gMarvellTokenSpaceGuid.PcdChip1MppSel5|{ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xE, 0xE, 0xE, 0xE } + gMarvellTokenSpaceGuid.PcdChip1MppSel6|{ 0xE, 0xE, 0xE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } diff --git a/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.c b/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.c index 1e83afe..2a34455 100644 --- a/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.c +++ b/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.c @@ -14,6 +14,7 @@
#include <Library/ArmLib.h> #include <Library/ArmPlatformLib.h> +#include <Library/MppLib.h> #include <Ppi/ArmMpCoreInfo.h>
@@ -92,6 +93,7 @@ ArmPlatformInitialize (
//TODO: Add basic platfrom initialization
+ MppInitialize (); return RETURN_SUCCESS; }
diff --git a/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.inf b/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.inf index a4a9107..f586e65 100644 --- a/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.inf +++ b/Platforms/Marvell/Armada/Library/Armada7040Lib/Armada7040Lib.inf @@ -24,11 +24,13 @@ MdeModulePkg/MdeModulePkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec + OpenPlatformPkg/Platforms/Marvell/Marvell.dec
[LibraryClasses] ArmLib DebugLib MemoryAllocationLib + MppLib
[Sources.common] Armada7040Lib.c