[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 5/7] xen/arm: rcar4: add delay after programming ATU


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Tue, 11 Mar 2025 10:24:56 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jHsx4IPGUNnEssavxJhbxu4YzgwEQR4y4pjAfnqiIiU=; b=CAWtxwFyVWm+L8ZGXt/z7/lxl0mooQMfHIsKZW7UH8yTkXwzw1tS+kvpbLWTOfb61FQBxEDaR7sKgvD3paQNf2I2gxPtDPu1en6juokZKxsaSdYFPcU258Uabr4FRGpLAlhUVQ1d466yzAs2SOXO4NSH1Gmn0g3jwnvL8oBjgw1YRVShFUpUgC6IFn41iIjjW6ILMnw5EG+IzmK3f0ThpcywgQC67ePUVGoRjXwAzctydK8+z/MiYy+xJNyDImkKr/O8hUKJROX4hEmX3RQmCss9sZQi+0FaTI9AWMiIhehvfdz4VadLde9BMw8IZyjESwjjg0Z5sPQPxf64nnLDBg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OeZCKa7NTPaalODffIpVPZxyubtbDkfmnybRmNGuy+ri0kcxKqOS5xNZQIEGy8/FqyeE3d2iV22W8we8y/G3b3NX1vK9xhEVpHy07lOF7cBkdoHBdySt1GCf98cpB/4F9e8/Ws2a+mlQx+L7INz7i/Wo92UPPJdOUuaWv3WJhpXh35Bb/f98GghY1R0xkxPp7Y+Rc7VUzlGle5qzWo3MLVhSOvck8xrA1Vc+S7b81fS6p4czEXrqUrNA4OA9gPBoccfbNMbzf4oSFtMs64a7ViFOrJQLsnPS6ZwcMgseyDE37yfPnX6BwcM0m6r3bFfIXoPFV6WNL3Bb+VW5e1LXHQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Delivery-date: Tue, 11 Mar 2025 10:25:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHbkm/V+s7gEh8jVE2kSVeMpYb04g==
  • Thread-topic: [PATCH v2 5/7] xen/arm: rcar4: add delay after programming ATU

From: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>

For some reason, we need a delay before accessing ATU region after
we programmed it. Otherwise, we'll get erroneous TLP.

There is a code below, which should do this in proper way, by polling
CTRL2 register, but according to documentation, hardware does not
change this ATU_ENABLE bit at all.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
---
v1->v2:
* rebased
---
 xen/arch/arm/pci/pci-designware.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/arm/pci/pci-designware.c 
b/xen/arch/arm/pci/pci-designware.c
index 6ab03cf9b0..def2c12d63 100644
--- a/xen/arch/arm/pci/pci-designware.c
+++ b/xen/arch/arm/pci/pci-designware.c
@@ -194,6 +194,11 @@ static void dw_pcie_prog_outbound_atu_unroll(struct 
pci_host_bridge *pci,
     dw_pcie_writel_ob_unroll(pci, index, PCIE_ATU_UNR_REGION_CTRL2,
                              PCIE_ATU_ENABLE);
 
+    /*
+     * HACK: We need to delay there, because the next code does not
+     * work as expected on S4
+     */
+    mdelay(1);
     /*
      * Make sure ATU enable takes effect before any subsequent config
      * and I/O accesses.
-- 
2.34.1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.