From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40D5BC43381 for ; Mon, 1 Apr 2019 08:15:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C51D2084B for ; Mon, 1 Apr 2019 08:15:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EyO6pZGH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C51D2084B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=toB0S1nDper0PgQa56KQFfrxQmUHIHt+ZQQc5MpB980=; b=EyO6pZGHVGUTxR8xWpzl4DJ80 aUhGXoNPLllJyAKT9doyw2cvKoMim4XWatPeg0okqYP+Sg0dwKU2h+e2A+9P5BR/e1PfxD2HeJ73R 19r5LVg3hEV5BPRT2IQIesiFWY2vDlbQYK8xyxjbFopxXtCJgNBlprKVXOHGbM7KCSaFeXl/SXZnC 3hDcH8CGUOCDUdQZFDjkQ4tEC2dU9XfDkQ81/F2GybhKz9tUR8V80O24fBiM+RVOLQkJ1rk+ZHiOu Oyz0jgmDiZpv/sL0IyuugnFJgYMZgZtePp2d0G5vYdD1epG00ONttFIN9MenBkJ5Cu0LHg2sUXLfR Va+ct90FQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAs6X-0004zG-6F; Mon, 01 Apr 2019 08:15:41 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAs6S-0004xo-1Q for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 08:15:39 +0000 X-Originating-IP: 90.88.32.136 Received: from localhost (aaubervilliers-681-1-91-136.w90-88.abo.wanadoo.fr [90.88.32.136]) (Authenticated sender: maxime.ripard@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C5E8924000F; Mon, 1 Apr 2019 08:15:24 +0000 (UTC) Date: Mon, 1 Apr 2019 10:15:24 +0200 From: Maxime Ripard To: Rob Herring Subject: Re: [PATCH 08/14] clk: sunxi-ng: v3s: add Allwinner V3 support Message-ID: <20190401081524.bickdv7kr4kcnsgm@flea> References: <20190312152256.35574-1-icenowy@aosc.io> <20190312152256.35574-9-icenowy@aosc.io> <20190328132721.GA32178@bogus> MIME-Version: 1.0 In-Reply-To: <20190328132721.GA32178@bogus> User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_011536_381890_1EF12327 X-CRM114-Status: GOOD ( 20.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Linus Walleij , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Chen-Yu Tsai , Jagan Teki , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng Content-Type: multipart/mixed; boundary="===============4450394412603739358==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4450394412603739358== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jc3kve7lqqq7wqjx" Content-Disposition: inline --jc3kve7lqqq7wqjx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 28, 2019 at 08:27:21AM -0500, Rob Herring wrote: > On Tue, Mar 12, 2019 at 11:22:50PM +0800, Icenowy Zheng wrote: > > Allwinner V3 has the same main die with V3s, but with more pins wired. > > There's a I2S bus on V3 that is not available on V3s. > > > > Add the V3-only peripheral's clocks and reset to the V3s CCU driver, > > bound to a new V3 compatible string. The driver name is not changed > > because it's part of the device tree binding (the header file name). > > > > Signed-off-by: Icenowy Zheng > > --- > > drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 225 +++++++++++++++++++++- > > drivers/clk/sunxi-ng/ccu-sun8i-v3s.h | 2 +- > > include/dt-bindings/clock/sun8i-v3s-ccu.h | 4 + > > include/dt-bindings/reset/sun8i-v3s-ccu.h | 3 + > > 4 files changed, 231 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-v3s.c b/drivers/clk/sunxi-ng/ccu-sun8i-v3s.c > > index cbba04f5f761..81450ea8faa2 100644 > > --- a/drivers/clk/sunxi-ng/ccu-sun8i-v3s.c > > +++ b/drivers/clk/sunxi-ng/ccu-sun8i-v3s.c > > @@ -242,6 +242,8 @@ static SUNXI_CCU_GATE(bus_codec_clk, "bus-codec", "apb1", > > 0x068, BIT(0), 0); > > static SUNXI_CCU_GATE(bus_pio_clk, "bus-pio", "apb1", > > 0x068, BIT(5), 0); > > +static SUNXI_CCU_GATE(bus_i2s0_clk, "bus-i2s0", "apb1", > > + 0x068, BIT(12), 0); > > > > static SUNXI_CCU_GATE(bus_i2c0_clk, "bus-i2c0", "apb2", > > 0x06c, BIT(0), 0); > > @@ -313,6 +315,11 @@ static SUNXI_CCU_MP_WITH_MUX_GATE(spi0_clk, "spi0", mod0_default_parents, 0x0a0, > > BIT(31), /* gate */ > > 0); > > > > +static const char * const i2s_parents[] = { "pll-audio-8x", "pll-audio-4x", > > + "pll-audio-2x", "pll-audio" }; > > +static SUNXI_CCU_MUX_WITH_GATE(i2s0_clk, "i2s0", i2s_parents, > > + 0x0b0, 16, 2, BIT(31), CLK_SET_RATE_PARENT); > > + > > static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M", > > 0x0cc, BIT(8), 0); > > static SUNXI_CCU_GATE(usb_ohci0_clk, "usb-ohci0", "osc24M", > > @@ -445,6 +452,80 @@ static struct ccu_common *sun8i_v3s_ccu_clks[] = { > > &mipi_csi_clk.common, > > }; > > > > +static struct ccu_common *sun8i_v3_ccu_clks[] = { > > Seems like a bunch of duplication for just 2 differences in clocks. > Can't you keep the definitions the same and just skip registering the > clocks not present? I'd rather not, this can lead to access to registers that might not be there when the CCF will read / write that clock Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --jc3kve7lqqq7wqjx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXKHInAAKCRDj7w1vZxhR xZ+WAP92QhUeKofhCPBW2R6w+MmaHaURTZ1S7Q0dQwrc7GzGIwEAnITh/XSIMAU7 l1W4aXbf1ct2/M9dDexttVTYemsRmwc= =QvxI -----END PGP SIGNATURE----- --jc3kve7lqqq7wqjx-- --===============4450394412603739358== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4450394412603739358==--