From patchwork Mon Mar 30 20:17:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 46549 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DE1C6218BE for ; Mon, 30 Mar 2015 20:19:34 +0000 (UTC) Received: by labpk9 with SMTP id pk9sf5925780lab.1 for ; Mon, 30 Mar 2015 13:19:33 -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:cc: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=2+r/2u2I9M9j8gyGZj4v/3G3l4YNtZWBSNwrwqk8NBs=; b=PCy0lTZrN3BCxXVzbLYj54pya+m93O6L/bjzMTi3fl2XF+EaAsiScreeFm3fLzMbfp 2jlwIyKCRIUiiLfVNP1SWnbYUxdqryPJMq4goG5f/WEdeDz/TaiuUBoJJv85jeN6cnzq TEvc2xD6iYaPRXtLNzEha9M3sxQEsZDK+10sZQhBLywz9722+bvwdmcXH+ImZ9G+hQDw PZj6xlyNgQv0JRayjz1FW2PVSJgQfcX3xNT2dzauGGxkfzsS5QPur/bG9doQD5u2xQpo LsUkSQVnjaVjwUjnrSpkj8Ksq/Bfk3kXQM3mur6hrm6oFZnrByBRLlpxwd/h/7cEfXwt 6DOA== X-Gm-Message-State: ALoCoQks0YEe7pTumn4XqPHJ7q/fQ8nlC96comYxbYgRhVY+FZjSKMs0A1MSJToGReSwKOA8s891 X-Received: by 10.112.212.33 with SMTP id nh1mr434969lbc.4.1427746773862; Mon, 30 Mar 2015 13:19:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.38 with SMTP id cb6ls514669lad.97.gmail; Mon, 30 Mar 2015 13:19:33 -0700 (PDT) X-Received: by 10.153.5.37 with SMTP id cj5mr28497247lad.14.1427746773692; Mon, 30 Mar 2015 13:19:33 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id eo1si7730840lbc.122.2015.03.30.13.19.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 13:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbcmq2 with SMTP id mq2so103363425lbc.0 for ; Mon, 30 Mar 2015 13:19:33 -0700 (PDT) X-Received: by 10.152.87.135 with SMTP id ay7mr12962594lab.88.1427746773591; Mon, 30 Mar 2015 13:19:33 -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.57.201 with SMTP id k9csp1368838lbq; Mon, 30 Mar 2015 13:19:32 -0700 (PDT) X-Received: by 10.66.182.201 with SMTP id eg9mr20174532pac.68.1427746771693; Mon, 30 Mar 2015 13:19:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id da4si16135015pbb.244.2015.03.30.13.19.30; Mon, 30 Mar 2015 13:19:31 -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 S1754620AbbC3UT0 (ORCPT + 27 others); Mon, 30 Mar 2015 16:19:26 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:35377 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491AbbC3URd (ORCPT ); Mon, 30 Mar 2015 16:17:33 -0400 Received: by wicne17 with SMTP id ne17so44366581wic.0 for ; Mon, 30 Mar 2015 13:17:32 -0700 (PDT) X-Received: by 10.194.19.166 with SMTP id g6mr68038458wje.150.1427746652213; Mon, 30 Mar 2015 13:17:32 -0700 (PDT) Received: from mai.lan (135-224-190-109.dsl.ovh.fr. [109.190.224.135]) by mx.google.com with ESMTPSA id ha10sm17205957wjc.37.2015.03.30.13.17.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Mar 2015 13:17:31 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, maxime.ripard@free-electrons.com, viresh.kumar@linaro.org, ben.dooks@codethink.co.uk, digetx@gmail.com, hdegoede@redhat.com, laurent.pinchart+renesas@ideasonboard.com Subject: [PATCH 08/11] clocksource: sun4i-timer: Only register a sched_clock on sun4i and sun5i Date: Mon, 30 Mar 2015 22:17:10 +0200 Message-Id: <1427746633-9137-8-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427746633-9137-1-git-send-email-daniel.lezcano@linaro.org> References: <5519AEB2.8050306@linaro.org> <1427746633-9137-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.217.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: Hans de Goede sun6i and newer have an arm arch timer which is a better sched_clock source then the sun4i-timer, and sched_clock does not have priorities, so do not register the sun4i-timer sched_clock at all on sun6i and newer. Signed-off-by: Hans de Goede Signed-off-by: Daniel Lezcano Acked-by: Maxime Ripard --- drivers/clocksource/sun4i_timer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c index f4a9c00..1928a89 100644 --- a/drivers/clocksource/sun4i_timer.c +++ b/drivers/clocksource/sun4i_timer.c @@ -170,7 +170,15 @@ static void __init sun4i_timer_init(struct device_node *node) TIMER_CTL_CLK_SRC(TIMER_CTL_CLK_SRC_OSC24M), timer_base + TIMER_CTL_REG(1)); - sched_clock_register(sun4i_timer_sched_read, 32, rate); + /* + * sched_clock_register does not have priorities, and on sun6i and + * later there is a better sched_clock registered by arm_arch_timer.c + */ + if (of_machine_is_compatible("allwinner,sun4i-a10") || + of_machine_is_compatible("allwinner,sun5i-a13") || + of_machine_is_compatible("allwinner,sun5i-a10s")) + sched_clock_register(sun4i_timer_sched_read, 32, rate); + clocksource_mmio_init(timer_base + TIMER_CNTVAL_REG(1), node->name, rate, 350, 32, clocksource_mmio_readl_down);