Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3138499imu; Thu, 29 Nov 2018 16:26:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/XM0wGmrItw3OPouzmqwsSMePl0liTocl7ys1YQqYNIL18C8FcBTG5hyVjyy8IxIFVQ6t8n X-Received: by 2002:a62:c185:: with SMTP id i127mr3556625pfg.43.1543537568058; Thu, 29 Nov 2018 16:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543537568; cv=none; d=google.com; s=arc-20160816; b=HlnjtESaGKBUYHc6dAzNGOTHcZlZ+9FEwXJ1f7OR4I/yqk2Ghf+bAr4TEVJi3+m21g uR20ePoQFRf2t0428H37Hi8IbZUupFsjhssG3fIKgUCSF96qwkmYzifuftmd8dbV5iZ8 5UQ3g9IsvYsOPSXodNwoONQFY0lQl240BJr41wIJCswA3NpmJIY5Hdl8qRWLKZhM2xfU m26FeI4dJLsMDhSmvo/eBn0JI30Kdo1twuxlCkb8lWHQVY5lpmtzTD6DGPMiOWHuS79t ohvX3ZlIwTnke0ysnGyHmYsd0+pihsX8aT/icdC+oQeOgRar1okOcU1sFWgpep3bzy+C PRoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=2pT+IscGWuExGPdn83CWVK3rE7SBnTjHynIgfMd9lyA=; b=oDP3UH7XqKzM4LocuuXMRTPYbrY/D7DR5zd8B9xnjVURYkrnUrnV54u67zxMFXi6JI GbPfX6ijcSmovpHHpM4AAVzvwxQn/YtMhsgWeoFeRyov6FJcxGxo4+PAIkoeAAsmQJeG fEYhF1UKJRRhDCjO2227J7ZB32nxesFVcs+FdyCPuagCo4m3OwlWTw7KSwJNbTE+X+Ew 3UKOXO+0ONzukAE4rdYRK+zc2WqEWu7Cpc2VbToX6FRnZjdw7rNTA3sVp5EWDoYw4ksm 6yNgHHXQnCOCxfBVtM6/1nY25XuIveDUM7i8gUIo+uxbeoe6Qzlgdcv5VuaJ7YiDuNUZ Z9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XoVgSvqX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f38si2812586pgf.206.2018.11.29.16.25.52; Thu, 29 Nov 2018 16:26:08 -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=@kernel.org header.s=default header.b=XoVgSvqX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727169AbeK3Lc2 (ORCPT + 99 others); Fri, 30 Nov 2018 06:32:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:42278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbeK3Lc2 (ORCPT ); Fri, 30 Nov 2018 06:32:28 -0500 Received: from localhost (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30B1620834; Fri, 30 Nov 2018 00:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543537506; bh=Hf149D386J3Z1OvS6vXza4u+QF3kWg9Vsnd1ZNSFyjk=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=XoVgSvqXDtxQXA3tDNR2G8vXGGJjYlBG74Ug/RsGAjRKHgS4Fwh3t1ooPeIrM+TMB jPKOu2Oe8JvFzKQmulPOuub2V4KmfizK5vUZgHy6LDZfeSefTp9zoLP/OfG6kpn6wz Ls21fKNZCKv7hi40UlmvjvjZfi2Cktr2TLObu9Mo= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Andreas Kemnade , bcousson@baylibre.com, letux-kernel@openphoenux.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, mturquette@baylibre.com, paul@pwsan.com, t-kristo@ti.com, tony@atomide.com From: Stephen Boyd In-Reply-To: <20181110203115.13335-3-andreas@kemnade.info> Cc: Andreas Kemnade References: <20181110203115.13335-1-andreas@kemnade.info> <20181110203115.13335-3-andreas@kemnade.info> Message-ID: <154353750560.88331.11814738542436183126@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v2 2/3] clk: ti: check clock type before doing autoidle ops Date: Thu, 29 Nov 2018 16:25:05 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Andreas Kemnade (2018-11-10 12:31:14) > Code might use autoidle api with clocks not being omap2 clocks, > so check if clock type is not basic > = > Signed-off-by: Andreas Kemnade > --- > New in v2 > --- > drivers/clk/ti/autoidle.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > = > diff --git a/drivers/clk/ti/autoidle.c b/drivers/clk/ti/autoidle.c > index 161f67850393..5bdae5552d38 100644 > --- a/drivers/clk/ti/autoidle.c > +++ b/drivers/clk/ti/autoidle.c > @@ -54,8 +54,12 @@ static DEFINE_SPINLOCK(autoidle_spinlock); > int omap2_clk_deny_idle(struct clk *clk) > { > struct clk_hw_omap *c; > + struct clk_hw *hw =3D __clk_get_hw(clk); > = > - c =3D to_clk_hw_omap(__clk_get_hw(clk)); > + if (clk_hw_get_flags(hw) & CLK_IS_BASIC) Please try to avoid using CLK_IS_BASIC if at all possible. Can you? Maybe add some flag in clk_hw_omap() instead?