[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/7] xen/arm: rcar4: add delay after programming ATU
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
- Date: Mon, 24 Feb 2025 09:18:25 +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=tAMV7D+1eDnHsag6KRUbwF9Dqhd0IxQ+BlQYpLBU+aA=; b=oib6hlG8TS3xvNKf7tTbC1AN/cigpsvbPEkpDkT2BEXv4QpQZ8b+w6c42U6XAAUuwUdvXAlQUeOJSr+rGL0+OOTQiT2pjgwqcDlK7iqnrfCqbEYzK3YDAKWZ7Uk+gBH6shtn/s4pRbMqabb+3Z5afdCf3IYUAFfBenOlnXsyJlMqMZ9X+BYQXHsWBdL66O67HuZV0F0mX1p+9wg6AVW9O1G3q/+l2TEmQYfcE9fPQiCWQ5CavU9QybWqUYX/vu2H3INHoHoPcTLM5w6c4XhZA55dRx20lPMmx1OwCLU1LWxTDZqbCKtH8e9mCFF3Ns09E/Tk8UAYQFpuYPKyjTwWRg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FuAm1FnkGJi9HVUGRz1IuuczifKg4vr9FwyuZ943OqovmzaGCEdEUOEbDG5xj9oCUhVZjBiLfTIKwko8beCZgOQR3VT94+pBD3wQPHpIHSS9MOrzXVcLR+y3SrQdtcdTcpGgzAJII9Zt6tDtslOA2nUExB9o7kys9I9doNtlKiQnm/ExetOpsycMx7iKtqW/+9QlrMcOW4tO4ABuptJovs/KGMw0wJ/xBpEj7p0aLH1h5aMrJrDHTTFMOViPimY3ukg/sxFBNTdav4dFAHw9xerUT/uov5qsyUt/SsA3Hj6nTGYzjbuc1Xf+2/oPmk37YO4lE1je+2QpM23M9Rf+Dw==
- 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: Mon, 24 Feb 2025 09:18:38 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbhp0PUAmh9clLH0yLO3Eb3ISwIw==
- Thread-topic: [PATCH 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>
---
xen/arch/arm/pci/pci-host-rcar4.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/arm/pci/pci-host-rcar4.c
b/xen/arch/arm/pci/pci-host-rcar4.c
index df337e3159..3b97bf138a 100644
--- a/xen/arch/arm/pci/pci-host-rcar4.c
+++ b/xen/arch/arm/pci/pci-host-rcar4.c
@@ -289,6 +289,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
|