From patchwork Sat Jun 6 03:57:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Ulli Kroll X-Patchwork-Id: 6558871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8DDBDC0020 for ; Sat, 6 Jun 2015 04:02:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A507A207B4 for ; Sat, 6 Jun 2015 04:02:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D201A2071A for ; Sat, 6 Jun 2015 04:02:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z15Fh-00018X-Tw; Sat, 06 Jun 2015 03:58:33 +0000 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z15FS-00014B-8P for linux-arm-kernel@lists.infradead.org; Sat, 06 Jun 2015 03:58:19 +0000 Received: by wgme6 with SMTP id e6so68771695wgm.2 for ; Fri, 05 Jun 2015 20:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Rn/7uJpStmG1xXFqKUe+1rz0L5d72Qcns2HIsQfhwS0=; b=nPxSvSpUPeKsteXuewrl/b4rhzHSqSszivdlaKGGLeZd+UWIpQQ8tTDHNY63PCARGy 2V0/qBHuUiOEd27P3PVUv3GQFRsczcoKd//wMaSpvPnBmwd7cP/ng6ejT+A25pDcs74z ck1hRVcbHr9BYkvAQFtnPc+YB0PDZ2VMLlXmswx+6gkTPdQPmOPCjVCEfm6TmNBQDVug nh9cv19DxJIiv4tKvP8+4pWW7GNaMjaAR9AoDYxGb9nknVzrQ37HBVEzjdjksuVYpEQq UMmsXetR/S3mQRUhfZDymb0GnWAU+Psu9yXSjuACC9LfKTffKEdh2iBsJ9uDor92bpgX XrbA== X-Received: by 10.194.120.198 with SMTP id le6mr4626204wjb.133.1433563076222; Fri, 05 Jun 2015 20:57:56 -0700 (PDT) Received: from localhost ([89.204.135.80]) by mx.google.com with ESMTPSA id hn7sm609028wib.5.2015.06.05.20.57.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 20:57:55 -0700 (PDT) From: Hans Ulli Kroll To: linux-kernel@vger.kernel.org Subject: [PATCH 3/6] ARM:Gemini:add missing intr state and mask register Date: Sat, 6 Jun 2015 05:57:25 +0200 Message-Id: <1433563048-21922-4-git-send-email-ulli.kroll@googlemail.com> X-Mailer: git-send-email 2.4.2 In-Reply-To: <1433563048-21922-1-git-send-email-ulli.kroll@googlemail.com> References: <1433563048-21922-1-git-send-email-ulli.kroll@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150605_205818_491388_A571B2E6 X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Hans Ulli Kroll , linux-arm-kernel@lists.infradead.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For earch timer function we have intr state and mask register. Add control bits up/down counting for each timer Signed-off-by: Hans Ulli Kroll --- arch/arm/mach-gemini/time.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-gemini/time.c b/arch/arm/mach-gemini/time.c index 76e3ca7..a8604a3 100644 --- a/arch/arm/mach-gemini/time.c +++ b/arch/arm/mach-gemini/time.c @@ -28,6 +28,8 @@ #define TIMER_MATCH1(BASE_ADDR) (IO_ADDRESS(BASE_ADDR) + 0x08) #define TIMER_MATCH2(BASE_ADDR) (IO_ADDRESS(BASE_ADDR) + 0x0C) #define TIMER_CR(BASE_ADDR) (IO_ADDRESS(BASE_ADDR) + 0x30) +#define TIMER_INTR_STATE (IO_ADDRESS(GEMINI_TIMER_BASE) + 0x34) +#define TIMER_INTR_MASK (IO_ADDRESS(GEMINI_TIMER_BASE) + 0x38) #define TIMER_1_CR_ENABLE (1 << 0) #define TIMER_1_CR_CLOCK (1 << 1) @@ -38,6 +40,21 @@ #define TIMER_3_CR_ENABLE (1 << 6) #define TIMER_3_CR_CLOCK (1 << 7) #define TIMER_3_CR_INT (1 << 8) +#define TIMER_1_CR_UPDOWN (1 << 9) +#define TIMER_2_CR_UPDOWN (1 << 10) +#define TIMER_3_CR_UPDOWN (1 << 11) + +#define TIMER_1_INT_MATCH1 (1 << 0) +#define TIMER_1_INT_MATCH2 (1 << 1) +#define TIMER_1_INT_OVERFLOW (1 << 2) +#define TIMER_2_INT_MATCH1 (1 << 3) +#define TIMER_2_INT_MATCH2 (1 << 4) +#define TIMER_2_INT_OVERFLOW (1 << 5) +#define TIMER_3_INT_MATCH1 (1 << 6) +#define TIMER_3_INT_MATCH2 (1 << 7) +#define TIMER_3_INT_OVERFLOW (1 << 8) +#define TIMER_INT_ALL_MASK 0x1ff + static unsigned int tick_rate;