From patchwork Wed Jul 3 10:00:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13721674 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 42F9FC30653 for ; Wed, 3 Jul 2024 10:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A06Qdd51m/cTgDkR7m4qcv00PEC00drBl2l9uZqt1kc=; b=WNWQHoUWZYep6iLveRrqzNH6Du c9giFE+0jO/uiogJwX6EGL1DMEv8IkerUfBonCQkTfd0sOmXqQdPLSdsnkmlR3e+Pvctnw3BQycCX m+xXhJwBROYWHOjqM1c96qXTh5/ZUM4v4xQzMV0Eret0C6240R6R9AH0hMBpV8SdscLR41ybXrsAd NJwK4kbhnJ006uQ/+o6rWS9G6EH0CjZVmQFtdXiaRPQOG1zZhN5UX61HKXF+M30jENTrdDClAfvi6 HYYwckwk3xeQOnrBiA1+xWJAz/ZKgMaDbVOpW75KJTvebTx0yyDN2V3m2VXd2+IWlM1PEleNlTDWc CSOFpSLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOwnp-00000009eph-3Mm9; Wed, 03 Jul 2024 10:01:29 +0000 Received: from mail11.truemail.it ([217.194.8.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOwnQ-00000009ehy-2ofm for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2024 10:01:09 +0000 Received: from francesco-nb.corp.toradex.com (31-10-206-125.static.upc.ch [31.10.206.125]) by mail11.truemail.it (Postfix) with ESMTPA id 223F41FA41; Wed, 3 Jul 2024 12:00:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1720000858; bh=A06Qdd51m/cTgDkR7m4qcv00PEC00drBl2l9uZqt1kc=; h=From:To:Subject; b=ycccfK8WO5UKIh9tXba+0pbjvyA9JzBznHVFlq9adOI+JqwZxdg1b522/4bMuenfC yOSTw6mIrDtGzsZiHjAWPDF1mwH1WjP16CucB15dVlPPN83zJvL0FD6P9Z4EweenjU TY/9eUFJOx6IwUicuKlkFaKmhumofd/zQJIN/iVJSBAjZxnLhCP2bhr9Sru17hyhBQ icL2C/LcG8ydWLnsqiZvGeqC5ceD5tJvSlhpDDqL2q4fVIfaeP1YrYX5H7hQwQrLMn HsurcXcL2MhlLEtCvxLsufKgJvnH8aHFiZALavEG5o48e+uekc3+PYe5LTF/QN8a9n 7D4A51pofEOHA== From: Francesco Dolcini To: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas Cc: Emanuele Ghidoli , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 2/2] PCI: j721e: Fix PERST# polarity Date: Wed, 3 Jul 2024 12:00:36 +0200 Message-Id: <20240703100036.17896-3-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240703100036.17896-1-francesco@dolcini.it> References: <20240703100036.17896-1-francesco@dolcini.it> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_030105_457090_9FAA3A92 X-CRM114-Status: GOOD ( 11.13 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Emanuele Ghidoli 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 Signed-off-by: Francesco Dolcini --- 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);