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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 185DFC3DA63 for ; Tue, 23 Jul 2024 06:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc: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=fE/FCJGi8alkj8m+uTf5rAy2N0GOp6TUrRKanbkAfr0=; b=S9ik3Y1fJnsuqdGTlEaMRllZwI au6K0b9bMhsKP+v1Fgt8ZMVdP/WLSEb3ntLjFecHPCJwetBb4cgfojFRJ7Vz9sj6khSQz+WmjAHVs 758xhN1Od1INBl0sk6OS7qHR6icIoq1PuOLCI3Ladk/qsZ3H6Gux70jZZUvBOsROvVJo5ahdHBuSM JOAmOgfJHVRVrtUzXGoUhCFYNfzrKIQy/3NNk9co6xwe7VFZmo+a7hk55ZhvTArZQMt82O/qT5uAR qqAupGUuNNy35WmgEGS59INCi/2pYZDM/xdALliKOwq/TQ6UHaQeVoT54tMVKvwATjUjKaSun1DMK 9y7+kwGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sW8xy-0000000BTNP-4ADw; Tue, 23 Jul 2024 06:25:42 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sW8xc-0000000BTKQ-0YRZ for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2024 06:25:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id AC025CE0CF9; Tue, 23 Jul 2024 06:25:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45486C4AF09; Tue, 23 Jul 2024 06:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721715916; bh=Qij07p89kKJpR5FZpRTpoWuLS4TTtSsYb67fppzLAQM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BxPFCcLkH8DfwuUW4vBr12chL7UK8W6e7EipVBnXmMm1J+9YqKsTE+9vTkDw/Nemu TAnwZPbYBHBdiI5+ylsggE0QtjoBj4CSIzZ00dvrrYrhC9X6qbzAFYEpy2w4msEUVd TEtClUcc98418Yh1ROJpEHWd/xLPDRXcIspyIPUa7Nkzlm+9zteM9MHFcuHU1WDT1A 0/2dNpcbpjdtZ/aLoLrHXPeYCuILU447TwGotP30jyamN8BlOIq78ABwSqrEi9T9ph CFCfZPGUtOuoF5vnKL5FbKwfo6GTYA2OK1X0VRCIYXWrl3yzxPI44SuWXC0vhPx8d1 qoG1FziYGBZ6g== Date: Tue, 23 Jul 2024 08:25:09 +0200 From: Lorenzo Bianconi To: AngeloGioacchino Del Regno Cc: linux-clk@vger.kernel.org, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, lorenzo.bianconi83@gmail.com, linux-arm-kernel@lists.infradead.org, nbd@nbd.name, john@phrozen.org, upstream@airoha.com Subject: Re: [PATCH 2/2] clk: en7523: fix scuclk io region for upcoming pinctrl Message-ID: References: <26151f58-9dd3-4e14-afaf-c62f539f8e26@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2m6eVZ4WKJf9tWRH" Content-Disposition: inline In-Reply-To: <26151f58-9dd3-4e14-afaf-c62f539f8e26@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240722_232520_548668_DE50482A X-CRM114-Status: GOOD ( 22.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --2m6eVZ4WKJf9tWRH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Il 09/07/24 09:48, Lorenzo Bianconi ha scritto: > > EN7581 clock driver shares the IO region with the upcoming pinctrl > > driver for Airoha EN7581 SoC. Fix it by reducing the clk mapped > > region to only used registers in order to not overlap with pinctrl > > one. This change is not introducing any backward compatibility issue > > since the EN7581 dts is not upstream yet. > >=20 > > Signed-off-by: Lorenzo Bianconi > > --- > > drivers/clk/clk-en7523.c | 23 +++++++++++++++-------- > > 1 file changed, 15 insertions(+), 8 deletions(-) > >=20 > > diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c > > index b20e56337a6b..d9ecbb6bf55a 100644 > > --- a/drivers/clk/clk-en7523.c > > +++ b/drivers/clk/clk-en7523.c > > @@ -31,7 +31,14 @@ > > #define REG_RESET_CONTROL_PCIE1 BIT(27) > > #define REG_RESET_CONTROL_PCIE2 BIT(26) > > /* EN7581 */ > > -#define REG_CRYPTO_CLKSRC2 0x20c > > +#define REG_GSW_CLK_DIV_SEL2 0x00 > > +#define REG_EMI_CLK_DIV_SEL2 0x04 > > +#define REG_BUS_CLK_DIV_SEL2 0x08 > > +#define REG_SPI_CLK_DIV_SEL2 0x10 > > +#define REG_SPI_CLK_FREQ_SEL2 0x14 > > +#define REG_NPU_CLK_DIV_SEL2 0x48 > > +#define REG_CRYPTO_CLKSRC2 0x58 > > + > > #define REG_PCIE0_MEM 0x00 > > #define REG_PCIE0_MEM_MASK 0x04 > > #define REG_PCIE1_MEM 0x08 > > @@ -203,7 +210,7 @@ static const struct en_clk_desc en7581_base_clks[] = =3D { > > .id =3D EN7523_CLK_GSW, > > .name =3D "gsw", > > - .base_reg =3D REG_GSW_CLK_DIV_SEL, > > + .base_reg =3D REG_GSW_CLK_DIV_SEL2, >=20 > This is practically just commit noise :-) >=20 > You are adding the en7581_base_clks[] in patch [1/2] with the wrong base = register, > then fixing it here ... and that's wrong. >=20 > Please squash the two patches. ack, I will do. Regards, Lorenzo >=20 > Cheers, > Angelo >=20 > > .base_bits =3D 1, > > .base_shift =3D 8, > > .base_values =3D gsw_base, > > @@ -217,7 +224,7 @@ static const struct en_clk_desc en7581_base_clks[] = =3D { > > .id =3D EN7523_CLK_EMI, > > .name =3D "emi", > > - .base_reg =3D REG_EMI_CLK_DIV_SEL, > > + .base_reg =3D REG_EMI_CLK_DIV_SEL2, > > .base_bits =3D 2, > > .base_shift =3D 8, > > .base_values =3D emi7581_base, > > @@ -231,7 +238,7 @@ static const struct en_clk_desc en7581_base_clks[] = =3D { > > .id =3D EN7523_CLK_BUS, > > .name =3D "bus", > > - .base_reg =3D REG_BUS_CLK_DIV_SEL, > > + .base_reg =3D REG_BUS_CLK_DIV_SEL2, > > .base_bits =3D 1, > > .base_shift =3D 8, > > .base_values =3D bus_base, > > @@ -245,13 +252,13 @@ static const struct en_clk_desc en7581_base_clks[= ] =3D { > > .id =3D EN7523_CLK_SLIC, > > .name =3D "slic", > > - .base_reg =3D REG_SPI_CLK_FREQ_SEL, > > + .base_reg =3D REG_SPI_CLK_FREQ_SEL2, > > .base_bits =3D 1, > > .base_shift =3D 0, > > .base_values =3D slic_base, > > .n_base_values =3D ARRAY_SIZE(slic_base), > > - .div_reg =3D REG_SPI_CLK_DIV_SEL, > > + .div_reg =3D REG_SPI_CLK_DIV_SEL2, > > .div_bits =3D 5, > > .div_shift =3D 24, > > .div_val0 =3D 20, > > @@ -260,7 +267,7 @@ static const struct en_clk_desc en7581_base_clks[] = =3D { > > .id =3D EN7523_CLK_SPI, > > .name =3D "spi", > > - .base_reg =3D REG_SPI_CLK_DIV_SEL, > > + .base_reg =3D REG_SPI_CLK_DIV_SEL2, > > .base_value =3D 400000000, > > @@ -272,7 +279,7 @@ static const struct en_clk_desc en7581_base_clks[] = =3D { > > .id =3D EN7523_CLK_NPU, > > .name =3D "npu", > > - .base_reg =3D REG_NPU_CLK_DIV_SEL, > > + .base_reg =3D REG_NPU_CLK_DIV_SEL2, > > .base_bits =3D 2, > > .base_shift =3D 8, > > .base_values =3D npu7581_base, >=20 --2m6eVZ4WKJf9tWRH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZp9MwgAKCRA6cBh0uS2t rF5eAP9AYHsoVKv5YP+LfG61ITUZJQAfTb/vYDnk3EBbuqniCwD8DPpNRGzgRjMM cOaMynYKucUcfHh8jHL5UtI01iVnegA= =b8hY -----END PGP SIGNATURE----- --2m6eVZ4WKJf9tWRH--