Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp467087ybg; Mon, 1 Jun 2020 06:15:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzidNEmL+BePgHIzQq+uQlZX95ZKvBPymbsJui+P/tD2R8DboJmdYQNRY3EiYKEC0dUoTwV X-Received: by 2002:a17:906:81c1:: with SMTP id e1mr3605941ejx.218.1591017303179; Mon, 01 Jun 2020 06:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591017303; cv=none; d=google.com; s=arc-20160816; b=m7+gmdsaj9mXExpBXrYcN8M7Nzp1fv46xllXanOw1TDxiDLgE+it3+AVZCpXPl3iEj GIJQh6RLCy/p2HePFNkRsDHbjYdiHOr+PvJ1YSv+DtPBhyoCzkUVgMVcvoXCqX4tqvlq SeVXkRkPwsqM6lZqZawYJzufJov0ulOege4XLox7Ys2mJHYIXaeJgT8KO0sZTQO0HLGb clqze5tYSua5J2Ow2opP/hAjUIkxSDPCakFD7heTyXORLwj2pOTyF150eMYaM2vifS+C uAtzUUcUO3U3ZCIajXXEY3EwskXN/YZz8MoSsnpw9Q6ye0iPl64MGI4826y4OunrZk3A o6Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=vjZeLIVhL83gj1PIEooJeq/AgvmbzkfA40kOjECbRI4=; b=xmAMZ7PfJqep4TscVR0PfUGQQp8qFhigwAhTutpgfQfOmYgUniThNurU6bvJSFckDD K6BILkodSdTAdN+/OZadaaOz3/NkqjHFWvTHpUU/EMkh0pKRwUywJDnFAYCEGcr3puOb 64seHZbUNC4a7ntdnHOdCx+1Js//2qEFaLb7FKwrc6AwJV6BBIPw6M0RV6ALA0O4/jHl PPHqrRTzgIxbJrK9VeTsGw24A0pOvywjShT5YjKQYpbEnFWKCo6o4JtJzb3KWsnYw7R3 57lEZpL585o5tffoPfBNuLYByXoSBHqkN8EQM/7DNWsig8PQOv5WiR9MHjqzU4MDqWQk H5kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r1si4185363edw.119.2020.06.01.06.14.39; Mon, 01 Jun 2020 06:15:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbgFANMc (ORCPT + 99 others); Mon, 1 Jun 2020 09:12:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbgFANL4 (ORCPT ); Mon, 1 Jun 2020 09:11:56 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98F9AC08C5C0; Mon, 1 Jun 2020 06:11:55 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jfkEJ-0007AU-JX; Mon, 01 Jun 2020 15:11:51 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id B45AF1C0794; Mon, 1 Jun 2020 15:11:49 +0200 (CEST) Date: Mon, 01 Jun 2020 13:11:49 -0000 From: "tip-bot2 for Anson Huang" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/imx-tpm: Add support for ARM64 Cc: Anson Huang , Daniel Lezcano , x86 , LKML In-Reply-To: <1585715222-24489-1-git-send-email-Anson.Huang@nxp.com> References: <1585715222-24489-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Message-ID: <159101710955.17951.14810721083224334490.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 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: ac161f57b66dcf14b3339b1c5857c08a9ad4d833 Gitweb: https://git.kernel.org/tip/ac161f57b66dcf14b3339b1c5857c08a9ad4d833 Author: Anson Huang AuthorDate: Wed, 01 Apr 2020 12:27:02 +08:00 Committer: Daniel Lezcano CommitterDate: Thu, 09 Apr 2020 16:24:50 +02:00 clocksource/drivers/imx-tpm: Add support for ARM64 Allows building and compile-testing the i.MX TPM driver also for ARM64. The delay_timer is only supported on ARMv7. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1585715222-24489-1-git-send-email-Anson.Huang@nxp.com --- drivers/clocksource/timer-imx-tpm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c index 6334a35..2cdc077 100644 --- a/drivers/clocksource/timer-imx-tpm.c +++ b/drivers/clocksource/timer-imx-tpm.c @@ -61,17 +61,19 @@ static inline void tpm_irq_acknowledge(void) writel(TPM_STATUS_CH0F, timer_base + TPM_STATUS); } -static struct delay_timer tpm_delay_timer; - static inline unsigned long tpm_read_counter(void) { return readl(timer_base + TPM_CNT); } +#if defined(CONFIG_ARM) +static struct delay_timer tpm_delay_timer; + static unsigned long tpm_read_current_timer(void) { return tpm_read_counter(); } +#endif static u64 notrace tpm_read_sched_clock(void) { @@ -144,9 +146,11 @@ static struct timer_of to_tpm = { static int __init tpm_clocksource_init(void) { +#if defined(CONFIG_ARM) tpm_delay_timer.read_current_timer = &tpm_read_current_timer; tpm_delay_timer.freq = timer_of_rate(&to_tpm) >> 3; register_current_timer_delay(&tpm_delay_timer); +#endif sched_clock_register(tpm_read_sched_clock, counter_width, timer_of_rate(&to_tpm) >> 3);