From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbbCJQAZ (ORCPT ); Tue, 10 Mar 2015 12:00:25 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35234 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbbCJQAX (ORCPT ); Tue, 10 Mar 2015 12:00:23 -0400 From: Kevin Hilman To: Sascha Hauer Cc: devicetree@vger.kernel.org, James Liao , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, kernel@pengutronix.de, Matthias Brugger , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver 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> <20150310144053.GH24885@pengutronix.de> Date: Tue, 10 Mar 2015 09:00:19 -0700 In-Reply-To: <20150310144053.GH24885@pengutronix.de> (Sascha Hauer's message of "Tue, 10 Mar 2015 15:40:53 +0100") Message-ID: <7hoao0yh9o.fsf@deeprootsystems.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sascha Hauer writes: > On Tue, Mar 10, 2015 at 10:41:42AM +0100, Sascha Hauer wrote: >> > > + if (data->bus_prot_mask) { >> > > + u32 mask = data->bus_prot_mask; >> > > + struct regmap *infracfg = scp->infracfg; >> > > + >> > > + regmap_update_bits(infracfg, INFRA_TOPAXI_PROTECTEN, mask, 0); >> > > + >> > > + expired = jiffies + HZ; >> > > + >> > > + while (1) { >> > > + u32 val; >> > > + >> > > + ret = regmap_read(infracfg, INFRA_TOPAXI_PROTECTSTA1, &val); >> > > + if (ret) >> > > + return ret; >> > > + >> > > + if (!(val & mask)) >> > > + break; >> > > + >> > > + cpu_relax(); >> > > + if (time_after(jiffies, expired)) >> > > + return -EIO; >> > > + } >> > > + } >> > >> > This whole "Clear bus protection bits" part seems like it should be an >> > API in the infracfg driver. >> >> Ok, can do. > > Since the infracfg driver (which is really a clk driver) currently is > pending for inclusion I don't want to add more patches to it. I decided > to drop the protection bits for now and come back to this once the > infracfg driver is merged. Makes sense to me. Hopefully by then, we can have a bit more clarity from the MTK folks also. Kevin