diff mbox

[edk2,v6,06/23] ArmPkg: add ArmGenericTimerCounterLib interface

Message ID 1409743096-14919-7-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel Sept. 3, 2014, 11:17 a.m. UTC
This introduces ArmGenericTimerCounterLib by adding the include file
ArmPkg/Include/Library/ArmGenericTimerCounterLib.h.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 85 ++++++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
diff mbox

Patch

diff --git a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
new file mode 100644
index 000000000000..6717ae370057
--- /dev/null
+++ b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
@@ -0,0 +1,85 @@ 
+/** @file
+
+  Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
+  Copyright (c) 2014, 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.
+
+**/
+
+#ifndef __ARM_GENERIC_TIMER_COUNTER_LIB_H__
+#define __ARM_GENERIC_TIMER_COUNTER_LIB_H__
+
+VOID
+EFIAPI
+ArmArchTimerEnableTimer (
+  VOID
+  );
+
+VOID
+EFIAPI
+ArmArchTimerDisableTimer (
+  VOID
+  );
+
+VOID
+EFIAPI
+ArmArchTimerSetTimerFreq (
+  IN   UINTN  FreqInHz
+  );
+
+UINTN
+EFIAPI
+ArmArchTimerGetTimerFreq (
+  VOID
+  );
+
+VOID
+EFIAPI
+ArmArchTimerSetTimerVal (
+  IN   UINTN   Val
+  );
+
+UINTN
+EFIAPI
+ArmArchTimerGetTimerVal (
+  VOID
+  );
+
+UINT64
+EFIAPI
+ArmArchTimerGetSystemCount (
+  VOID
+  );
+
+UINTN
+EFIAPI
+ArmArchTimerGetTimerCtrlReg (
+  VOID
+  );
+
+VOID
+EFIAPI
+ArmArchTimerSetTimerCtrlReg (
+  UINTN Val
+  );
+
+UINT64
+EFIAPI
+ArmArchTimerGetCompareVal (
+  VOID
+  );
+
+VOID
+EFIAPI
+ArmArchTimerSetCompareVal (
+  IN   UINT64   Val
+  );
+
+#endif