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=-6.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT 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 AD83FC43381 for ; Mon, 18 Mar 2019 12:12:12 +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 7D28F20857 for ; Mon, 18 Mar 2019 12:12:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lMyqOAiE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="kgEg5Ahc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D28F20857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.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=4IwPYDb4bsj7N2VDq6Iedtu8P2uRljGz80xeZCx1IwE=; b=lMyqOAiET/kUpN tcqlWWv5t22xviK6nGLRr0SBKKt0np74GIDv7Eota9oD7ermJPhNpX/kj8gv5E/xDXpupsBEe8fL3 Ezf2YtHW7Z7WBDodgYjNxgyZKtGD1E1R8oeX0W/xjUS8y2vcow7upnq59pTB/ryU+Nc3GEC4H3c6g QWM/TM1WL5iZXygBvBXBSwlCOTov0nSkt4lcJojzKkoQVCR6uu77YNtNBLPmdsPtnodKaWd7xhBCW QFaPZXC/+6HHgsyjpPDCv4XfstLLIoSKfkR0g9XM19aCQHGhTusWAH0BMyXHw3AAMyvsP9JSuA1Gp 9wopFxcA0FS+l1iewagw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5r7d-0006Wa-P5; Mon, 18 Mar 2019 12:12:05 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5r6u-0005Ze-Kl for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 12:11:25 +0000 Received: by mail-wr1-x443.google.com with SMTP id w2so16721996wrt.11 for ; Mon, 18 Mar 2019 05:11:20 -0700 (PDT) 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=1/mIWSm3wy53qsl94zDXohVmwu9Rsv89RlOUBJznZaI=; b=kgEg5AhcETbL9DVBt+Zg/0Ugpg9F1En/rWuDsbpMltHqa5MUxalvk1kvzy1gKUWpzi 8S8ohfbcN9bbNJZJbbuirhEAfCAFyXxUKBrRmgdoyjLVLXgg+CRVJOVzsAulA33XpRt4 yoAsnghm7sVZXlwxKOsoJNWS1eVGeTXP4jnJV0O0jbxuM12L0xGX+I5maNEQexr9bDfF wtcmMhNzRpaC60B6lRu51RYfXMD6/RZWkd0UmH2zx8CDKagDEWHe/YOxruKltqHzmwMI ZaAoMzgkh2iZrY65SwYLBuIDhIHii9lVmpeuXQ/p4eB/3pp4O/MYPsF8RwLe6v5bkPIY lwDQ== 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=1/mIWSm3wy53qsl94zDXohVmwu9Rsv89RlOUBJznZaI=; b=Hq1Mv2qZdnfUiGt9109pgwG0Wvx+IlHergZsNnRsCt7+2FW1XDCRRndwVERxjlzHec 1pEgejdTLzFB0r5j2BEtfu/3T/E8xdGsvhBnpuihstOn3/M7+zQqp8GWSPCNJ9aei70p o4GLMitERznfQ+qnpOLVqPv74RC2KemoLWTatqWY3yWJfqmNhjiOcmcVKqXEF8D9loU5 XemHZxPbit5C29aXK4ThXbymZZ9PKjIPmVwk/eUgYYz7sHbx6ODT5eylQsTCEsNj0LuT p/RxT7OPMwdGfhdBdv1REnNCy0SUyG8CXgzqllyWB93t3FTMBdXatfGOLwANH8nKq++q +t/A== X-Gm-Message-State: APjAAAUpsBcD09iCtYSju2Ioj1HKvnfMsI7Ed4hcEcABQqKvBTyd0B+Z HSTVbn94Tgj45P8lGNPOHR440Q== X-Google-Smtp-Source: APXvYqxp5QtJMPCXFtv1vx9BatgrVIchbgm7q6dpb1J4hiCJmjhZO0Qj6QGmLqzqY3ng5hEZqZaKqA== X-Received: by 2002:adf:fa8c:: with SMTP id h12mr11551213wrr.75.1552911078958; Mon, 18 Mar 2019 05:11:18 -0700 (PDT) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id n13sm8220132wrw.67.2019.03.18.05.11.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 05:11:17 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Daniel Lezcano , Thomas Gleixner , David Lechner Subject: [PATCH v4 04/11] ARM: davinci: da850: switch to using the clocksource driver Date: Mon, 18 Mar 2019 13:10:53 +0100 Message-Id: <20190318121100.28132-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190318121100.28132-1-brgl@bgdev.pl> References: <20190318121100.28132-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_051121_129975_1EEF04C3 X-CRM114-Status: GOOD ( 14.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski We now have a proper clocksource driver for davinci. Switch the da850 platform to using it. Signed-off-by: Bartosz Golaszewski Reviewed-by: David Lechner --- arch/arm/mach-davinci/da850.c | 46 ++++++++++------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 72d64d39d42a..4e18bdf05ac4 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -34,7 +34,8 @@ #include #include #include -#include + +#include #include "irqs.h" #include "mux.h" @@ -332,38 +333,16 @@ static struct davinci_id da850_ids[] = { }, }; -static struct davinci_timer_instance da850_timer_instance[4] = { - { - .base = DA8XX_TIMER64P0_BASE, - .bottom_irq = DAVINCI_INTC_IRQ(IRQ_DA8XX_TINT12_0), - .top_irq = DAVINCI_INTC_IRQ(IRQ_DA8XX_TINT34_0), - }, - { - .base = DA8XX_TIMER64P1_BASE, - .bottom_irq = DAVINCI_INTC_IRQ(IRQ_DA8XX_TINT12_1), - .top_irq = DAVINCI_INTC_IRQ(IRQ_DA8XX_TINT34_1), - }, - { - .base = DA850_TIMER64P2_BASE, - .bottom_irq = DAVINCI_INTC_IRQ(IRQ_DA850_TINT12_2), - .top_irq = DAVINCI_INTC_IRQ(IRQ_DA850_TINT34_2), - }, - { - .base = DA850_TIMER64P3_BASE, - .bottom_irq = DAVINCI_INTC_IRQ(IRQ_DA850_TINT12_3), - .top_irq = DAVINCI_INTC_IRQ(IRQ_DA850_TINT34_3), - }, -}; - /* - * T0_BOT: Timer 0, bottom : Used for clock_event - * T0_TOP: Timer 0, top : Used for clocksource - * T1_BOT, T1_TOP: Timer 1, bottom & top: Used for watchdog timer + * Bottom half of timer 0 is used for clock_event, top half for + * clocksource. */ -static struct davinci_timer_info da850_timer_info = { - .timers = da850_timer_instance, - .clockevent_id = T0_BOT, - .clocksource_id = T0_TOP, +static const struct davinci_timer_cfg da850_timer_cfg = { + .reg = DEFINE_RES_IO(DA8XX_TIMER64P0_BASE, SZ_4K), + .irq = { + DEFINE_RES_IRQ(DAVINCI_INTC_IRQ(IRQ_DA8XX_TINT12_0)), + DEFINE_RES_IRQ(DAVINCI_INTC_IRQ(IRQ_DA8XX_TINT34_0)), + }, }; #ifdef CONFIG_CPU_FREQ @@ -634,7 +613,6 @@ static const struct davinci_soc_info davinci_soc_info_da850 = { .pinmux_base = DA8XX_SYSCFG0_BASE + 0x120, .pinmux_pins = da850_pins, .pinmux_pins_num = ARRAY_SIZE(da850_pins), - .timer_info = &da850_timer_info, .emac_pdata = &da8xx_emac_pdata, .sram_dma = DA8XX_SHARED_RAM_BASE, .sram_len = SZ_128K, @@ -671,6 +649,7 @@ void __init da850_init_time(void) void __iomem *pll0; struct regmap *cfgchip; struct clk *clk; + int rv; clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DA850_REF_FREQ); @@ -685,7 +664,8 @@ void __init da850_init_time(void) return; } - davinci_timer_init(clk); + rv = davinci_timer_register(clk, &da850_timer_cfg); + WARN(rv, "Unable to register the timer: %d\n", rv); } static struct resource da850_pll1_resources[] = { -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel