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 AC163EB64D9 for ; Fri, 7 Jul 2023 05:35:00 +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: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jhXOSTbmVElCtRsc+VwF98ScbfMKUkPviPVti52cY28=; b=rBtVnx4CtG/alS G7cWfOln4pOtCWpxak8FcKqMqZSAWdATz5ig8Xq/sTTQ7YVsVDY4cOAegoLkR/n1tTObK47d/1A8p ESI/KqMNXBedRqzU1o/iLkDqo8HWc9Y1qo0cLRCqthcGrOWvr9BX/qv+2SdTWJaimrW2XJhTXQDJL CftTe/4uJm7ZGaQU2zaPG8utbQjt6IQeHuPle3tZD8RAAuRyYq+5zZk+aQE13OEi4EKKOJUr8a8EF TSVn4Ne3cBZBza1N9OpKR5mp7hR5YO1Kznjeuoe2MCDd0y/cKzkt1p8oMkJWTXFLqifJaTIXiGju5 gdjfmoa6Kxo4hmGgZI8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHe70-003dOO-1x; Fri, 07 Jul 2023 05:34:34 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHe6w-003dL2-37 for linux-arm-kernel@lists.infradead.org; Fri, 07 Jul 2023 05:34:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1688708071; x=1720244071; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+rD/hewzM2PrvRZh93DLP5SxI8Y+Nxb+YvSesx2inws=; b=V3grrwjEZ2E6xYHPVCugcXzzH9l9KZ4/Wl5gYqp3sIQaIjjQwvSz8w14 QS0FkM1eKheoeekr72AsxHHDcx0hZBBrToU3dqcoVq9vEwott23vWlHj4 tosIuOIerWYyE+6HYrRELx2bDzBItnasyzeUO5Ww0QVUta1c+YEd/8jup SB3DEeCHJtKq28PPsExO4aOcBUxBibmMRTsyfZv6KS0MAq8BQkKH9/hdF iDeMusp72yZHvZ/7iN9hZYLhvKTIM6kaJ392bpUL/QalYKm2iHpZod6lF D8W43QGGtMVOCIFxb8dz6T8mrZqkJ6mOfIP37u+uM0y1LXbybfgN+mUCn w==; X-IronPort-AV: E=Sophos;i="6.01,187,1684792800"; d="scan'208";a="31803225" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Jul 2023 07:34:24 +0200 Received: from steina-w.localnet (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id DFB9C280084; Fri, 7 Jul 2023 07:34:23 +0200 (CEST) From: Alexander Stein To: Robin Murphy , Frank Li Cc: Lucas Stach , 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 Subject: Re: [PATCH 1/1] arm64: dts: imx8mp: remove arm, primecell-periphid at etm nodes Date: Fri, 07 Jul 2023 07:34:23 +0200 Message-ID: <24260662.6Emhk5qWAg@steina-w> Organization: TQ-Systems GmbH In-Reply-To: References: <20230705205954.4159781-1-Frank.Li@nxp.com> <49ef52b7-0269-898c-7cc2-096f2f1037fc@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_223431_388020_9CA92753 X-CRM114-Status: GOOD ( 30.38 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Frank, Am Donnerstag, 6. Juli 2023, 16:39:07 CEST schrieb Frank Li: > On Thu, Jul 06, 2023 at 12:06:19PM +0100, Robin Murphy wrote: > > > > 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 correc= ted > > > > > 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. > > = > > Indeed, it's quite common for TRM memory maps to be written in terms of > > the > > interconnect configuration, i.e. from the point of view of the > > interconnect > > itself, that whole range of address space is assigned to that periphera= l, > > and it may even be true that the entire range is routed to the port whe= re > > that peripheral is connected. However what's of more interest for DT is > > how > > much of that range the peripheral itself actually decodes. > = > Yes, there are not problem by mapping bigger space in most case. > = > amba bus's periphal use close to end of region to show device's identical > information. Ah, thanks for the explanation. This make things more clear. But on the other is it sensible to assume the memory resource size to fit t= he = IP address space? It appears to me the size is fixed to 4kiB anyway. Would = it = make more sense to read the values from the address "base + 4K - x" instead= of = "base + size - x"? Best regards, Alexander > In drivers/amba/bus.c, > = > amba_read_periphid() > { > ... > size =3D resource_size(&dev->res); > ... > for (pid =3D 0, i =3D 0; i < 4; i++) > pid |=3D (readl(tmp + size - 0x20 + 4 * i) & 255) << (i * = 8); > } > = > So the range in DTS for arm,primecell should be actual IP address space. > = > > Robin. > > = > > > _______________________________________________ > > > linux-arm-kernel mailing list > > > linux-arm-kernel@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- = TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel