From patchwork Fri Sep 5 11:56:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 36818 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C7931202E4 for ; Fri, 5 Sep 2014 11:57:27 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id va2sf59111705obc.7 for ; Fri, 05 Sep 2014 04:57:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=aO/8jFUtPmJLh2o5/sdKhrq97C1QupnjbjU0xAIvV5s=; b=gVotQgqGVlU5fPKrKlR77VTpvvaNpbBVxtUYfVJGSiLhG4lWG6kRkq+b3y+eZiqstL MxkU102yxA/H48S/lwkfvsOLv/hzHWaBvj5i47bpEQnUUh8dWhcFVAZmPGxKLTf/A+QN mpABuK2JOY6gWA8v02fAv6BgDz/X6b39rvedv4VhwHz5570I5WVECmIpkj1AQBad7zZD QL8u3OEAjsQyC/gxbbAWvGFrCPW05gXZoW9pVO14R+SSh185+fZFw6UuofX1JdTnTsE/ bptZPGSKXXngjPRcUKDHOQHvsziDkRkFeaM21iFnduHBE1Wp4PYeS/ZQ8KR/BuKAbpoL 6gvw== X-Gm-Message-State: ALoCoQmOCsTQIAbVRGV6eD7oEiI5yDQC6EDlln2nSCR07y0aTYvLFD7SMUFxbcGsx+5u7zcyuIiG X-Received: by 10.182.135.194 with SMTP id pu2mr6099607obb.35.1409918247419; Fri, 05 Sep 2014 04:57:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.211 with SMTP id z77ls729949qgz.54.gmail; Fri, 05 Sep 2014 04:57:27 -0700 (PDT) X-Received: by 10.220.200.195 with SMTP id ex3mr172933vcb.63.1409918247261; Fri, 05 Sep 2014 04:57:27 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id p18si955748vdg.54.2014.09.05.04.57.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 04:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id la4so12371921vcb.1 for ; Fri, 05 Sep 2014 04:57:27 -0700 (PDT) X-Received: by 10.52.94.108 with SMTP id db12mr8177720vdb.8.1409918247177; Fri, 05 Sep 2014 04:57:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp71041vcb; Fri, 5 Sep 2014 04:57:26 -0700 (PDT) X-Received: by 10.50.111.112 with SMTP id ih16mr3827645igb.30.1409918244510; Fri, 05 Sep 2014 04:57:24 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id z7si4931191igl.22.2014.09.05.04.57.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 04:57:24 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XPs8j-0002fc-4Q; Fri, 05 Sep 2014 11:57:17 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XPs8h-0002fL-SA for edk2-devel@lists.sourceforge.net; Fri, 05 Sep 2014 11:57:15 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.171 as permitted sender) client-ip=74.125.82.171; envelope-from=ard.biesheuvel@linaro.org; helo=mail-we0-f171.google.com; Received: from mail-we0-f171.google.com ([74.125.82.171]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XPs8g-0002yH-SD for edk2-devel@lists.sourceforge.net; Fri, 05 Sep 2014 11:57:15 +0000 Received: by mail-we0-f171.google.com with SMTP id u56so11703564wes.30 for ; Fri, 05 Sep 2014 04:57:08 -0700 (PDT) X-Received: by 10.194.59.18 with SMTP id v18mr14503624wjq.64.1409918226915; Fri, 05 Sep 2014 04:57:06 -0700 (PDT) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id dc9sm1758798wib.5.2014.09.05.04.57.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 04:57:06 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com Date: Fri, 5 Sep 2014 13:56:36 +0200 Message-Id: <1409918214-29584-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1409918214-29584-1-git-send-email-ard.biesheuvel@linaro.org> References: <1409918214-29584-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1XPs8g-0002yH-SD Cc: peter.maydell@linaro.org, ilias.biris@linaro.org, christoffer.dall@linaro.org Subject: [edk2] [PATCH v7 06/24] ArmPkg: add ArmGenericTimerCounterLib interface X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 Acked-by: Laszlo Ersek --- ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 ArmPkg/Include/Library/ArmGenericTimerCounterLib.h 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.
+ Copyright (c) 2014, Linaro Ltd. 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. + +**/ + +#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