From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753543AbdAZJ5h (ORCPT ); Thu, 26 Jan 2017 04:57:37 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:48430 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753352AbdAZJ5f (ORCPT ); Thu, 26 Jan 2017 04:57:35 -0500 Date: Thu, 26 Jan 2017 10:57:33 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: Rob Herring , Mark Rutland , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH 04/11] clk: sunxi-ng: Support separately grouped PLL lock status register Message-ID: <20170126095733.azlzxmz63vxajlen@lukather> References: <20170124023230.3990-1-wens@csie.org> <20170124023230.3990-5-wens@csie.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3psekbt6p5pgqzqx" Content-Disposition: inline In-Reply-To: <20170124023230.3990-5-wens@csie.org> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3psekbt6p5pgqzqx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Jan 24, 2017 at 10:32:23AM +0800, Chen-Yu Tsai wrote: > On the Allwinner A80 SoC, the PLL lock status indicators are grouped > together in a separate register, as opposed to being scattered in each > PLL's configuration register. >=20 > Add a flag to support this. >=20 > Signed-off-by: Chen-Yu Tsai > --- > drivers/clk/sunxi-ng/ccu_common.c | 8 ++++++-- > drivers/clk/sunxi-ng/ccu_common.h | 2 ++ > 2 files changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/clk/sunxi-ng/ccu_common.c b/drivers/clk/sunxi-ng/ccu= _common.c > index 51d4bac97ab3..3fd0c3331aff 100644 > --- a/drivers/clk/sunxi-ng/ccu_common.c > +++ b/drivers/clk/sunxi-ng/ccu_common.c > @@ -25,13 +25,17 @@ static DEFINE_SPINLOCK(ccu_lock); > =20 > void ccu_helper_wait_for_lock(struct ccu_common *common, u32 lock) > { > + void __iomem *addr; > u32 reg; > =20 > if (!lock) > return; > =20 > - WARN_ON(readl_relaxed_poll_timeout(common->base + common->reg, reg, > - reg & lock, 100, 70000)); > + addr =3D common->base + common->reg; > + if (common->features & CCU_FEATURE_LOCK_REG) > + addr =3D common->base + common->lock_reg; I'd rather have an else here (but it's really just a nitpick). Thanks, Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --3psekbt6p5pgqzqx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYicgNAAoJEBx+YmzsjxAgP10P/jCWBqzRG2wZ4YYJSzysmrEz 3ay9nJ1k9AZBW3JpqdQ6qWhPnedlNbBxkV1lvneihpiwrapSoHGkCyrccwLpYXSp SiqBylPObXTkbQ6nLuI3S2ql7ubus9rY3eODkJIpoi/sDx/sIzAFQiNx80UrpDEA lOseucMvRekn++YLrnl+nf0h4Hx8tXsplUNHrV0DnDlZNenyI83AzdGZN8RN98Yp vrjvhSTqLnQ1fNSsaYR99c6qutZJZbu6dsEKjmM+/sgnmkxYueMcztISaSdZj0lV /L+HjUIfT2ziv/6vo4S68r0Mp3qia3mabkiiES1a+JJC6fbQBjas+yMS7Her00zS vBe1+SYq9Hif4kH6uoqeRplURozoe2RC9ZUUhXZ8oK9dGH0RV5QqO9mj9+/IVrS0 +XtHqpafxOpBRlm848WL1n7tpsauYihkcuGQrBl2VUjXMRjE31ettegtcCEWia6L ehcgbBAUaS8HUpx6tRQHukdIntA3x4aezvfiGrD4AHEGfbLQYemRARqioLBc93Ek /141HPccvaQX8mxM9IwLarXfy5RGBaUH3u/0q3pt3YclKxSPlHTHZuZSBNX5xnfk Q+FRm9FlHvj3IyMgQ79Drwh7ybZta8oKF3DMzw/r8d38hAEOeE4KQd9UvQPDZoKN TK+QvifTfEcRthsnfgMJ =Vznr -----END PGP SIGNATURE----- --3psekbt6p5pgqzqx-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Thu, 26 Jan 2017 10:57:33 +0100 Subject: [PATCH 04/11] clk: sunxi-ng: Support separately grouped PLL lock status register In-Reply-To: <20170124023230.3990-5-wens@csie.org> References: <20170124023230.3990-1-wens@csie.org> <20170124023230.3990-5-wens@csie.org> Message-ID: <20170126095733.azlzxmz63vxajlen@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Tue, Jan 24, 2017 at 10:32:23AM +0800, Chen-Yu Tsai wrote: > On the Allwinner A80 SoC, the PLL lock status indicators are grouped > together in a separate register, as opposed to being scattered in each > PLL's configuration register. > > Add a flag to support this. > > Signed-off-by: Chen-Yu Tsai > --- > drivers/clk/sunxi-ng/ccu_common.c | 8 ++++++-- > drivers/clk/sunxi-ng/ccu_common.h | 2 ++ > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/sunxi-ng/ccu_common.c b/drivers/clk/sunxi-ng/ccu_common.c > index 51d4bac97ab3..3fd0c3331aff 100644 > --- a/drivers/clk/sunxi-ng/ccu_common.c > +++ b/drivers/clk/sunxi-ng/ccu_common.c > @@ -25,13 +25,17 @@ static DEFINE_SPINLOCK(ccu_lock); > > void ccu_helper_wait_for_lock(struct ccu_common *common, u32 lock) > { > + void __iomem *addr; > u32 reg; > > if (!lock) > return; > > - WARN_ON(readl_relaxed_poll_timeout(common->base + common->reg, reg, > - reg & lock, 100, 70000)); > + addr = common->base + common->reg; > + if (common->features & CCU_FEATURE_LOCK_REG) > + addr = common->base + common->lock_reg; I'd rather have an else here (but it's really just a nitpick). Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: