Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp493558pxb; Wed, 27 Jan 2021 12:57:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVge1Cwep1Hq3lhfCyNpHAvL61eRRANjZE8gkieW54hFO6QdzWqhFejP+xmtq7/uOOXdWi X-Received: by 2002:a17:906:dfce:: with SMTP id jt14mr8059450ejc.435.1611781031261; Wed, 27 Jan 2021 12:57:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611781031; cv=none; d=google.com; s=arc-20160816; b=TmpECPRgCdeNnbyN3OHcQ0eil3gsEXl1ZvsG7wKhzyqzYYV7l6rq7NSQdtfBHE2IRc BtOEQNnbrqkCqbaINqgil8ZaPSXiY0voKE3xUV0vXZI+xGwadLbmADCs95Je4MqLeBLV LI8o3I8K0JfqmjaGimsMbdE21lB7FMONscI1eXHKIOWUyJ6gqnYSCVqukKkTVVC4wLgG d+fchHPebZGyxz39P0vB+Wo3vG/NtNygWFvMIa6yql1y22FmvandEg1j2bMurPLOpYw8 7BzF2cWFtTt49pxoxR6MYwgwdXxnfmM55DgQJxctKoqgFbZaWZWFhKQ+fE+wqk9jOHvf hiPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=65VNlJixq/1dzn5bOgjm//zPTu/98GsClCV3pSzlAtM=; b=IAAQIKhf9cKMHHdFz32nJGjT9paqJkTYq8XFArOUdznEPdhi/xcg71D4usP2Hq1p+P t1Sj0hL4/+E8ucT9AHB5EE3Q9vhtmsJo4ZrYJe69WfQ20FTVUU2bacRlBxvXWtHbQZM3 /IkDoA6lMzslVc5NRq0wYQg+Xco2RH5hGsWDUKd2lGQOJvVvZb3pJ25RTZyNLCO4TPrv 0v5Ec3DZTnkyBdkZ+5C8lBdZclyDXWV7se6W9rACL6K4gXBMntUQAvb3NkcZFP3zHfs6 mGsEaMZoJ0NuiH+Ef/NXdNgJo0kcvnWIKrolITkxpJ6hFHxHd6TqMLfGiXMycVF3BmPt C6RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jEHjHP/c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si1304578eju.209.2021.01.27.12.56.45; Wed, 27 Jan 2021 12:57:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jEHjHP/c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237671AbhA0D5a (ORCPT + 99 others); Tue, 26 Jan 2021 22:57:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405314AbhA0BpK (ORCPT ); Tue, 26 Jan 2021 20:45:10 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEB29C0613D6 for ; Tue, 26 Jan 2021 17:34:03 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id e9so147826plh.3 for ; Tue, 26 Jan 2021 17:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=65VNlJixq/1dzn5bOgjm//zPTu/98GsClCV3pSzlAtM=; b=jEHjHP/cnFWaZFlBfcWchXUJjmWOa4pmx9NB2YknMeuj0fkJBShNm51mcmIAbX9C0+ yKLzDbiPNot9S35nJ+6iQqZPppKJyfM8qRMGoAMBZHNAVwZAkod2SG3wn4AH1oA8rQMn NlBEZ+TEvlrJFmz/hfqxPsnAmXSxeyEyBtnKwI0WTG6+kvNSZXbGOuWtkXnnmIg0gTOv HSBjnLclD3CCAIxeS44bdXqMOQbr+yNJQveGHQDBftx+1Sf+ZuRay1kkEaPetSLgPtQJ WZfYaUYNh7+t+eZXYaPOHYHJ3bP/fzEy+4OP5gE7MDTffZXILIp5hnmWZE9Xzeu00rme aeDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=65VNlJixq/1dzn5bOgjm//zPTu/98GsClCV3pSzlAtM=; b=ZODtN4pFQZV2FTxNpyrHGuh2xRPg5Vm70zLnR8QAzfvl/Lrpmf4BHPiUoXJtNH1g/T omJvsp2MRgeATI4ciutmLj5dX1GoX+dR0ylE6BxSG4q6cdwB977kkNsPeZ6HKVDi+QEO L3XVLPG95uuM/hBh1Q9jp87lqgMohpE2yX5iFzRL2i6STWq50ODuQbuk7BZ29sDsUP7q x03fOLlYxL9wDMV6SJlgX/28hZHFPMHI4eqQbgrJaDr8a2a6rwyn0qguym9JjnfKwZbY zwQSSeORs8YEJdCueH4FIngRphn76I6NUi8npvimPEkyKtMuWZiFTUKC8kwwaOt56Zni MGqg== X-Gm-Message-State: AOAM532y96xlkkBg8M2hX9pdED89Niy2vN48wu8lprXD+803SD7OhlZT 6t9PV7AJrsXCTtw0hHTcjSXaZg== X-Received: by 2002:a17:903:181:b029:df:c7e5:8e39 with SMTP id z1-20020a1709030181b02900dfc7e58e39mr9007839plg.25.1611711243144; Tue, 26 Jan 2021 17:34:03 -0800 (PST) Received: from dragon (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id a7sm162069pju.28.2021.01.26.17.34.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jan 2021 17:34:02 -0800 (PST) Date: Wed, 27 Jan 2021 09:33:56 +0800 From: Shawn Guo To: Thara Gopinath Cc: agross@kernel.org, bjorn.andersson@linaro.org, dan.j.williams@intel.com, vkoul@kernel.org, srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] dma: qcom: bam_dma: Manage clocks when controlled_remotely is set Message-ID: <20210127013355.GF17701@dragon> References: <20210126211859.790892-1-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210126211859.790892-1-thara.gopinath@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 26, 2021 at 04:18:59PM -0500, Thara Gopinath wrote: > When bam dma is "controlled remotely", thus far clocks were not controlled > from the Linux. In this scenario, Linux was disabling runtime pm in bam dma > driver and not doing any clock management in suspend/resume hooks. > > With introduction of crypto engine bam dma, the clock is a rpmh resource > that can be controlled from both Linux and TZ/remote side. Now bam dma > clock is getting enabled during probe even though the bam dma can be > "controlled remotely". But due to clocks not being handled properly, > bam_suspend generates a unbalanced clk_unprepare warning during system > suspend. > > To fix the above issue and to enable proper clock-management, this patch > enables runtim-pm and handles bam dma clocks in suspend/resume hooks if > the clock node is present irrespective of controlled_remotely property. > > Signed-off-by: Thara Gopinath Reviewed-by: Shawn Guo