Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932195AbbHFKDU (ORCPT ); Thu, 6 Aug 2015 06:03:20 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:56306 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932166AbbHFKDS (ORCPT ); Thu, 6 Aug 2015 06:03:18 -0400 Date: Thu, 6 Aug 2015 12:03:11 +0200 From: Sascha Hauer To: Scott Shu Cc: Matthias Brugger , Mark Rutland , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com, loda.chou@mediatek.com, jades.shih@mediatek.com, Mars.Cheng@mediatek.com, scott.shu@gmail.com, djkurtz@chromium.org Subject: Re: [PATCH v3 3/8] soc: Mediatek: Add SCPSYS CPU power domain driver Message-ID: <20150806100311.GP18700@pengutronix.de> References: <1438696464-59858-1-git-send-email-scott.shu@mediatek.com> <1438696464-59858-4-git-send-email-scott.shu@mediatek.com> <20150805085034.GG18700@pengutronix.de> <1438829942.9435.24.camel@mtkswgap22> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438829942.9435.24.camel@mtkswgap22> 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: 11:01:47 up 42 days, 3:23, 106 users, load average: 0.37, 0.19, 0.16 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 Content-Length: 2135 Lines: 62 On Thu, Aug 06, 2015 at 10:59:02AM +0800, Scott Shu wrote: > On Wed, 2015-08-05 at 10:50 +0200, Sascha Hauer wrote: > > don't do this then it indeed doesn't make much sense to put it into the > > same file. > > > > From what I see we would need to change the prototype to something like > > > > static int __scpsys_power_on(struct scp_domain_data *) > > > > (maybe with some additional base addresses and stuff) > > > > struct scp_domain_data would additionally need sram_isoint_b and sram_ckiso > > members. > > > > Sascha > > > Hi Sascha, > The CPU power sequence is quite different with the others, as > described below. > > * Non-CPU > 1) Set PWR_ON_BIT, PWR_ON_2ND_BIT > 2) Wait PWR_ACK > 3) Clear PWR_CLK_DIS_BIT > 4) Clear PWR_ISO_BIT > 5) Set PWR_RST_B_BIT > 6) Clear SRAM_PDN > 7) Wait SRAM_PDN_ACK > * CPU > 1) Set PWR_ON_BIT, PWR_ON_2ND_BIT > 2) Wait PWR_ACK > 3) Clear PWR_ISO_BIT > 4) Clear L1_PDN to power on L1 > 5) Wait L1_PDN_ACK > 6) Set SRAM_ISOINT_B > 7) Clear SRAM_CKISO > 8) Clear PWR_CLK_DIS > 9) Set PWR_RST_B > For multi-cluster SoC, the cluster power sequence is also different. > > Please think if this is a good idea if we integrate the CPU support into > the scpsys_power_on()? Based on the readability and compatible > considerations, we provide this patch. Maybe it's best if you go back to the v1 layout and put your scpsys code to arch/arm/mach-mediatek/. While I think it's possible to share some more code I am not sure anymore if this buys us something. We'll know in the future. 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 | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/