Message ID | 20191009224006.5021-8-alexandre.belloni@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=fsGl=YC=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D91E7912 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 9 Oct 2019 22:42:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 87472206A1 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 9 Oct 2019 22:42:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AnnIm6CQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="3KhKthe2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87472206A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pDYAMyfdER+bN714mOgmRnB0jE9DlIhz3dphk1ay0+o=; b=AnnIm6CQs4w0cx pPM/rrKRxYB9X1+q+S+QgAL2YIphz8MI5WivQmFVdHjUgksnoq+2bjCIzXx+SmQrZra3vXIsoOdk9 hHWrrmwKurUX5uWVr2cX8J1zSDzXbyhU/a6idHYj4DZYvkYrZ3n76ief/gD1IjClByLz6Fj8U10f3 3hJ9OzOBkpR1sdavO4dXJ4Ukv78TWSfpiMWhzZXLMW4erqYcENqvPBQc2Q46KkG7dO6clwG0NXkf6 VPaGJutvaqaprnZw3sZjdUgaeiNH5NIFwgPcNUK98uRjZsdOK4qAh3cDfWrlcHFt9xdLExZLCWPNC Si51A3CIhP5j3YLGCc7Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iIKex-0002l9-Oo; Wed, 09 Oct 2019 22:42:19 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iIKdY-0001FA-Gs for linux-arm-kernel@bombadil.infradead.org; Wed, 09 Oct 2019 22:40:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=P7jnIgRzdOlbpzapvfQ9Wjn9wGorKJ6gROjLEY8NhyE=; b=3KhKthe2dCXqWVhYCppr46UOhq w015E0YIqAnOySJQST1JWrc+p94xB9jV0EQcZcfnLv4XN87lz8h/2BS74ATP9+mq1JcGpnXLD0fSL ekkSDB89FgFKNPX0mCl+qQ3C5VjoA2eKd5Hbxf9mbfuGxRHve7pSAyqhtQyqIRYx9UmG2ZvwLDg8x hCEMgMLOcbkNI6c+TR5ZS6aJkqpmuSN0BOuvG0ao0a+wuUHxjbmIPKqO7ZVjIZPJJKq8j8C/dNQKq sT3u3NmUD66YSelJUQ8XkajXUbC0mwPD58s2qX+uWu/O2Wng6tARJ070cPmlg6NRbwShmSRqlw/kK 1bBJznpQ==; Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by merlin.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iIKdV-0001VW-D1 for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2019 22:40:50 +0000 X-Originating-IP: 86.202.229.42 Received: from localhost (lfbn-lyo-1-146-42.w86-202.abo.wanadoo.fr [86.202.229.42]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 044511C0006; Wed, 9 Oct 2019 22:40:15 +0000 (UTC) From: Alexandre Belloni <alexandre.belloni@bootlin.com> To: Daniel Lezcano <daniel.lezcano@linaro.org> Subject: [PATCH 7/8] clocksource/drivers/timer-atmel-tcb: allow selecting first divider Date: Thu, 10 Oct 2019 00:40:05 +0200 Message-Id: <20191009224006.5021-8-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191009224006.5021-1-alexandre.belloni@bootlin.com> References: <20191009224006.5021-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.197 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, Alexandre Belloni <alexandre.belloni@bootlin.com>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
clocksource/drivers/timer-atmel-tcb: add sama5d2 support
|
expand
|
diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c index 8fcd4d74c54b..ccb77b9cb489 100644 --- a/drivers/clocksource/timer-atmel-tcb.c +++ b/drivers/clocksource/timer-atmel-tcb.c @@ -432,10 +432,8 @@ static int __init tcb_clksrc_init(struct device_node *node) tmp = rate / divisor; pr_debug("TC: %u / %-3u [%d] --> %u\n", rate, divisor, i, tmp); - if (best_divisor_idx > 0) { - if (tmp < 5 * 1000 * 1000) - continue; - } + if ((best_divisor_idx >= 0) && (tmp < 5 * 1000 * 1000)) + break; divided_rate = tmp; best_divisor_idx = i; }
The divider selection algorithm never allowed to get index 0. It was also continuing to look for dividers, trying to find the slow clock selection. This is not necessary anymore. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> --- drivers/clocksource/timer-atmel-tcb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)