From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753214AbbCKJEI (ORCPT ); Wed, 11 Mar 2015 05:04:08 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:55479 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbbCKJDu (ORCPT ); Wed, 11 Mar 2015 05:03:50 -0400 Date: Wed, 11 Mar 2015 10:03:45 +0100 From: Sascha Hauer To: James Liao Cc: Kevin Hilman , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Brugger , linux-mediatek@lists.infradead.org, kernel@pengutronix.de Subject: Re: [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver Message-ID: <20150311090345.GR24885@pengutronix.de> References: <1425888603-25800-1-git-send-email-s.hauer@pengutronix.de> <1425888603-25800-3-git-send-email-s.hauer@pengutronix.de> <7h61a94zy0.fsf@deeprootsystems.com> <20150310094142.GD24885@pengutronix.de> <1426043791.24243.9.camel@mtksdaap41> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1426043791.24243.9.camel@mtksdaap41> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 10:00:21 up 2 days, 21 min, 60 users, load average: 0.35, 0.15, 0.19 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2015 at 11:16:31AM +0800, James Liao wrote: > Hi, > > On Tue, 2015-03-10 at 10:41 +0100, Sascha Hauer wrote: > > On Mon, Mar 09, 2015 at 02:35:03PM -0700, Kevin Hilman wrote: > > > Sascha Hauer writes: > > > > > > > Signed-off-by: Sascha Hauer > > > > > > A bit of a changelog here would be useful describing this driver, that > > > it's only covering part of the device (e.g. power controller) with more > > > to come, dependency on the syscon driver, etc. > > > > > > > +/* > > > > + * The Infracfg unit has bus protection bits. We enable the bus protection > > > > + * for disabled power domains so that the system does not hang when some unit > > > > + * accesses the bus while in power down. > > > > + */ > > > > > > Hmm, why don't you want to know if some device is accessing another > > > device which is in a domain that is powered down? Seems like this is a > > > good way to hide real bugs. > > > > How I understand it the system just hangs on erroneous accesses without > > these protection bits enabled, so enabling them at least makes sure we > > can output something. > > I must admit though that my understanding of these bits is quite limited > > and the only user of this driver I have available here (audio) doesn't > > make use of these protection bits, so I can't test here. > > > > James, could you shed some light on this issue? > > I asked our designer about the bus protection feature, here is his > response: > > " > It's for unexpected signal glitch in Power switch process. > > During Power switch process, we have clock switch, reset, isolation > enable/disable and power switch involved where the transition of > asynchronous reset and isolation is the most critical one, which have > risk to introduce a unexpected short period signal transition from > MTCMOS’s interface to other alive HW . > " > > That means it protects unexpected bus accessing from HW, not from SW. So > it will not hide bugs from wrong SW access. Ok, thanks for clarifying. This means we should enable this feature sooner or later. Since the audio driver which is likely the first user of this driver doesn't need the protection bits I think we have some time and can add the protection bits once the clock patches have been merged. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sascha Hauer Subject: Re: [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver Date: Wed, 11 Mar 2015 10:03:45 +0100 Message-ID: <20150311090345.GR24885@pengutronix.de> References: <1425888603-25800-1-git-send-email-s.hauer@pengutronix.de> <1425888603-25800-3-git-send-email-s.hauer@pengutronix.de> <7h61a94zy0.fsf@deeprootsystems.com> <20150310094142.GD24885@pengutronix.de> <1426043791.24243.9.camel@mtksdaap41> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1426043791.24243.9.camel@mtksdaap41> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: James Liao Cc: Kevin Hilman , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Matthias Brugger , linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: devicetree@vger.kernel.org On Wed, Mar 11, 2015 at 11:16:31AM +0800, James Liao wrote: > Hi, >=20 > On Tue, 2015-03-10 at 10:41 +0100, Sascha Hauer wrote: > > On Mon, Mar 09, 2015 at 02:35:03PM -0700, Kevin Hilman wrote: > > > Sascha Hauer writes: > > >=20 > > > > Signed-off-by: Sascha Hauer > > >=20 > > > A bit of a changelog here would be useful describing this driver,= that > > > it's only covering part of the device (e.g. power controller) wit= h more > > > to come, dependency on the syscon driver, etc. > > >=20 > > > > +/* > > > > + * The Infracfg unit has bus protection bits. We enable the bu= s protection > > > > + * for disabled power domains so that the system does not hang= when some unit > > > > + * accesses the bus while in power down. > > > > + */ > > >=20 > > > Hmm, why don't you want to know if some device is accessing anoth= er > > > device which is in a domain that is powered down? Seems like th= is is a > > > good way to hide real bugs. > >=20 > > How I understand it the system just hangs on erroneous accesses wit= hout > > these protection bits enabled, so enabling them at least makes sure= we > > can output something. > > I must admit though that my understanding of these bits is quite li= mited > > and the only user of this driver I have available here (audio) does= n't > > make use of these protection bits, so I can't test here. > >=20 > > James, could you shed some light on this issue? >=20 > I asked our designer about the bus protection feature, here is his > response: >=20 > " > It's for unexpected signal glitch in Power switch process. >=20 > During Power switch process, we have clock switch, reset, isolation > enable/disable and power switch involved where the transition of > asynchronous reset and isolation is the most critical one, which ha= ve > risk to introduce a unexpected short period signal transition from > MTCMOS=E2=80=99s interface to other alive HW .=20 > " >=20 > That means it protects unexpected bus accessing from HW, not from SW.= So > it will not hide bugs from wrong SW access. Ok, thanks for clarifying. This means we should enable this feature sooner or later. Since the audio driver which is likely the first user of this driver doesn't need the protection bits I think we have some time and can add the protection bits once the clock patches have been merged. Sascha --=20 Pengutronix e.K. | = | Industrial Linux Solutions | http://www.pengutronix.de/= | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 = | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-555= 5 | -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: s.hauer@pengutronix.de (Sascha Hauer) Date: Wed, 11 Mar 2015 10:03:45 +0100 Subject: [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver In-Reply-To: <1426043791.24243.9.camel@mtksdaap41> References: <1425888603-25800-1-git-send-email-s.hauer@pengutronix.de> <1425888603-25800-3-git-send-email-s.hauer@pengutronix.de> <7h61a94zy0.fsf@deeprootsystems.com> <20150310094142.GD24885@pengutronix.de> <1426043791.24243.9.camel@mtksdaap41> Message-ID: <20150311090345.GR24885@pengutronix.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Mar 11, 2015 at 11:16:31AM +0800, James Liao wrote: > Hi, > > On Tue, 2015-03-10 at 10:41 +0100, Sascha Hauer wrote: > > On Mon, Mar 09, 2015 at 02:35:03PM -0700, Kevin Hilman wrote: > > > Sascha Hauer writes: > > > > > > > Signed-off-by: Sascha Hauer > > > > > > A bit of a changelog here would be useful describing this driver, that > > > it's only covering part of the device (e.g. power controller) with more > > > to come, dependency on the syscon driver, etc. > > > > > > > +/* > > > > + * The Infracfg unit has bus protection bits. We enable the bus protection > > > > + * for disabled power domains so that the system does not hang when some unit > > > > + * accesses the bus while in power down. > > > > + */ > > > > > > Hmm, why don't you want to know if some device is accessing another > > > device which is in a domain that is powered down? Seems like this is a > > > good way to hide real bugs. > > > > How I understand it the system just hangs on erroneous accesses without > > these protection bits enabled, so enabling them at least makes sure we > > can output something. > > I must admit though that my understanding of these bits is quite limited > > and the only user of this driver I have available here (audio) doesn't > > make use of these protection bits, so I can't test here. > > > > James, could you shed some light on this issue? > > I asked our designer about the bus protection feature, here is his > response: > > " > It's for unexpected signal glitch in Power switch process. > > During Power switch process, we have clock switch, reset, isolation > enable/disable and power switch involved where the transition of > asynchronous reset and isolation is the most critical one, which have > risk to introduce a unexpected short period signal transition from > MTCMOS?s interface to other alive HW . > " > > That means it protects unexpected bus accessing from HW, not from SW. So > it will not hide bugs from wrong SW access. Ok, thanks for clarifying. This means we should enable this feature sooner or later. Since the audio driver which is likely the first user of this driver doesn't need the protection bits I think we have some time and can add the protection bits once the clock patches have been merged. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |