diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-28 21:34:30 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-28 21:34:30 +0000 |
commit | cb0f9ff1aec89b6524a93d4a8a8e539a4591f998 (patch) | |
tree | 2548fb3b3d03547dae07fd50fa3531afa0cf2fe8 /BeagleBoardPkg/Library | |
parent | a3f98646f68239bf9c577b24689bc69cbcde1b47 (diff) | |
download | edk2-platforms-cb0f9ff1aec89b6524a93d4a8a8e539a4591f998.tar.xz |
Remove items moved to OMAP350 Package
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9855 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BeagleBoardPkg/Library')
10 files changed, 3 insertions, 560 deletions
diff --git a/BeagleBoardPkg/Library/BeagleBoardSystemLib/BeagleBoardSystemLib.inf b/BeagleBoardPkg/Library/BeagleBoardSystemLib/BeagleBoardSystemLib.inf index 2d00e21e68..0ba46d6cc6 100644 --- a/BeagleBoardPkg/Library/BeagleBoardSystemLib/BeagleBoardSystemLib.inf +++ b/BeagleBoardPkg/Library/BeagleBoardSystemLib/BeagleBoardSystemLib.inf @@ -30,6 +30,7 @@ MdePkg/MdePkg.dec
EmbeddedPkg/EmbeddedPkg.dec
ArmPkg/ArmPkg.dec
+ Omap35xxPkg/Omap35xxPkg.dec
BeagleBoardPkg/BeagleBoardPkg.dec
[LibraryClasses]
diff --git a/BeagleBoardPkg/Library/BeagleBoardTimerLib/BeagleBoardTimerLib.inf b/BeagleBoardPkg/Library/BeagleBoardTimerLib/BeagleBoardTimerLib.inf deleted file mode 100644 index 0af60dccc0..0000000000 --- a/BeagleBoardPkg/Library/BeagleBoardTimerLib/BeagleBoardTimerLib.inf +++ /dev/null @@ -1,45 +0,0 @@ -#/** @file
-# Timer library implementation
-#
-# A non-functional instance of the Timer Library that can be used as a template
-# for the implementation of a functional timer library instance. This library instance can
-# also be used to test build DXE, Runtime, DXE SAL, and DXE SMM modules that require timer
-# services as well as EBC modules that require timer services
-# Copyright (c) 2007, Intel Corporation.
-#
-# All rights reserved. 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.
-#
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = BeagleBoardTimerLib
- FILE_GUID = fe1d7183-9abb-42ce-9a3b-36d7c6a8959f
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = TimerLib
-
-[Sources.common]
- TimerLib.c
-
-[Packages]
- BeagleBoardPkg/BeagleBoardPkg.dec
- MdePkg/MdePkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
-
-[LibraryClasses]
- DebugLib
- OmapLib
- IoLib
-
-[Pcd]
- gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFreqencyInHz
- gEmbeddedTokenSpaceGuid.PcdEmbeddedFdPerformanceCounterPeriodInNanoseconds
- gBeagleBoardTokenSpaceGuid.PcdBeagleFreeTimer
-
diff --git a/BeagleBoardPkg/Library/BeagleBoardTimerLib/TimerLib.c b/BeagleBoardPkg/Library/BeagleBoardTimerLib/TimerLib.c deleted file mode 100755 index 1b9a5bac4f..0000000000 --- a/BeagleBoardPkg/Library/BeagleBoardTimerLib/TimerLib.c +++ /dev/null @@ -1,102 +0,0 @@ -/** @file
-
- Copyright (c) 2008-2009, Apple Inc. All rights reserved.
-
- All rights reserved. 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.
-
-**/
-
-#include <Base.h>
-
-#include <Library/BaseLib.h>
-#include <Library/TimerLib.h>
-#include <Library/DebugLib.h>
-#include <Library/PcdLib.h>
-#include <Library/IoLib.h>
-#include <Library/OmapLib.h>
-
-#include <Omap3530/Omap3530.h>
-
-UINTN
-EFIAPI
-MicroSecondDelay (
- IN UINTN MicroSeconds
- )
-{
- UINT64 NanoSeconds;
-
- NanoSeconds = MultU64x32(MicroSeconds, 1000);
-
- while (NanoSeconds > (UINTN)-1) {
- NanoSecondDelay((UINTN)-1);
- NanoSeconds -= (UINTN)-1;
- }
-
- NanoSecondDelay(NanoSeconds);
-
- return MicroSeconds;
-}
-
-UINTN
-EFIAPI
-NanoSecondDelay (
- IN UINTN NanoSeconds
- )
-{
- UINT32 Delay;
- UINT32 StartTime;
- UINT32 CurrentTime;
- UINT32 ElapsedTime;
- UINT32 TimerCountRegister;
-
- Delay = (NanoSeconds / PcdGet32(PcdEmbeddedFdPerformanceCounterPeriodInNanoseconds)) + 1;
-
- TimerCountRegister = TimerBase(PcdGet32(PcdBeagleFreeTimer)) + GPTIMER_TCRR;
-
- StartTime = MmioRead32(TimerCountRegister);
-
- do
- {
- CurrentTime = MmioRead32(TimerCountRegister);
- ElapsedTime = CurrentTime - StartTime;
- } while (ElapsedTime < Delay);
-
- NanoSeconds = ElapsedTime * PcdGet32(PcdEmbeddedFdPerformanceCounterPeriodInNanoseconds);
-
- return NanoSeconds;
-}
-
-UINT64
-EFIAPI
-GetPerformanceCounter (
- VOID
- )
-{
- return (UINT64)MmioRead32(TimerBase(PcdGet32(PcdBeagleFreeTimer)) + GPTIMER_TCRR);
-}
-
-UINT64
-EFIAPI
-GetPerformanceCounterProperties (
- OUT UINT64 *StartValue, OPTIONAL
- OUT UINT64 *EndValue OPTIONAL
- )
-{
- if (StartValue != NULL) {
- // Timer starts with the reload value
- *StartValue = (UINT64)MmioRead32(TimerBase(PcdGet32(PcdBeagleFreeTimer)) + GPTIMER_TLDR);
- }
-
- if (EndValue != NULL) {
- // Timer counts up to 0xFFFFFFFF
- *EndValue = 0xFFFFFFFF;
- }
-
- return PcdGet64(PcdEmbeddedPerformanceCounterFreqencyInHz);
-}
diff --git a/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf b/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf index a41b0a540a..6d9752a1ef 100644 --- a/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf +++ b/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf @@ -29,7 +29,7 @@ [Packages] MdePkg/MdePkg.dec EmbeddedPkg/EmbeddedPkg.dec - BeagleBoardPkg/BeagleBoardPkg.dec + Omap35xxPkg/Omap35xxPkg.dec [LibraryClasses] DebugLib @@ -37,5 +37,5 @@ OmapLib [FixedPcd] - gBeagleBoardTokenSpaceGuid.PcdBeagleConsoleUart + gOmap35xxTokenSpaceGuid.PcdBeagleConsoleUart diff --git a/BeagleBoardPkg/Library/OmapLib/OmapLib.c b/BeagleBoardPkg/Library/OmapLib/OmapLib.c deleted file mode 100644 index 7464b2e74a..0000000000 --- a/BeagleBoardPkg/Library/OmapLib/OmapLib.c +++ /dev/null @@ -1,83 +0,0 @@ -/** @file
-
- Copyright (c) 2008-2009, Apple Inc. All rights reserved.
-
- All rights reserved. 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.
-
-**/
-
-#include <Base.h>
-#include <Library/DebugLib.h>
-#include <Library/OmapLib.h>
-#include <Omap3530/Omap3530.h>
-
-UINT32
-GpioBase (
- IN UINTN Port
- )
-{
- switch (Port) {
- case 1: return GPIO1_BASE;
- case 2: return GPIO2_BASE;
- case 3: return GPIO3_BASE;
- case 4: return GPIO4_BASE;
- case 5: return GPIO5_BASE;
- case 6: return GPIO6_BASE;
- default: ASSERT(FALSE); return 0;
- }
-}
-
-UINT32
-TimerBase (
- IN UINTN Timer
- )
-{
- switch (Timer) {
- case 1: return GPTIMER1_BASE;
- case 2: return GPTIMER2_BASE;
- case 3: return GPTIMER3_BASE;
- case 4: return GPTIMER4_BASE;
- case 5: return GPTIMER5_BASE;
- case 6: return GPTIMER6_BASE;
- case 7: return GPTIMER7_BASE;
- case 8: return GPTIMER8_BASE;
- case 9: return GPTIMER9_BASE;
- case 10: return GPTIMER10_BASE;
- case 11: return GPTIMER11_BASE;
- case 12: return GPTIMER12_BASE;
- default: return 0;
- }
-}
-
-UINTN
-InterruptVectorForTimer (
- IN UINTN Timer
- )
-{
- if ((Timer < 1) || (Timer > 12)) {
- ASSERT(FALSE);
- return 0xFFFFFFFF;
- }
-
- return 36 + Timer;
-}
-
-UINT32
-UartBase (
- IN UINTN Uart
- )
-{
- switch (Uart) {
- case 1: return UART1_BASE;
- case 2: return UART2_BASE;
- case 3: return UART3_BASE;
- default: ASSERT(FALSE); return 0;
- }
-}
-
diff --git a/BeagleBoardPkg/Library/OmapLib/OmapLib.inf b/BeagleBoardPkg/Library/OmapLib/OmapLib.inf deleted file mode 100644 index cc48ecd216..0000000000 --- a/BeagleBoardPkg/Library/OmapLib/OmapLib.inf +++ /dev/null @@ -1,37 +0,0 @@ -#/** @file
-#
-# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
-# All rights reserved. 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.
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = OmapLib
- FILE_GUID = d035f5c2-1b92-4746-9f6c-5ff6202970df
- MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
- LIBRARY_CLASS = OmapLib
-
-[Sources.common]
- OmapLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
- BeagleBoardPkg/BeagleBoardPkg.dec
-
-[LibraryClasses]
- DebugLib
-
-[Protocols]
-
-[Guids]
-
-[Pcd]
diff --git a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c b/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c deleted file mode 100644 index 9c427e5c65..0000000000 --- a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c +++ /dev/null @@ -1,84 +0,0 @@ -/** @file
- Template library implementation to support ResetSystem Runtime call.
-
- Fill in the templates with what ever makes you system reset.
-
-
- Copyright (c) 2008-2009, Apple Inc. All rights reserved.
-
- All rights reserved. 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.
-
-**/
-
-
-#include <PiDxe.h>
-
-#include <Library/PcdLib.h>
-#include <Library/ArmLib.h>
-#include <Library/CacheMaintenanceLib.h>
-#include <Library/DebugLib.h>
-#include <Library/EfiResetSystemLib.h>
-
-#include <Library/BeagleBoardSystemLib.h>
-
-/**
- Resets the entire platform.
-
- @param ResetType The type of reset to perform.
- @param ResetStatus The status code for the reset.
- @param DataSize The size, in bytes, of WatchdogData.
- @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
- EfiResetShutdown the data buffer starts with a Null-terminated
- Unicode string, optionally followed by additional binary data.
-
-**/
-EFI_STATUS
-EFIAPI
-LibResetSystem (
- IN EFI_RESET_TYPE ResetType,
- IN EFI_STATUS ResetStatus,
- IN UINTN DataSize,
- IN CHAR16 *ResetData OPTIONAL
- )
-{
- if (ResetData != NULL) {
- DEBUG((EFI_D_ERROR, "%s", ResetData));
- }
-
- //Shutdown EFI services.
- ShutdownEfi();
-
- //Reset the sytem.
- ResetSystem(ResetType);
-
- // If the reset didn't work, return an error.
- return EFI_DEVICE_ERROR;
-}
-
-
-
-/**
- Initialize any infrastructure required for LibResetSystem () to function.
-
- @param ImageHandle The firmware allocated handle for the EFI image.
- @param SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-
-**/
-EFI_STATUS
-EFIAPI
-LibInitializeResetSystem (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- return EFI_SUCCESS;
-}
-
diff --git a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.inf b/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.inf deleted file mode 100644 index eec93d68f3..0000000000 --- a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.inf +++ /dev/null @@ -1,40 +0,0 @@ -#/** @file
-# Reset System lib to make it easy to port new platforms
-#
-# Copyright (c) 2008, Apple Inc.
-#
-# All rights reserved. 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.
-#
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = BeagleBoardResetSystemLib
- FILE_GUID = 781371a2-3fdd-41d4-96a1-7b34cbc9e895
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = EfiResetSystemLib
-
-
-[Sources.common]
- ResetSystemLib.c
-
-[Packages]
- BeagleBoardPkg/BeagleBoardPkg.dec
- ArmPkg/ArmPkg.dec
- MdePkg/MdePkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
-
-[Pcd.common]
- gArmTokenSpaceGuid.PcdCpuResetAddress
- gEmbeddedTokenSpaceGuid.PcdEmbeddedFdBaseAddress
-
-[LibraryClasses]
- DebugLib
- BeagleBoardSystemLib
diff --git a/BeagleBoardPkg/Library/SerialPortLib/SerialPortLib.c b/BeagleBoardPkg/Library/SerialPortLib/SerialPortLib.c deleted file mode 100644 index 0509deb8ab..0000000000 --- a/BeagleBoardPkg/Library/SerialPortLib/SerialPortLib.c +++ /dev/null @@ -1,124 +0,0 @@ -/** @file
- Serial I/O Port library functions with no library constructor/destructor
-
-
- Copyright (c) 2008-2009, Apple Inc. All rights reserved.
-
- All rights reserved. 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.
-
-**/
-
-#include <Base.h>
-#include <Library/DebugLib.h>
-#include <Library/SerialPortLib.h>
-#include <Library/PcdLib.h>
-#include <Library/IoLib.h>
-#include <Library/OmapLib.h>
-#include <Omap3530/Omap3530.h>
-
-/*
-
- Programmed hardware of Serial port.
-
- @return Always return EFI_UNSUPPORTED.
-
-**/
-RETURN_STATUS
-EFIAPI
-SerialPortInitialize (
- VOID
- )
-{
- // assume assembly code at reset vector has setup UART
- return RETURN_SUCCESS;
-}
-
-/**
- Write data to serial device.
-
- @param Buffer Point of data buffer which need to be writed.
- @param NumberOfBytes Number of output bytes which are cached in Buffer.
-
- @retval 0 Write data failed.
- @retval !0 Actual number of bytes writed to serial device.
-
-**/
-UINTN
-EFIAPI
-SerialPortWrite (
- IN UINT8 *Buffer,
- IN UINTN NumberOfBytes
-)
-{
- UINT32 LSR = UartBase(PcdGet32(PcdBeagleConsoleUart)) + UART_LSR_REG;
- UINT32 THR = UartBase(PcdGet32(PcdBeagleConsoleUart)) + UART_THR_REG;
- UINTN Count;
-
- for (Count = 0; Count < NumberOfBytes; Count++, Buffer++) {
- while ((MmioRead8(LSR) & UART_LSR_TX_FIFO_E_MASK) == UART_LSR_TX_FIFO_E_NOT_EMPTY);
- MmioWrite8(THR, *Buffer);
- }
-
- return NumberOfBytes;
-}
-
-
-/**
- Read data from serial device and save the datas in buffer.
-
- @param Buffer Point of data buffer which need to be writed.
- @param NumberOfBytes Number of output bytes which are cached in Buffer.
-
- @retval 0 Read data failed.
- @retval !0 Aactual number of bytes read from serial device.
-
-**/
-UINTN
-EFIAPI
-SerialPortRead (
- OUT UINT8 *Buffer,
- IN UINTN NumberOfBytes
-)
-{
- UINT32 LSR = UartBase(PcdGet32(PcdBeagleConsoleUart)) + UART_LSR_REG;
- UINT32 RBR = UartBase(PcdGet32(PcdBeagleConsoleUart)) + UART_RBR_REG;
- UINTN Count;
-
- for (Count = 0; Count < NumberOfBytes; Count++, Buffer++) {
- while ((MmioRead8(LSR) & UART_LSR_RX_FIFO_E_MASK) == UART_LSR_RX_FIFO_E_EMPTY);
- *Buffer = MmioRead8(RBR);
- }
-
- return NumberOfBytes;
-}
-
-
-/**
- Check to see if any data is avaiable to be read from the debug device.
-
- @retval EFI_SUCCESS At least one byte of data is avaiable to be read
- @retval EFI_NOT_READY No data is avaiable to be read
- @retval EFI_DEVICE_ERROR The serial device is not functioning properly
-
-**/
-BOOLEAN
-EFIAPI
-SerialPortPoll (
- VOID
- )
-{
- UINT32 LSR = UartBase(PcdGet32(PcdBeagleConsoleUart)) + UART_LSR_REG;
-
- if ((MmioRead8(LSR) & UART_LSR_RX_FIFO_E_MASK) == UART_LSR_RX_FIFO_E_NOT_EMPTY) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
diff --git a/BeagleBoardPkg/Library/SerialPortLib/SerialPortLib.inf b/BeagleBoardPkg/Library/SerialPortLib/SerialPortLib.inf deleted file mode 100644 index 9b5ba4975c..0000000000 --- a/BeagleBoardPkg/Library/SerialPortLib/SerialPortLib.inf +++ /dev/null @@ -1,43 +0,0 @@ -#/** @file
-# EDK Serial port lib
-#
-# Copyright (c) 2009, Apple Inc.
-#
-# All rights reserved. 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.
-#
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = BeagleBoardSerialPortLib
- FILE_GUID = 97546cbd-c0ff-4c48-ab0b-e4f58862acd3
- MODULE_TYPE = PEIM
- VERSION_STRING = 1.0
- LIBRARY_CLASS = SerialPortLib
-
-
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-
-[Sources.common]
- SerialPortLib.c
-
-[LibraryClasses]
- DebugLib
- IoLib
- OmapLib
-
-[Packages]
- MdePkg/MdePkg.dec
- BeagleBoardPkg/BeagleBoardPkg.dec
-
-[FixedPcd]
- gBeagleBoardTokenSpaceGuid.PcdBeagleConsoleUart
-
|