From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18B1C1872 for ; Thu, 6 Jul 2023 08:24:00 +0000 (UTC) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHKHH-0004UP-82; Thu, 06 Jul 2023 10:23:51 +0200 Message-ID: <0125c54fd1617f3f945bc3f4bbef5b914b701c24.camel@pengutronix.de> Subject: Re: [PATCH 1/1] arm64: dts: imx8mp: remove arm, primecell-periphid at etm nodes From: Lucas Stach To: Alexander Stein , suzuki.poulose@arm.com, coresight@lists.linaro.org, imx@lists.linux.dev, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marek Vasut , Peng Fan , Adam Ford , Laurent Pinchart , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , open list , Frank Li Date: Thu, 06 Jul 2023 10:23:48 +0200 In-Reply-To: <9405224.NyiUUSuA9g@steina-w> References: <20230705205954.4159781-1-Frank.Li@nxp.com> <9405224.NyiUUSuA9g@steina-w> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: imx@lists.linux.dev Hi Alexander, Am Donnerstag, dem 06.07.2023 um 07:06 +0200 schrieb Alexander Stein: > Hi Frank, >=20 > Am Mittwoch, 5. Juli 2023, 22:59:53 CEST schrieb Frank Li: > > The reg size of etm nodes is incorrectly set to 64k instead of 4k. This > > leads to a crash when calling amba_read_periphid(). After corrected re= g > > size, amba_read_periphid() retrieve the correct periphid. > > arm,primecell-periphid were removed from the etm nodes. >=20 > So this means the reference manual is wrong here? It clearly states the s= ize=20 > is 64kiB. Reference Manual i.MX8MP Rev 1. 06/2021 > On a side note: Is imx8mq affected by this as well? The DAP memory table = lists=20 > similar sizes in the RM . >=20 Note that the 64K MMIO space per device is really an alignment thing. It's a recommendation from ARM to allow individual device MMIO regions to be mapped on kernels with 64K page size. Most of the time the real MMIO space occupied by the device is actually much smaller than 64K. Regards, Lucas > Best regards, > Alexander >=20 > > Signed-off-by: Frank Li > > --- > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++-------- > > 1 file changed, 4 insertions(+), 8 deletions(-) > >=20 > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index > > cc406bb338fe..e0ca82ff6f15 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > @@ -306,8 +306,7 @@ soc: soc@0 { > >=20 > > etm0: etm@28440000 { > > compatible =3D "arm,coresight-etm4x",=20 > "arm,primecell"; > > - reg =3D <0x28440000 0x10000>; > > - arm,primecell-periphid =3D <0xbb95d>; > > + reg =3D <0x28440000 0x1000>; > > cpu =3D <&A53_0>; > > clocks =3D <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names =3D "apb_pclk"; > > @@ -323,8 +322,7 @@ etm0_out_port: endpoint { > >=20 > > etm1: etm@28540000 { > > compatible =3D "arm,coresight-etm4x",=20 > "arm,primecell"; > > - reg =3D <0x28540000 0x10000>; > > - arm,primecell-periphid =3D <0xbb95d>; > > + reg =3D <0x28540000 0x1000>; > > cpu =3D <&A53_1>; > > clocks =3D <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names =3D "apb_pclk"; > > @@ -340,8 +338,7 @@ etm1_out_port: endpoint { > >=20 > > etm2: etm@28640000 { > > compatible =3D "arm,coresight-etm4x",=20 > "arm,primecell"; > > - reg =3D <0x28640000 0x10000>; > > - arm,primecell-periphid =3D <0xbb95d>; > > + reg =3D <0x28640000 0x1000>; > > cpu =3D <&A53_2>; > > clocks =3D <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names =3D "apb_pclk"; > > @@ -357,8 +354,7 @@ etm2_out_port: endpoint { > >=20 > > etm3: etm@28740000 { > > compatible =3D "arm,coresight-etm4x",=20 > "arm,primecell"; > > - reg =3D <0x28740000 0x10000>; > > - arm,primecell-periphid =3D <0xbb95d>; > > + reg =3D <0x28740000 0x1000>; > > cpu =3D <&A53_3>; > > clocks =3D <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names =3D "apb_pclk"; >=20 >=20 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 15654EB64DC for ; Thu, 6 Jul 2023 08:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eaUt+R0Lo2S5npMT6wvYkMIFHV4Du3X6VT5f8kwU938=; b=ibDy2YrDL3Gq5f YkNXjJmB3GNrJ4+m86xqcXOb0ajIbpTFdAW2h6Lq/cQY96YDTsuVbAveNmy/c3ecuoGpiGCq/l5jA fq5ksyvyfJ4oluOwn0+xWDAbzYFtOoj5NPMfPXCAk2XeDjzQHaK5SZLSQUeV/o4dOLouqzp9IAalF EhZ12tlxCfcVL2L0xvJhQI2vyNCaN7UWVIH/IiJmd8gzyYkPm/NeEwPzeejEu0/YoG5eSJbmAolYG vaPFw/sjVxU1vutdqF6Tjw1U0tKATRZDD9J5xb154VZO0TucjH+tQGFdiyd5am8ATnrAAEe4g0CKi wOv+1fTMM4Lu1pAFV8wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHKHi-000wZY-2Y; Thu, 06 Jul 2023 08:24:18 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHKHf-000wYR-1n for linux-arm-kernel@lists.infradead.org; Thu, 06 Jul 2023 08:24:16 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHKHH-0004UP-82; Thu, 06 Jul 2023 10:23:51 +0200 Message-ID: <0125c54fd1617f3f945bc3f4bbef5b914b701c24.camel@pengutronix.de> Subject: Re: [PATCH 1/1] arm64: dts: imx8mp: remove arm, primecell-periphid at etm nodes From: Lucas Stach To: Alexander Stein , suzuki.poulose@arm.com, coresight@lists.linaro.org, imx@lists.linux.dev, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marek Vasut , Peng Fan , Adam Ford , Laurent Pinchart , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , open list , Frank Li Date: Thu, 06 Jul 2023 10:23:48 +0200 In-Reply-To: <9405224.NyiUUSuA9g@steina-w> References: <20230705205954.4159781-1-Frank.Li@nxp.com> <9405224.NyiUUSuA9g@steina-w> User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_012415_611367_F78DCDBC X-CRM114-Status: GOOD ( 19.20 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Alexander, Am Donnerstag, dem 06.07.2023 um 07:06 +0200 schrieb Alexander Stein: > Hi Frank, > > Am Mittwoch, 5. Juli 2023, 22:59:53 CEST schrieb Frank Li: > > The reg size of etm nodes is incorrectly set to 64k instead of 4k. This > > leads to a crash when calling amba_read_periphid(). After corrected reg > > size, amba_read_periphid() retrieve the correct periphid. > > arm,primecell-periphid were removed from the etm nodes. > > So this means the reference manual is wrong here? It clearly states the size > is 64kiB. Reference Manual i.MX8MP Rev 1. 06/2021 > On a side note: Is imx8mq affected by this as well? The DAP memory table lists > similar sizes in the RM . > Note that the 64K MMIO space per device is really an alignment thing. It's a recommendation from ARM to allow individual device MMIO regions to be mapped on kernels with 64K page size. Most of the time the real MMIO space occupied by the device is actually much smaller than 64K. Regards, Lucas > Best regards, > Alexander > > > Signed-off-by: Frank Li > > --- > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++-------- > > 1 file changed, 4 insertions(+), 8 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index > > cc406bb338fe..e0ca82ff6f15 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > @@ -306,8 +306,7 @@ soc: soc@0 { > > > > etm0: etm@28440000 { > > compatible = "arm,coresight-etm4x", > "arm,primecell"; > > - reg = <0x28440000 0x10000>; > > - arm,primecell-periphid = <0xbb95d>; > > + reg = <0x28440000 0x1000>; > > cpu = <&A53_0>; > > clocks = <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names = "apb_pclk"; > > @@ -323,8 +322,7 @@ etm0_out_port: endpoint { > > > > etm1: etm@28540000 { > > compatible = "arm,coresight-etm4x", > "arm,primecell"; > > - reg = <0x28540000 0x10000>; > > - arm,primecell-periphid = <0xbb95d>; > > + reg = <0x28540000 0x1000>; > > cpu = <&A53_1>; > > clocks = <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names = "apb_pclk"; > > @@ -340,8 +338,7 @@ etm1_out_port: endpoint { > > > > etm2: etm@28640000 { > > compatible = "arm,coresight-etm4x", > "arm,primecell"; > > - reg = <0x28640000 0x10000>; > > - arm,primecell-periphid = <0xbb95d>; > > + reg = <0x28640000 0x1000>; > > cpu = <&A53_2>; > > clocks = <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names = "apb_pclk"; > > @@ -357,8 +354,7 @@ etm2_out_port: endpoint { > > > > etm3: etm@28740000 { > > compatible = "arm,coresight-etm4x", > "arm,primecell"; > > - reg = <0x28740000 0x10000>; > > - arm,primecell-periphid = <0xbb95d>; > > + reg = <0x28740000 0x1000>; > > cpu = <&A53_3>; > > clocks = <&clk IMX8MP_CLK_MAIN_AXI>; > > clock-names = "apb_pclk"; > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel