Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2508598rwb; Mon, 15 Aug 2022 06:44:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR7oQD4I1rCdw9jnN1MMAb9x7vS9TK12tvIDsHKmwTeVL6DqRw3XMfxM1PMayjGIgyeCOyW2 X-Received: by 2002:aa7:d712:0:b0:43d:3651:7217 with SMTP id t18-20020aa7d712000000b0043d36517217mr14608740edq.79.1660571042926; Mon, 15 Aug 2022 06:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660571042; cv=none; d=google.com; s=arc-20160816; b=ZE9OrRuY4deAYi9TUmLRnDRRkMFMQBzdXtEK6gB1CHXRFtWBUyNuK4ugLzV5bAwazn HI+a/HrsTfEeCA1LUwqRHdO1hyIC3dAD28ocVHGt9nyq/oFEVyjKz7RT05MBc4M8+o6Q U9WDtwbuijPasqmztZMEJIuwP+isZlIHZAk8sqr5NLg666WDDQpv3xSdNEYnwz2Ac9tj usAHUfRdtuKSFA6bpk2zbxIUAfv7qRuVHF8JNkAuHYbZ6SC4LRZ+osM35YCF5iOyrehz 5TwoVutEp2Gam5+CaBH1hF3KU/3Il8vvcsMvhMOt4xWIZ7e7mJj7BTEg2464g4W27k2r oYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UJhKzEz8CjizTp0+GCy4WH0iLTq5bT3YMNOZuRic4CU=; b=CBiN2UZx+6pFMnvp3HwRn65OT0Sp3b+7673QUADD6WwtBUbtwmF6aG7e/cIaouAHGE fGRw73w5IqWIsF93YGNg4Tapu6BB+UjOvgL1TBtxjaQpRC+XJptHOgFZcDT7rIk3xDxi MGOlNxxwkn3vx4Nz4ROGI9BBMmEftqNnkkJZPv0t8UXCP9jiDv3k5VVGAFry65Sh3fff CCAwrWzhNCwCs5EREYMckac0y31mCAefcn4tYY8sz6R4rJe7/XeQTg9I2pdDFKc+ZPS/ j6LVG6/JH/iGAOYKeJKqoWS7qfX/JfIxNB/tEceaoodAazPnhcmDLSQTjHQciMAp5JTD xcqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a17090653c500b00726efdeaf13si7549673ejo.164.2022.08.15.06.43.37; Mon, 15 Aug 2022 06:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242847AbiHONOO (ORCPT + 99 others); Mon, 15 Aug 2022 09:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242807AbiHONOI (ORCPT ); Mon, 15 Aug 2022 09:14:08 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B48A1AF06; Mon, 15 Aug 2022 06:13:41 -0700 (PDT) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id EB9C880FB; Mon, 15 Aug 2022 13:06:47 +0000 (UTC) From: Tony Lindgren To: Daniel Lezcano , Thomas Gleixner Cc: Aaro Koskinen , Grygorii Strashko , Janusz Krzysztofik , Keerthy , Ladislav Michl , Nishanth Menon , Suman Anna , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 8/9] clocksource/drivers/timer-ti-dm: Add flag to detect omap1 Date: Mon, 15 Aug 2022 16:12:49 +0300 Message-Id: <20220815131250.34603-9-tony@atomide.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220815131250.34603-1-tony@atomide.com> References: <20220815131250.34603-1-tony@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's make it clear that some features need to be tested currently on omap1. Only omap1 still uses platform_data. Signed-off-by: Tony Lindgren --- drivers/clocksource/timer-ti-dm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -133,6 +133,7 @@ struct dmtimer { unsigned long rate; unsigned reserved:1; unsigned posted:1; + unsigned omap1:1; struct timer_regs context; int revision; u32 capability; @@ -423,7 +424,7 @@ static int omap_dm_timer_set_source(struct omap_dm_timer *cookie, int source) * use the clock framework to set the parent clock. To be removed * once OMAP1 migrated to using clock framework for dmtimers */ - if (pdata && pdata->set_timer_src) + if (timer->omap1 && pdata && pdata->set_timer_src) return pdata->set_timer_src(timer->pdev, source); #if defined(CONFIG_COMMON_CLK) @@ -476,7 +477,7 @@ static int omap_dm_timer_prepare(struct dmtimer *timer) * FIXME: OMAP1 devices do not use the clock framework for dmtimers so * do not call clk_get() for these devices. */ - if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) { + if (!timer->omap1) { timer->fclk = clk_get(&timer->pdev->dev, "fck"); if (WARN_ON_ONCE(IS_ERR(timer->fclk))) { dev_err(&timer->pdev->dev, ": No fclk handle.\n"); @@ -763,7 +764,7 @@ static int omap_dm_timer_stop(struct omap_dm_timer *cookie) dev = &timer->pdev->dev; - if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) + if (!timer->omap1) rate = clk_get_rate(timer->fclk); __omap_dm_timer_stop(timer, rate); @@ -1119,6 +1120,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev) timer->reserved = omap_dm_timer_reserved_systimer(timer->id); } + timer->omap1 = timer->capability & OMAP_TIMER_NEEDS_RESET; + if (!(timer->capability & OMAP_TIMER_ALWON)) { timer->nb.notifier_call = omap_timer_context_notifier; cpu_pm_register_notifier(&timer->nb); -- 2.37.1