From patchwork Wed Jul 23 10:54:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 34136 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E19872061E for ; Wed, 23 Jul 2014 10:56:07 +0000 (UTC) Received: by mail-oi0-f71.google.com with SMTP id e131sf3776713oig.10 for ; Wed, 23 Jul 2014 03:56:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:subject:date :message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=MrHG8A9klvUi6Hn8Djlp2OaNVmeA+bodxe3ZKDSOeDs=; b=eYy+VN+EHwlVvZVZWvQtXbu4pdyHbTpQeTPwAdm5Tj0THFNOE3f7R7e7JU9F+4lgra V3Z6q0Gi+32wlM64s26kHU8940m3eGgXAnpewRr7UWR6r080EnjDhUf+YW3aOlDJbF+h qEnNIlb8aWJX672SHpy7dSdktl11W7tDdGRPB0+076b61Z8r2Tm1ZOe0xSvmphPNo7To wa7IG4r7XYWWG85D7tsDmcL15KAWMQVr2y30F5GIRCKHjGVuQ/6GzhqLp6X4u4a3VHKY i2/huXavXck/1J8MqfXS0dPmCJig1yBx8Jr1cmgdav/Ww/ejMzlwET79eemQAvkS3cXq pALg== X-Gm-Message-State: ALoCoQlCH6uZV6byNbX11BYPReG5r0uefx6iOJ48JP33LzApzZmdoGonOupOWZxSrFGQr7KYiF/k X-Received: by 10.42.39.140 with SMTP id h12mr504212ice.9.1406112967414; Wed, 23 Jul 2014 03:56:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.37 with SMTP id o34ls261903qgo.67.gmail; Wed, 23 Jul 2014 03:56:07 -0700 (PDT) X-Received: by 10.52.0.177 with SMTP id 17mr768099vdf.12.1406112967284; Wed, 23 Jul 2014 03:56:07 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id kt15si1523728veb.29.2014.07.23.03.56.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 03:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so1730965vcb.31 for ; Wed, 23 Jul 2014 03:56:07 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr764738vcq.50.1406112967205; Wed, 23 Jul 2014 03:56:07 -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.37.5 with SMTP id tc5csp268868vcb; Wed, 23 Jul 2014 03:56:06 -0700 (PDT) X-Received: by 10.70.134.102 with SMTP id pj6mr287955pdb.161.1406112966397; Wed, 23 Jul 2014 03:56:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dn2si1076655pdb.113.2014.07.23.03.56.05 for ; Wed, 23 Jul 2014 03:56:06 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757376AbaGWK4D (ORCPT + 15 others); Wed, 23 Jul 2014 06:56:03 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:36974 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757961AbaGWKyf (ORCPT ); Wed, 23 Jul 2014 06:54:35 -0400 Received: by mail-wi0-f176.google.com with SMTP id bs8so7542023wib.15 for ; Wed, 23 Jul 2014 03:54:34 -0700 (PDT) X-Received: by 10.180.20.15 with SMTP id j15mr23866856wie.60.1406112874623; Wed, 23 Jul 2014 03:54:34 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-406-71.w82-125.abo.wanadoo.fr. [82.125.33.71]) by mx.google.com with ESMTPSA id es9sm1112100wjd.1.2014.07.23.03.54.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 03:54:34 -0700 (PDT) From: Daniel Lezcano To: linux-kernel@vger.kernel.org Subject: [PATCH 23/25] ARM: pxa: Add non device-tree timer link to clocksource Date: Wed, 23 Jul 2014 12:54:05 +0200 Message-Id: <1406112847-26275-23-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406112847-26275-1-git-send-email-daniel.lezcano@linaro.org> References: <53CF93B2.6040903@linaro.org> <1406112847-26275-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@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.172 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Robert Jarzmik As clocksource pxa_timer was moved to clocksource framework, the pxa_timer initialization needs to be a bit amended, to pass the necessary informations to clocksource, ie : - the timer interrupt (mach specific) - the timer registers base (ditto) - the timer clockrate Signed-off-by: Robert Jarzmik Signed-off-by: Daniel Lezcano --- arch/arm/mach-pxa/generic.c | 11 +++++++++++ include/clocksource/pxa.h | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 include/clocksource/pxa.h diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 4225417..6f38e1a 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -25,11 +25,13 @@ #include #include +#include #include #include #include #include "generic.h" +#include void clear_reset_status(unsigned int mask) { @@ -57,6 +59,15 @@ unsigned long get_clock_tick_rate(void) EXPORT_SYMBOL(get_clock_tick_rate); /* + * For non device-tree builds, keep legacy timer init + */ +void pxa_timer_init(void) +{ + pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000), + get_clock_tick_rate()); +} + +/* * Get the clock frequency as reflected by CCCR and the turbo flag. * We assume these values have been applied via a fcs. * If info is not 0 we also display the current settings. diff --git a/include/clocksource/pxa.h b/include/clocksource/pxa.h new file mode 100644 index 0000000..1efbe5a --- /dev/null +++ b/include/clocksource/pxa.h @@ -0,0 +1,18 @@ +/* + * PXA clocksource, clockevents, and OST interrupt handlers. + * + * Copyright (C) 2014 Robert Jarzmik + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + */ + +#ifndef _CLOCKSOURCE_PXA_H +#define _CLOCKSOURCE_PXA_H + +extern void pxa_timer_nodt_init(int irq, void __iomem *base, + unsigned long clock_tick_rate); + +#endif