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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 26F11C433E2 for ; Wed, 15 Jul 2020 17:34:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 F039E2065E for ; Wed, 15 Jul 2020 17:34:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KUXaf9Gs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F039E2065E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RTSvkzBJKlu2ZoWmUacYY1I8ln/O3Bj4DNj6JMPSil4=; b=KUXaf9Gsh76ZuDHDFFkz1XSj9 /akpbm136O5rl7zGAWbicNf+RHLgG478ry0R3pUTg4zyKqX+nPif6sNU5lXqtKpmY3RN4FY5zwgro LeICRNmSMzZ308auEvD25ehkFB5r7/mBdeFMvP0RgxaLRpfq83DoEc8ZPTC2O+AfDHLtzcHWg3MWN PNLv26G1d0RggcgCQob++ZkKn2JdnKAkt+WjJNtdYONT1lDtTSt0BfMsxxKsFuYe/WkkoxqMuMXA+ cvyWMgXmmmpvjg7pfGtJ9cTnOpXwsdoNxyMVdiy0g/5RAtrUKuLYJ55vqrVnbNmYjotY1HUJX12br lbqUxm11g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvlGZ-0002Su-1n; Wed, 15 Jul 2020 17:32:23 +0000 Received: from muru.com ([72.249.23.125]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvlGW-0002SJ-LA for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 17:32:21 +0000 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 9845B8120; Wed, 15 Jul 2020 17:32:13 +0000 (UTC) Date: Wed, 15 Jul 2020 10:32:11 -0700 From: Tony Lindgren To: Grygorii Strashko Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4 Message-ID: <20200715173211.GA10993@atomide.com> References: <20200713162601.6829-1-tony@atomide.com> <1972bace-e9d1-b901-eb33-b4081a4b175d@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1972bace-e9d1-b901-eb33-b4081a4b175d@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_133220_743388_92F1E165 X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Lezcano , linux-kernel@vger.kernel.org, Carlos Hernandez , Thomas Gleixner , linux-omap@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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Grygorii Strashko [200715 10:17]: > On 13/07/2020 19:26, Tony Lindgren wrote: > > @@ -653,8 +679,8 @@ static int __init dmtimer_clocksource_init(struct device_node *np) > > dev->mask = CLOCKSOURCE_MASK(32); > > dev->flags = CLOCK_SOURCE_IS_CONTINUOUS; > > - if (of_device_is_compatible(np, "ti,am33xx") || > > - of_device_is_compatible(np, "ti,am43")) { > > + /* Unlike for clockevent, legacy code sets suspend only for am4 */ > > + if (of_machine_is_compatible("ti,am43")) { > > dev->suspend = dmtimer_clocksource_suspend; > > dev->resume = dmtimer_clocksource_resume; > > } > > > > It might be better to use SOC_BUS infra here, which is available on OMAP platforms by default, > instead if DT. What do you think? Well we have time_init() run very early, and some SoCs have only external timers. So timer-ti-dm-systimer must be initialized early. And I think soc_device_match() depends on soc_bus_register() that runs later at core_initcall(). If you are thinking of something else, or we can use soc_device_match() early, sure :) But sounds like that change should be a separate patch then. The reason for why we need to check for the SoC, we have the compatible for ti,am335x-timer already in use on am3/4 and dm814x, so we can't use TIMER_OF_DECLARE alone here. Regards, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel