From patchwork Mon Jun 15 13:50:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 49869 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A86F0211FD for ; Mon, 15 Jun 2015 13:53:52 +0000 (UTC) Received: by wgbhy7 with SMTP id hy7sf12332452wgb.3 for ; Mon, 15 Jun 2015 06:53:52 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=4IyXT2uCZA8zVqpWesaxL5KLG6lJ1j1CDr5kOoyzP0M=; b=RU422yBQlAbcF0xJHYT7op+xkDGMFyzMqrK7+qxuwlWmcPTgKUoYC9EjhVZ4tPiqWT 6Cqhfr7+q2+u2r22TJi85asoPYm2LIzBMqme+RZf3GOE960NqikjHswXCQO2fXTtBYHb HUlpCF3EgW63dfayEQsWG2ZKn9VfIEW6BmREKrqW/Aam+tgs5Q3rf3FAU+Bm/D7OMBoE necih4P8GBlwrMdnlkDPVzTMfizjTMLCHFyAXmzm/rszxzG2BU5RllcABH95E4HW69k7 4UFswVCy5EIkaKlkh0yzeOOChTFGRQwPDcOcETaUDz9igeJVj8fg+H00CaHrJMYsiCtY V+Vw== X-Gm-Message-State: ALoCoQkxt/kZyFkzLxleRThfORiJGLLh7VBvuP9oOpeFweR5uLde8qXNGI+UYK5nJDZ3ZM/1rtib X-Received: by 10.180.97.9 with SMTP id dw9mr19760600wib.2.1434376432042; Mon, 15 Jun 2015 06:53:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.161 with SMTP id jp1ls822223lab.96.gmail; Mon, 15 Jun 2015 06:53:51 -0700 (PDT) X-Received: by 10.112.147.201 with SMTP id tm9mr399214lbb.40.1434376431879; Mon, 15 Jun 2015 06:53:51 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id xu7si10537759lbb.139.2015.06.15.06.53.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 06:53:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbwc1 with SMTP id wc1so2070349lbb.2 for ; Mon, 15 Jun 2015 06:53:51 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr27600212laa.106.1434376431798; Mon, 15 Jun 2015 06:53:51 -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.112.108.230 with SMTP id hn6csp1432323lbb; Mon, 15 Jun 2015 06:53:50 -0700 (PDT) X-Received: by 10.70.102.132 with SMTP id fo4mr48882603pdb.31.1434376430169; Mon, 15 Jun 2015 06:53:50 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id wq1si18029226pab.97.2015.06.15.06.53.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 06:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 1Z4Uo4-00014q-JZ; Mon, 15 Jun 2015 13:52:08 +0000 Received: from mail-lb0-f182.google.com ([209.85.217.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z4Un8-0000fZ-5T for linux-arm-kernel@lists.infradead.org; Mon, 15 Jun 2015 13:51:11 +0000 Received: by lbbti3 with SMTP id ti3so16480623lbb.1 for ; Mon, 15 Jun 2015 06:50:48 -0700 (PDT) X-Received: by 10.152.243.9 with SMTP id wu9mr26792580lac.63.1434376247696; Mon, 15 Jun 2015 06:50:47 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id og9sm2729625lbb.22.2015.06.15.06.50.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 06:50:46 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Mika Westerberg , Hartley Sweeten , Ryan Mallon Subject: [PATCH 4/5] ARM: ep93xx: switch clockevent to timer 3 Date: Mon, 15 Jun 2015 15:50:21 +0200 Message-Id: <1434376222-4587-5-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1434376222-4587-1-git-send-email-linus.walleij@linaro.org> References: <1434376222-4587-1-git-send-email-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150615_065110_429011_53EF787A X-CRM114-Status: GOOD ( 15.83 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.182 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.217.182 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Linus Walleij , 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@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.217.178 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 If we switch clock events to timer 3 we will have more bits to use and can sleep longer when using NO_HZ. Signed-off-by: Linus Walleij --- arch/arm/mach-ep93xx/timer-ep93xx.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c index 95d54ec769f6..9edaa754b689 100644 --- a/arch/arm/mach-ep93xx/timer-ep93xx.c +++ b/arch/arm/mach-ep93xx/timer-ep93xx.c @@ -77,12 +77,12 @@ static int ep93xx_clkevt_set_next_event(unsigned long next, EP93XX_TIMER123_CONTROL_CLKSEL; /* Clear timer */ - writel(tmode, EP93XX_TIMER1_CONTROL); + writel(tmode, EP93XX_TIMER3_CONTROL); /* Set next event */ - writel(next, EP93XX_TIMER1_LOAD); + writel(next, EP93XX_TIMER3_LOAD); writel(tmode | EP93XX_TIMER123_CONTROL_ENABLE, - EP93XX_TIMER1_CONTROL); + EP93XX_TIMER3_CONTROL); return 0; } @@ -91,7 +91,7 @@ static void ep93xx_clkevt_set_mode(enum clock_event_mode mode, struct clock_event_device *evt) { /* Disable timer */ - writel(0, EP93XX_TIMER1_CONTROL); + writel(0, EP93XX_TIMER3_CONTROL); } static struct clock_event_device ep93xx_clockevent = { @@ -107,7 +107,7 @@ static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id) struct clock_event_device *evt = dev_id; /* Writing any value clears the timer interrupt */ - writel(1, EP93XX_TIMER1_CLEAR); + writel(1, EP93XX_TIMER3_CLEAR); evt->event_handler(evt); @@ -132,11 +132,10 @@ void __init ep93xx_timer_init(void) sched_clock_register(ep93xx_read_sched_clock, 40, EP93XX_TIMER4_RATE); - /* Set up clockevent on timer 1 */ - setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq); - // FIXME: timer one is 16 bits 1-ffff use timer 3 1-ffffffff */ + /* Set up clockevent on timer 3 */ + setup_irq(IRQ_EP93XX_TIMER3, &ep93xx_timer_irq); clockevents_config_and_register(&ep93xx_clockevent, EP93XX_TIMER123_RATE, 1, - 0xffffU); + 0xffffffffU); }