From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47244C433EC for ; Thu, 23 Jul 2020 19:10:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25B9920737 for ; Thu, 23 Jul 2020 19:10:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2+pWO0M6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Vmiy3wfS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728401AbgGWTJq (ORCPT ); Thu, 23 Jul 2020 15:09:46 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:60504 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728281AbgGWTJp (ORCPT ); Thu, 23 Jul 2020 15:09:45 -0400 Date: Thu, 23 Jul 2020 19:09:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595531382; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XURIiBZeIQf48fZ8D2yW/iOUxTKm4roGT/PfgyGv4Mw=; b=2+pWO0M6958CbLDUfICCEdPL3oJE746/vFpp52jcY91hLbeWAnxTaSOuY9XpRMQwGIemmG lrSJ9WJ0Wv5a30oIPVrcxRNA30xrK+nMORTXCN51zzELTwjEquZMr6W5DIrWlrGru5Yc48 /oD/cUeRBTp3bLEJq4OQol1u6lN8j4zyaHNZUAO+anr57wJ2JlLtpxkKcsH2eW0NqGXgzI jI98TkpPztGXyBdXnsWjXxE4zbS9AAPYj8eg5s0rUaIOmfTH647vR+L/VbnAO0ZfSCVSOp A/HQw7mFUGFVsgMxNU1wgmOAaushmAo/hOlJ4j4mbxnoYBhb4mCcS70MsHw77g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595531382; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XURIiBZeIQf48fZ8D2yW/iOUxTKm4roGT/PfgyGv4Mw=; b=Vmiy3wfSBD4+e+wXFPaSlMUZdV7GHBviG5eugFPL+CiZzW5XDCPfFFL7ppydyH5JnkTMSr Mi8+RNnpQq8GWdAA== From: "tip-bot2 for Alexandre Belloni" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/timer-atmel-tcb: Add sama5d2 support Cc: Alexandre Belloni , Daniel Lezcano , x86 , LKML In-Reply-To: <20200710230813.1005150-10-alexandre.belloni@bootlin.com> References: <20200710230813.1005150-10-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Message-ID: <159553138186.4006.16943754175654889381.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 467ae18aa057c44417afc92896879c2fb37a8b65 Gitweb: https://git.kernel.org/tip/467ae18aa057c44417afc92896879c2fb37a8b65 Author: Alexandre Belloni AuthorDate: Sat, 11 Jul 2020 01:08:13 +02:00 Committer: Daniel Lezcano CommitterDate: Sat, 11 Jul 2020 18:58:24 +02:00 clocksource/drivers/timer-atmel-tcb: Add sama5d2 support The first divisor for the sama5d2 is actually the gclk selector. Because the currently remaining divisors are fitting the use case, currently ensure it is skipped. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-10-alexandre.belloni@bootlin.com --- drivers/clocksource/timer-atmel-tcb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c index 7fea134..787dbeb 100644 --- a/drivers/clocksource/timer-atmel-tcb.c +++ b/drivers/clocksource/timer-atmel-tcb.c @@ -359,9 +359,15 @@ static struct atmel_tcb_config tcb_sam9x5_config = { .counter_width = 32, }; +static struct atmel_tcb_config tcb_sama5d2_config = { + .counter_width = 32, + .has_gclk = 1, +}; + static const struct of_device_id atmel_tcb_of_match[] = { { .compatible = "atmel,at91rm9200-tcb", .data = &tcb_rm9200_config, }, { .compatible = "atmel,at91sam9x5-tcb", .data = &tcb_sam9x5_config, }, + { .compatible = "atmel,sama5d2-tcb", .data = &tcb_sama5d2_config, }, { /* sentinel */ } }; @@ -426,7 +432,10 @@ static int __init tcb_clksrc_init(struct device_node *node) /* How fast will we be counting? Pick something over 5 MHz. */ rate = (u32) clk_get_rate(t0_clk); - for (i = 0; i < ARRAY_SIZE(atmel_tcb_divisors); i++) { + i = 0; + if (tc.tcb_config->has_gclk) + i = 1; + for (; i < ARRAY_SIZE(atmel_tcb_divisors); i++) { unsigned divisor = atmel_tcb_divisors[i]; unsigned tmp;