lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240703100036.17896-3-francesco@dolcini.it>
Date: Wed,  3 Jul 2024 12:00:36 +0200
From: Francesco Dolcini <francesco@...cini.it>
To: Vignesh Raghavendra <vigneshr@...com>,
	Siddharth Vadapalli <s-vadapalli@...com>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Krzysztof WilczyƄski <kw@...ux.com>,
	Rob Herring <robh@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Emanuele Ghidoli <emanuele.ghidoli@...adex.com>,
	linux-omap@...r.kernel.org,
	linux-pci@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Francesco Dolcini <francesco.dolcini@...adex.com>
Subject: [PATCH v1 2/2] PCI: j721e: Fix PERST# polarity

From: Emanuele Ghidoli <emanuele.ghidoli@...adex.com>

Now that PERST# is properly defined as active-low in the device tree,
fix the driver to correctly drive the line independently of the implied
polarity.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@...adex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@...adex.com>
---
 drivers/pci/controller/cadence/pci-j721e.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index 85718246016b..4d7e1104de1f 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -503,7 +503,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
 
 	switch (mode) {
 	case PCI_MODE_RC:
-		gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
+		gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
 		if (IS_ERR(gpiod)) {
 			ret = PTR_ERR(gpiod);
 			if (ret != -EPROBE_DEFER)
@@ -541,7 +541,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
 		 */
 		if (gpiod) {
 			usleep_range(100, 200);
-			gpiod_set_value_cansleep(gpiod, 1);
+			gpiod_set_value_cansleep(gpiod, 0);
 		}
 
 		ret = cdns_pcie_host_setup(rc);
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ