Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1628604img; Wed, 27 Feb 2019 02:43:44 -0800 (PST) X-Google-Smtp-Source: AHgI3Iazh+k4vEMgmdbzpFYnIY13DRu/R4b6pRYv2k0MmuxsTqLfg0yREMhi5R2AYk9HojVbOt2Z X-Received: by 2002:a17:902:4545:: with SMTP id m63mr1421650pld.71.1551264224487; Wed, 27 Feb 2019 02:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551264224; cv=none; d=google.com; s=arc-20160816; b=fteY1TqRde8odeB+EQddteAXvx1Yotopx9DbnsLvcngbaSlt/K8l53Fml0yw5PNJvx ormR2fsWbDE02Sk366cCdtW5eD89TyVuux75VniB8cgbs7U2iI77Bk49Blwmu0kOhjU2 OugHqRnCIAM3yaISRgi1N6TIZhxhsS8/YCCjKGZPp9jUgaK/v+TOXJutlY5EknPA11Hk OQ6jxZMyMxh2Ltb2s9aFNJB8wAaTMPU6L0qFtEh81GxREIMEARA8ZewmrQRIQqSbUjdl RLbjOgwYMmT2Levh9feXdOkjCGotOgjY26P1gSYMUSH/6YmGbUjVn8BTsWZ5wZwedMlx +Bbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iFQmFxd5XnzDaH0CTevS1hsblX1sSdxEwwbIMUhfbq8=; b=WLe6PYhyydimXa/rPVQ/Dj/vXa1lV15uxebBGGFcfqonwzKwQe0TrW7uYdLWr3KppZ v4/qdFZUvsFc/2duFVqrBfvIX/a64LxCKY7hlCjMx8wrI38/rud4oObonmFlq36hiqar g4ncxCxT+6h2lZW/f5kLvcrrCl6lW7/OX+0IlQ9FGSWy4Wkz1JqVNpO9UgAZW0InH4JE gAFanpRUL80oPKEuVfXWDwj+xGjOET8IzIvxkl9+Joc1102PbWCs52skSVc5+ChE+tD3 ThJ5ZWXjXjGTVDprIeoVrEub00Zq7dEwM5sR8+OYtL7E2uGFsUD03uG1CoY8E3pS4CX8 ApeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n+8TNC53; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b25si11375692pgw.424.2019.02.27.02.43.29; Wed, 27 Feb 2019 02:43:44 -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=@gmail.com header.s=20161025 header.b=n+8TNC53; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbfB0Kly (ORCPT + 99 others); Wed, 27 Feb 2019 05:41:54 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39952 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbfB0Kly (ORCPT ); Wed, 27 Feb 2019 05:41:54 -0500 Received: by mail-wm1-f65.google.com with SMTP id g20so4340455wmh.5 for ; Wed, 27 Feb 2019 02:41:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iFQmFxd5XnzDaH0CTevS1hsblX1sSdxEwwbIMUhfbq8=; b=n+8TNC53fNaUzzJDkLsGqcUORQCdUok7ExG+rZvhrkzfmn7ZCjm4lu4PSZe4aZ2NBV U5n0ohk2LfuO4jy7D9SpCRGw4NBnbtUtEqaIogY/oZavXeanosH/u9mBt2jxN/IuhAKW b9+2qH/Oo8FqG617UgrsqFydqdVaY/aE8ThdeadB/z2DNZK+A87dT9hRumR2oneOtZG3 183v88esaEzugVH1MZsRqoX9GFUMz4djilMSgpkXW67x93M8m6WXq5oPtRxfiQk9/AQI oDaR4v+5p+djdpVsSAQ8wSQ6oLc8Fp4IgC5/PdQIwA12sYliJFlt2v7GumUziE5wfGVl sdbw== 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=iFQmFxd5XnzDaH0CTevS1hsblX1sSdxEwwbIMUhfbq8=; b=h7cjufiAx/M1gdH6uYHjtW7lxy4rsnBqDpTTC/yNRwjctVidc/QExrxHaAWtADk55I Tg4MVrmyXhArAMxHJpGslxbXdCGlhPyHNrcOFGneLWUY17xW/F8eQwOkepMfjSYaMvrx 6JLbOoaFdjDzndX/l0pKu4yUiwormJKM4P0XRdPpZwsKCUqjJpxvVgP6Dtq243bdK1pg y8nmE9Un9gUKUrV+iANmHxOelFVFwaD4kzDQ9siWtg/goX70d0jts9MJ52NC61hJXkTt Bif1daAyMQNj6EEM7qE1pNKfhjBbB/MNafOj8qMAWPWfVvMI49+arSOYZuFC1P5AxR6g KUzQ== X-Gm-Message-State: AHQUAuYHcxRMnBgUFLKopehd0b82VkAuuR2Spp5KAzhoHcZEojU/aBq6 NMdnh7AGqroAVgTsu+xxxIM= X-Received: by 2002:a1c:7415:: with SMTP id p21mr1880040wmc.31.1551264111631; Wed, 27 Feb 2019 02:41:51 -0800 (PST) Received: from localhost (pD9E51D2D.dip0.t-ipconnect.de. [217.229.29.45]) by smtp.gmail.com with ESMTPSA id f7sm14456429wru.3.2019.02.27.02.41.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 02:41:50 -0800 (PST) Date: Wed, 27 Feb 2019 11:41:48 +0100 From: Thierry Reding To: Russell King - ARM Linux admin Cc: Sameer Pujar , digetx@gmail.com, jhogan@kernel.org, jonathanh@nvidia.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: tegra: enforce PM requirement Message-ID: <20190227104148.GA14928@ulmo> References: <1551169537-17548-1-git-send-email-spujar@nvidia.com> <20190226091308.ycruijz2lcziv5gt@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: <20190226091308.ycruijz2lcziv5gt@shell.armlinux.org.uk> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 26, 2019 at 09:13:08AM +0000, Russell King - ARM Linux admin wr= ote: > On Tue, Feb 26, 2019 at 01:55:37PM +0530, Sameer Pujar wrote: > > The requirement for this came while adding runtime PM support for HDA > > driver. There were concerns about driver explicitly handling !PM case. > > In general, drivers need to handle !PM case with work arounds for > > managing clocks and power explicitly, which is not really necessary > > when PM support on tegra is in good shape. In fact ARM 64-bit Tegra > > platforms enforce PM support and there is no reason why this cannot be > > done for 32-bit. > >=20 > > More details with regards to above can be found in following patch, > > http://patchwork.ozlabs.org/patch/1036645/ > >=20 > > This patch selects PM unconditionally and drivers can rely on runtime > > PM framework for clock and power management. >=20 > What if the drivers are re-used on another SoC IP? Doesn't this lead > to unexpected failures? I suppose it would if the configuration doesn't enable PM. In practice I don't think this happens very often. I'm also not aware of any of the IP blocks in Tegra being reused on other SoCs, so I think the risk of this happening isn't very high. > If you want to do this, maybe also make those drivers depend on PM as > well? That said, I think adding the dependency on PM is good documentation and would prevent the cases that you're describing from happening, so I'll see to it that we get it added where needed. I think all drivers currently support running without PM, but the code to do it is cumbersome and highly repetitive. I think we can add the PM dependency at the same time that we remove the !PM boilerplate. Thierry > > Signed-off-by: Sameer Pujar > > Reviewed-by: Thierry Reding > > Reviewed-by: Jonathan Hunter > > --- > > arch/arm/mach-tegra/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig > > index 7f3b83e..51a8fa3 100644 > > --- a/arch/arm/mach-tegra/Kconfig > > +++ b/arch/arm/mach-tegra/Kconfig > > @@ -10,6 +10,7 @@ menuconfig ARCH_TEGRA > > select HAVE_ARM_SCU if SMP > > select HAVE_ARM_TWD if SMP > > select PINCTRL > > + select PM > > select PM_OPP > > select ARCH_HAS_RESET_CONTROLLER > > select RESET_CONTROLLER > > --=20 > > 2.7.4 > >=20 > >=20 >=20 > --=20 > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbp= s up > According to speedtest.net: 11.9Mbps down 500kbps up --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlx2aWgACgkQ3SOs138+ s6GRnxAAoIi3Mtv92T+80o4s613ECyatQqkuTMIFOoh4UMABqRyDN954lgPQM35+ cgq8OheVftM+5hOtp8M3nI5+GWx+DYKqD6s+4dNzCm/OtJm762p8kx7Jk0hhcX4a QQu163amohfQKbNlblfAVCwrZyrqv7uQyCpe4LrVW1Vw/rLpQAkHhPLc0EtqqmQP Xpvs/iVOxe43yrvCTaqmNMPOvUGzgZ72tse0L90U4wP0FWlBgXtwj10wnqCMOIA1 wE96IVAFaV34cncSeKHFbr5FcR3pH598QpncKRm2fRFwlF0WoicSwMPqZfQ4YfGJ Qpk07aeIZUbesS2/k0aTAu3Yjx6lx7lT9OS1bTz4YUcIwZGFngPlSGa8G4ZMoxNB RG8DkKMpdlIg4dNKaRWTHkmskollQ5WEeQrmID7d/zdpyAQYB6suz1VIQ1zZ9i/p 31BFQOBVNLQJ5OonUG3EAYHpfX1cT4LJTWjYrFASb11xMt5qoMdSVW/wxu6L+Uv1 /uPSRBMIeasOanyYVJHjOxDxXwv5BJtWNv1nRJu/ANFgne/mJcBUbFPE2VGm8EyY wOAcj8usF31zw7YI7rhaW4FSgDrUL2xebpjs6MSLa/fM5PvCzGyLtjzSiixw3G42 IB7RX3A943hrlveURV3m39uTlNdoAjORLBkQ1LMUMuUVbih1AGo= =sjfW -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb--