From patchwork Fri May 23 10:31:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30752 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 39D8D2066E for ; Fri, 23 May 2014 10:45:07 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rq2sf17298614pbb.5 for ; Fri, 23 May 2014 03:45:06 -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:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=+Y7uue+Z/8Hyt2e9KrVXMaUiapUERwnJgy3KW9mpkNs=; b=QfCYslc4zCLxn7SGLST5sMwwxQ2gbTX+Yk1GwDQppq4LYnxQJrNKfJUq4tkHmy8C2m 22uKxwul40X8oMio34WwqtrxP0+q1NqA75jUkkbFYf9Wok0/lu++TH3GUI5CDTBqzB7C pybKNV+52FPsgsQJAZmxWiZ7lR9t9AQQYwh/QeSB3GFS2A29SxHecVowPzAs4X2FqXLG qmPhwiCzIK2gmN5Ir4OPeetwuZcP4Bb+V4nNYX+K4kKZTE2NqAzHzt0Oqrk8WF5DX3+A NbKV/ZNs8alGh8lc049muRc7fX2++pUCGdyrj+K4n5Pxh4xVMzTkFal96ZzrO2cQ+8Qs JWYQ== X-Gm-Message-State: ALoCoQk8VgcndhwxEaeOxM4QoH4dqEoBP+Obtj/lC5yzEUHRS/iG9ZrJIDQzriLrUVGLpy0j6A5v X-Received: by 10.66.231.68 with SMTP id te4mr1782949pac.29.1400841906484; Fri, 23 May 2014 03:45:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.229 with SMTP id j92ls1680309qgf.14.gmail; Fri, 23 May 2014 03:45:06 -0700 (PDT) X-Received: by 10.52.61.139 with SMTP id p11mr310762vdr.49.1400841906385; Fri, 23 May 2014 03:45:06 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id uk3si1382343vec.102.2014.05.23.03.45.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hq11so253892vcb.33 for ; Fri, 23 May 2014 03:45:06 -0700 (PDT) X-Received: by 10.58.136.168 with SMTP id qb8mr3401601veb.21.1400841906311; Fri, 23 May 2014 03:45:06 -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.220.221.72 with SMTP id ib8csp20557vcb; Fri, 23 May 2014 03:45:06 -0700 (PDT) X-Received: by 10.140.32.97 with SMTP id g88mr4751316qgg.17.1400841905932; Fri, 23 May 2014 03:45:05 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id p2si3088579qah.21.2014.05.23.03.45.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 03:45:05 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) 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 1WnmwJ-0003Qx-3j; Fri, 23 May 2014 10:43:03 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wnmm8-0001Ul-Pz for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 10:32:33 +0000 Received: by mail-wi0-f175.google.com with SMTP id f8so604392wiw.8 for ; Fri, 23 May 2014 03:32:14 -0700 (PDT) X-Received: by 10.194.61.193 with SMTP id s1mr3444487wjr.36.1400841134168; Fri, 23 May 2014 03:32:14 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.32.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:13 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Subject: [PATCH 31/71] clocksource: sh_tmu: Hardcode TMU clock event and source ratings to 200 Date: Fri, 23 May 2014 12:31:11 +0200 Message-Id: <1400841111-6683-31-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> References: <537F214C.8000700@linaro.org> <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140523_033233_052349_C3BDAD16 X-CRM114-Status: GOOD ( 13.28 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 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.212.175 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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: 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.174 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 From: Laurent Pinchart All boards use clock event and clock source ratings of 200 for the TMU, hardcode it in the driver. Signed-off-by: Laurent Pinchart --- drivers/clocksource/sh_tmu.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 63ed92d..fec9bed 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -300,12 +300,12 @@ static void sh_tmu_clocksource_resume(struct clocksource *cs) } static int sh_tmu_register_clocksource(struct sh_tmu_channel *ch, - const char *name, unsigned long rating) + const char *name) { struct clocksource *cs = &ch->cs; cs->name = name; - cs->rating = rating; + cs->rating = 200; cs->read = sh_tmu_clocksource_read; cs->enable = sh_tmu_clocksource_enable; cs->disable = sh_tmu_clocksource_disable; @@ -402,7 +402,7 @@ static void sh_tmu_clock_event_resume(struct clock_event_device *ced) } static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch, - const char *name, unsigned long rating) + const char *name) { struct clock_event_device *ced = &ch->ced; int ret; @@ -410,7 +410,7 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch, ced->name = name; ced->features = CLOCK_EVT_FEAT_PERIODIC; ced->features |= CLOCK_EVT_FEAT_ONESHOT; - ced->rating = rating; + ced->rating = 200; ced->cpumask = cpumask_of(0); ced->set_next_event = sh_tmu_clock_event_next; ced->set_mode = sh_tmu_clock_event_mode; @@ -433,13 +433,12 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch, } static int sh_tmu_register(struct sh_tmu_channel *ch, const char *name, - unsigned long clockevent_rating, - unsigned long clocksource_rating) + bool clockevent, bool clocksource) { - if (clockevent_rating) - sh_tmu_register_clockevent(ch, name, clockevent_rating); - else if (clocksource_rating) - sh_tmu_register_clocksource(ch, name, clocksource_rating); + if (clockevent) + sh_tmu_register_clockevent(ch, name); + else if (clocksource) + sh_tmu_register_clocksource(ch, name); return 0; } @@ -471,8 +470,8 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, ch->enable_count = 0; return sh_tmu_register(ch, dev_name(&tmu->pdev->dev), - cfg->clockevent_rating, - cfg->clocksource_rating); + cfg->clockevent_rating != 0, + cfg->clocksource_rating != 0); } static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)