Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4059422ima; Mon, 4 Feb 2019 09:30:31 -0800 (PST) X-Google-Smtp-Source: AHgI3IbmFpv0Ig0InpeMywbYCU6pARhSFXIlTI/gGu+MU7lpz7MLN0k7n2Z/J3PUnnqfev5b4YbT X-Received: by 2002:a17:902:a5c3:: with SMTP id t3mr472931plq.117.1549301430908; Mon, 04 Feb 2019 09:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549301430; cv=none; d=google.com; s=arc-20160816; b=oG/Lc8bpp18Vr6sRGZjBgDjKXJxB5kEdLsnLrUFiPEumCZLPZoJ+CuAQWtFz9usFQJ OmgLQ40gZmwua6t2yTjbup7ERdnLgfjwCXNBe0GakgXyuQx3AWE1GfPvtnQaWO8vCFxt ilG2lGNJwpXo5yv1BnZVeS8SkQBxDaOCfeTe2e2MOXtQ0zYnckEJcpYfZ/36QfwbY9eW KSSvmGS6H3/XM9WyTzxIojq1yOW67LldhqGbrUUlr3XKWmBiudxnhVy+pgCwZUzHsqPG QOU65W9O062pbTe4fBQEE29rov7+WbsV8BBkEwgwOnapoHEIXHeEyEu94udxiZUCCFqB cHXA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ePcYMiqf1jmPY58s/nmJfIEQ3ktJRw9TAoJLNQ425DE=; b=Wz968qG6AUwBs1Vk2Yz7AcQZ79tREDDaE6AP4JSQIU7sS1PQC86E6Ln2mm2IXAlM3v tRgXpMZVRWKQvMt8Yasz1kkKCRLty2FzGlcZR5wp8wLHrClMeSbewLqsYaPfiothRSu8 MSHMcDCKYRndzhAsbdZnFif8VqOSlod6GEVlU3qp3DmN2wsTIskm+cLnusDE7BAeW0UL Qbaug4jubt+gCnj+P/ZELUNqTigV2ZIJetJV4ike1o2Zy/7qga3p4VaEYot5eRVbs/e5 +j4UfSYNV/YQfC6p6QUHGxwTQW2GWXn3Aklu3HzXwHNvvmEUCyXeZ7aleYNjGOsn5aqg Vv3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=nafIKDY8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si443805pgv.228.2019.02.04.09.30.14; Mon, 04 Feb 2019 09:30:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=nafIKDY8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730767AbfBDRSX (ORCPT + 99 others); Mon, 4 Feb 2019 12:18:23 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37658 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730351AbfBDRSS (ORCPT ); Mon, 4 Feb 2019 12:18:18 -0500 Received: by mail-wm1-f67.google.com with SMTP id g67so751308wmd.2 for ; Mon, 04 Feb 2019 09:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ePcYMiqf1jmPY58s/nmJfIEQ3ktJRw9TAoJLNQ425DE=; b=nafIKDY8pCEVmUC98rmOxBpM/YpyKHHfGP9xeNo+EyYdsy38YVOlGhFo8FYS0wCrZM sLPBVwTE6RjP29WcO7EjMdeICeedB1hb/wZA7aB5ChbNwW070SeFf8nAy9Zz/mVaO0/d 2u7feGxz2AdcZkcIPdlDWWKcYu781PhELfWPfYWwDrk0K8R9uOBT6MNBdCjHP33LLhwM crlWZwnsQaK3D5mZE65/c7AwG8pJLftA1DgIikdxORG08YXU3SfhJEslVrgwdqsaamsQ 6L99tPpoB3SRd55wC2dkS+CWJNhHP9F1uOWG2Lve874ZWVYgq4QPhizr971ksjbQ2bNc lzpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ePcYMiqf1jmPY58s/nmJfIEQ3ktJRw9TAoJLNQ425DE=; b=O4hEhglgQhgdtYCE4C32m/vxiYGW1RzqvDkI+EX1+FdbWPliguI3bh4oMJOeqvDKDq pN2y8ZWRBJdRUZySNwQC52aHBKrRFyofbfGZxGtpTg6QfTGizRhuxBsKhBWckFz1qUsI MGE7XErBT9IefULfpwywq59JJycycIIoCebmbYzwazx4tDu820pIwz9O+GlIxesSY/pJ kBJxbgV7qdffNzvT0FmpHSc7truVr7bhssZw9UGmBTS23FWfDAyX1/TZnL6l+4eP/qJM qB5GqWvbC9rclFDip9H/OTNTtkBDaXKSkwmY4Zg5/gj72DI2aDQcBJ9OYXOxVTEINKtZ dr5w== X-Gm-Message-State: AHQUAuZC2WcjdhGOW8d8DWEFrodxSKxB/5SP6RZ9BT2wZqoIcAY0pHGG /4g+R/sDDJtrIF5i/I0qCc+RDQ== X-Received: by 2002:a1c:a00f:: with SMTP id j15mr331650wme.84.1549300697431; Mon, 04 Feb 2019 09:18:17 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-8-223.w90-86.abo.wanadoo.fr. [90.86.125.223]) by smtp.gmail.com with ESMTPSA id q9sm11197506wrv.26.2019.02.04.09.18.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 09:18:16 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Daniel Lezcano , Rob Herring , Mark Rutland , Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 09/12] ARM: davinci: dm365: switch to using the clocksource driver Date: Mon, 4 Feb 2019 18:17:54 +0100 Message-Id: <20190204171757.32073-10-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190204171757.32073-1-brgl@bgdev.pl> References: <20190204171757.32073-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski We now have a proper clocksource driver for davinci. Switch the platform to using it. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/dm365.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 68bd78dac293..fa83dec162e6 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@ -34,7 +34,8 @@ #include #include #include -#include + +#include #include "asp.h" #include "davinci.h" @@ -658,10 +659,24 @@ static struct davinci_id dm365_ids[] = { }, }; -static struct davinci_timer_info dm365_timer_info = { - .timers = davinci_timer_instance, - .clockevent_id = T0_BOT, - .clocksource_id = T0_TOP, +static const struct davinci_timer_cfg dm365_timer_cfg = { + .reg = { + .start = DAVINCI_TIMER0_BASE, + .end = DAVINCI_TIMER0_BASE + SZ_4K, + .flags = IORESOURCE_MEM, + }, + .irq = { + { + .start = IRQ_TINT0_TINT12, + .end = IRQ_TINT0_TINT12, + .flags = IORESOURCE_IRQ, + }, + { + .start = IRQ_TINT0_TINT34, + .end = IRQ_TINT0_TINT34, + .flags = IORESOURCE_IRQ, + } + } }; #define DM365_UART1_BASE (IO_PHYS + 0x106000) @@ -725,7 +740,6 @@ static const struct davinci_soc_info davinci_soc_info_dm365 = { .intc_type = DAVINCI_INTC_TYPE_AINTC, .intc_irq_prios = dm365_default_priorities, .intc_irq_num = DAVINCI_N_AINTC_IRQ, - .timer_info = &dm365_timer_info, .emac_pdata = &dm365_emac_pdata, .sram_dma = 0x00010000, .sram_len = SZ_32K, @@ -773,6 +787,7 @@ void __init dm365_init_time(void) { void __iomem *pll1, *pll2, *psc; struct clk *clk; + int rv; clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DM365_REF_FREQ); @@ -791,7 +806,8 @@ void __init dm365_init_time(void) return; } - davinci_timer_init(clk); + rv = davinci_timer_register(clk, &dm365_timer_cfg); + WARN(rv, "Unable to register the timer: %d\n", rv); } void __init dm365_register_clocks(void) -- 2.20.1