diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-01 15:30:01 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-01 15:30:01 +0000 |
commit | 5cc45b70c310f853f28b2351f3d93109ff858dcf (patch) | |
tree | 22917c5dfa20a9f553c1adda9ce6efc04b722dc7 /ArmPlatformPkg/ArmVExpressPkg | |
parent | 7fb54d9d04f52e22f6df16e0035c565c3dce7bd4 (diff) | |
download | edk2-platforms-5cc45b70c310f853f28b2351f3d93109ff858dcf.tar.xz |
ArmPkg: Move ARM Platform drivers from ArmPkg/Drivers/ to ArmPlatformPkg/Drivers/
The idea is to keep ArmPkg responsible for the ARM architectural modules and ArmPlatformPkg
the ARM development platform packages (with their respective drivers).
ArmPlatformPkg: Reduce driver dependency on ArmPlatform.h
- Move some driver definitions from C-Macro to PCD values
- Unify PCD driver namespace
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11956 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/ArmVExpressPkg')
11 files changed, 56 insertions, 58 deletions
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc index 48c64b1cba..303c0183af 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc @@ -95,13 +95,13 @@ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf # ARM PL310 L2 Cache Driver - L2X0CacheLib|ArmPkg/Drivers/PL310L2Cache/PL310L2CacheSec.inf + L2X0CacheLib|ArmPlatformPkg/Drivers/PL310L2Cache/PL310L2CacheSec.inf # ARM PL354 SMC Driver - PL354SmcLib|ArmPkg/Drivers/PL35xSmc/PL354SmcSec.inf + PL35xSmcLib|ArmPlatformPkg/Drivers/PL35xSmc/PL35xSmc.inf # ARM PL341 DMC Driver - PL341DmcLib|ArmPkg/Drivers/PL34xDmc/PL341Dmc.inf + PL341DmcLib|ArmPlatformPkg/Drivers/PL34xDmc/PL341Dmc.inf # ARM PL301 Axi Driver - PL301AxiLib|ArmPkg/Drivers/PL301Axi/PL301Axi.inf + PL301AxiLib|ArmPlatformPkg/Drivers/PL301Axi/PL301Axi.inf # ARM PL011 UART Driver PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf @@ -392,27 +392,45 @@ # System Memory (1GB) gArmTokenSpaceGuid.PcdSystemMemoryBase|0x60000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x40000000 - - gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|1000000 - gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms - gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum|34 - + # # ARM Pcds # gArmTokenSpaceGuid.PcdArmUncachedMemoryMask|0x0000000040000000 - + # # ARM PrimeCell # - gArmTokenSpaceGuid.PcdPL180SysMciRegAddress|0x10000048 - gArmTokenSpaceGuid.PcdPL180MciBaseAddress|0x10005000 - # - # ARM PL011 - Serial Terminal - # + ## SP804 Timer + gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|1000000 + gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms + gArmPlatformTokenSpaceGuid.PcdSP804TimerPeriodicInterruptNum|34 + gArmPlatformTokenSpaceGuid.PcdSP804TimerPeriodicBase|0x10011000 + gArmPlatformTokenSpaceGuid.PcdSP804TimerPerformanceBase|0x10012020 + gArmPlatformTokenSpaceGuid.PcdSP804TimerMetronomeBase|0x10012000 + + ## SP805 Watchdog - Motherboard Watchdog + gArmPlatformTokenSpaceGuid.PcdSP805WatchdogBase|0x1000F000 + ## SP805 Watchdog - CoreTile Watchdog + #gArmPlatformTokenSpaceGuid.PcdSP805WatchdogBase|0x100E5000 + + ## PL011 - Serial Terminal gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x10009000 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400 + + ## PL031 RealTimeClock + gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x10017000 + + ## PL111 Lcd + # PL111 CoreTile or Tuscan Standalone controller + gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x10020000 + # PL111 Versatile Express Motherboard controller + #gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1001F000 + + ## PL180 MMC/SD card controller + gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x10000048 + gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x10005000 # # ARM PL390 General Interrupt Controller @@ -532,7 +550,7 @@ # Multimedia Card Interface # EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf - ArmPkg/Drivers/PL180MciDxe/PL180MciDxe.inf + ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf # # FAT filesystem + GPT/MBR partitioning diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.fdf b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.fdf index 6781f5e974..3cdf9d5ef7 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.fdf +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.fdf @@ -187,7 +187,7 @@ READ_LOCK_STATUS = TRUE # Multimedia Card Interface # INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf - INF ArmPkg/Drivers/PL180MciDxe/PL180MciDxe.inf + INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf # # UEFI application (Shell Embedded Boot Loader) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec index 307e672cd0..12c57101b1 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec @@ -47,4 +47,5 @@ # # For a list of mode numbers look in LcdArmVExpress.c # - gArmVExpressTokenSpaceGuid.PcdPL111MaxMode|3|UINT32|0x00000003 + gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode|3|UINT32|0x00000003 + gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId|1|UINT32|0x00000004 diff --git a/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h b/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h index 171b0420d5..e11e9c7d19 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h +++ b/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h @@ -52,10 +52,10 @@ #define ARM_VE_SMB_PERIPH_SZ SIZE_64MB
// DRAM
-#define ARM_VE_DRAM_BASE 0x60000000
-#define ARM_VE_DRAM_SZ 0x40000000
+#define ARM_VE_DRAM_BASE PcdGet32 (PcdSystemMemoryBase)
+#define ARM_VE_DRAM_SZ PcdGet32 (PcdSystemMemorySize)
// Inside the DRAM we allocate a section for the VRAM (Video RAM)
-#define LCD_VRAM_CORE_TILE_BASE 0x64000000
+#define LCD_VRAM_CORE_TILE_BASE 0x64000000
// External AXI between daughterboards (Logic Tile)
#define ARM_VE_EXT_AXI_BASE 0xE0000000
@@ -99,18 +99,6 @@ //#define ARM_VE_L2x0_CTLR_BASE 0x1E00A000
/***********************************************************************************
- Select between Motherboard and Core Tile peripherals
-************************************************************************************/
-
-// Specify which PL111 to use
-//#define PL111_CLCD_BASE PL111_CLCD_MOTHERBOARD_BASE
-#define PL111_CLCD_BASE PL111_CLCD_CORE_TILE_BASE
-
-// Specify which Watchdog to use
-#define SP805_WDOG_BASE SP805_WDOG_MOTHERBOARD_BASE
-//#define SP805_WDOG_BASE SP805_WDOG_CORE_TILE_BASE
-
-/***********************************************************************************
Peripherals' misc settings
************************************************************************************/
@@ -130,16 +118,6 @@ #define ARM_VE_DECPROT_BIT_NMC_TZASC_LOCK (1 << 4)
#define ARM_VE_DECPROT_BIT_SMC_TZASC_LOCK (1 << 5)
-// PL031 RTC - Other settings
-#define PL031_PPM_ACCURACY 300000000
-
-// SP805 Watchdog - Other settings
-#define SP805_CLOCK_FREQUENCY 32000
-#define SP805_MAX_TICKS 0xFFFFFFFF
-
-// PL111 Lcd
-#define PL111_CLCD_CORE_TILE_VIDEO_MODE_OSC_ID 1
-
/***********************************************************************************
// EFI Memory Map in Permanent Memory (DRAM)
************************************************************************************/
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf index d78f631829..5670fab7c4 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf @@ -50,4 +50,7 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdStandalone + gArmTokenSpaceGuid.PcdSystemMemoryBase + gArmTokenSpaceGuid.PcdSystemMemorySize + gArmTokenSpaceGuid.PcdL2x0ControllerBase diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c index c72a5a4cba..17d09a605a 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c @@ -23,6 +23,8 @@ #include <Drivers/PL301Axi.h> #include <Drivers/SP804Timer.h> +#include <ArmPlatform.h> + #define SerialPrint(txt) SerialPortWrite ((UINT8*)(txt), AsciiStrLen(txt)+1); // DDR2 timings @@ -121,7 +123,7 @@ ArmPlatformBootRemapping ( /** Initialize controllers that must setup in the normal world - This function is called by the ArmPlatformPkg/Pei or ArmPlatformPkg/Pei/PlatformPeim + This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei in the PEI phase. **/ diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c index eed01ed7ef..7bfd679411 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c @@ -18,6 +18,8 @@ #include <Library/IoLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <ArmPlatform.h>
+
// Number of Virtual Memory Map Descriptors without a Logic Tile
#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 6
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Sec.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Sec.c index 2ac64a0160..46ca8eaac4 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Sec.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Sec.c @@ -21,6 +21,8 @@ #include <Drivers/PL310L2Cache.h> +#include <ArmPlatform.h> + /** Initialize the Secure peripherals and memory regions diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf index 01027cc271..5e06063185 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf @@ -31,6 +31,7 @@ [LibraryClasses] BaseLib + IoLib [Guids] diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c index 6ae5da9997..8198dfd5cd 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c @@ -195,7 +195,7 @@ LcdPlatformGetMaxMode ( // This could be because the specific implementation of PL111 has certain limitations.
// Set the maximum mode allowed
- return (PcdGet32(PcdPL111MaxMode));
+ return (PcdGet32(PcdPL111LcdMaxMode));
}
EFI_STATUS
@@ -221,7 +221,7 @@ LcdPlatformSetMode ( break;
case ARM_VE_DAUGHTERBOARD_1_SITE:
Function = SYS_CFG_OSC_SITE1;
- OscillatorId = PL111_CLCD_CORE_TILE_VIDEO_MODE_OSC_ID;
+ OscillatorId = (UINT32)PcdGet32(PcdPL111LcdVideoModeOscId);
break;
default:
return EFI_UNSUPPORTED;
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf index 6edca3ba09..eca42752b5 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf @@ -33,15 +33,6 @@ BaseLib ArmPlatformSysConfigLib -[Guids] - -[Protocols] - -[FeaturePcd] - -[FixedPcd.common] - gArmVExpressTokenSpaceGuid.PcdPL111MaxMode - -[Pcd.common] - -[Depex] +[Pcd] + gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode + gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId |