From 812e6d344d35d7ef6df9ccbeed5f6a65c53e7977 Mon Sep 17 00:00:00 2001 From: Jay Agarwal Date: Thu, 16 Aug 2012 18:08:12 +0530 Subject: arm: tegra: pcie: WAR to avoid hang on PCIe device Setting DFPCI_RSPPASSPW bit in AFI_CONFIGURATION register to avoid instant hang on CPU read/write while gpu transfers are in progress. Bug 1034443 Change-Id: I40c99588753b8b2cb2d418b54c6ac73f7b8ddc13 Signed-off-by: Jay Agarwal Reviewed-on: http://git-master/r/124037 Reviewed-by: Simone Willett Tested-by: Simone Willett --- arch/arm/mach-tegra/pcie.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-tegra/pcie.c') diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index eef215b00018..04d3a5db3f7e 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -105,6 +105,7 @@ #define AFI_CONFIGURATION 0xac #define AFI_CONFIGURATION_EN_FPCI (1 << 0) +#define AFI_CONFIGURATION_DFPCI_RSPPASSPW (1 << 2) #define AFI_FPCI_ERROR_MASKS 0xb0 @@ -876,8 +877,11 @@ static void tegra_pcie_enable_controller(void) /* Take the PCIe interface module out of reset */ tegra_periph_reset_deassert(tegra_pcie.pcie_xclk); + /* WAR avoid hang on CPU read/write while gpu transfers in progress */ + val = afi_readl(AFI_CONFIGURATION) | AFI_CONFIGURATION_DFPCI_RSPPASSPW; + /* Finally enable PCIe */ - val = afi_readl(AFI_CONFIGURATION) | AFI_CONFIGURATION_EN_FPCI; + val |= AFI_CONFIGURATION_EN_FPCI; afi_writel(val, AFI_CONFIGURATION); val = (AFI_INTR_EN_INI_SLVERR | AFI_INTR_EN_INI_DECERR | -- cgit v1.2.3