From patchwork Mon Apr 22 09:51:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 16291 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f200.google.com (mail-gg0-f200.google.com [209.85.161.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BB7D125DEE for ; Mon, 22 Apr 2013 09:53:06 +0000 (UTC) Received: by mail-gg0-f200.google.com with SMTP id w6sf2879972ggk.3 for ; Mon, 22 Apr 2013 02:52:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=ZAo2ygLmyR2/I0yYn4pvvaOZxEcL/stAfQAqlBLjNDE=; b=GhFZkXER33AoGulXWQbEnNMNxJepVdpP98fGbN6SbJf8QIA1RrlhS/m2SdMNmnQgm8 3C9tGuqv284RsEPofW2Qbk02oHQELIHdf76B4JjGob+DdWQHiaB3q6x3Toujq2pC6CyQ VsN7/DJUjI/S4lgwBd/fvhRD+IAca/WWjgAefRWMmrbysWXc9YebWHiEkwuMn7pRoXGy UHBKBkpy8fD6GG3lAz/EC5nlhcKy2+6uokQTWELhUbCVMMlY5tR8G84VWBdsr7Nt2ual Y2gfaFqF+tA1sy/IC4PoqD22Jt9/l4TPcEx+p69uxp5uv/QRt5Oca1SY9NYsRns0xMXe JIeg== X-Received: by 10.236.139.230 with SMTP id c66mr12927519yhj.55.1366624340330; Mon, 22 Apr 2013 02:52:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.78 with SMTP id da14ls2835195qeb.74.gmail; Mon, 22 Apr 2013 02:52:20 -0700 (PDT) X-Received: by 10.52.99.162 with SMTP id er2mr3941077vdb.67.1366624340068; Mon, 22 Apr 2013 02:52:20 -0700 (PDT) Received: from mail-vb0-x234.google.com (mail-vb0-x234.google.com [2607:f8b0:400c:c02::234]) by mx.google.com with ESMTPS id d4si15533199vcl.66.2013.04.22.02.52.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 02:52:20 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::234; Received: by mail-vb0-f52.google.com with SMTP id w8so5670779vbf.11 for ; Mon, 22 Apr 2013 02:52:20 -0700 (PDT) X-Received: by 10.52.166.103 with SMTP id zf7mr15755389vdb.94.1366624339945; Mon, 22 Apr 2013 02:52:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp68653veb; Mon, 22 Apr 2013 02:52:19 -0700 (PDT) X-Received: by 10.205.38.195 with SMTP id tj3mr10317174bkb.67.1366624337176; Mon, 22 Apr 2013 02:52:17 -0700 (PDT) Received: from eu1sys200aog103.obsmtp.com (eu1sys200aog103.obsmtp.com [207.126.144.115]) by mx.google.com with SMTP id x5si38578070eeo.130.2013.04.22.02.52.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 02:52:17 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.115 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.115; Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKUXUISOSNv09DwCP9cCTdSpUuztsIHjT7@postini.com; Mon, 22 Apr 2013 09:52:17 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 59A6947; Mon, 22 Apr 2013 09:50:41 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6A2CF48; Mon, 22 Apr 2013 03:00:08 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 3A338A8074; Mon, 22 Apr 2013 11:51:32 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.279.5; Mon, 22 Apr 2013 11:51:36 +0200 From: Linus Walleij To: Cc: Arnd Bergmann , , Linus Walleij Subject: [PATCH 02/23] ARM: u300: enabled delaytimer on the U300 Date: Mon, 22 Apr 2013 11:51:33 +0200 Message-ID: <1366624293-6156-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk50JK76cSwuJirPTrV00P88F/WNxaECm/4uYA8OnvHvHZyEsfW+vNkI9b/o+wP3hmVo+oe X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Linus Walleij The U300 can support timer-based delays, so implement this. Skips past jiffy calibration. Signed-off-by: Linus Walleij --- arch/arm/mach-u300/timer.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index d9e7320..c3d3802 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -345,6 +346,12 @@ static u32 notrace u300_read_sched_clock(void) return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); } +static unsigned long u300_read_current_timer(void) +{ + return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); +} + +static struct delay_timer u300_delay_timer; /* * This sets up the system timers, clock source and clock event. @@ -362,6 +369,10 @@ void __init u300_timer_init(void) setup_sched_clock(u300_read_sched_clock, 32, rate); + u300_delay_timer.read_current_timer = &u300_read_current_timer; + u300_delay_timer.freq = rate; + register_current_timer_delay(&u300_delay_timer); + /* * Disable the "OS" and "DD" timers - these are designed for Symbian! * Example usage in cnh1601578 cpu subsystem pd_timer_app.c