From patchwork Mon May 6 14:20:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655568 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 6D15DC25B4F for ; Mon, 6 May 2024 14:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3otDfexwhfrkhJFt5gki5eOhc1QqbDnrs33b2t2y5RU=; b=qXmaMf1f1hKMTU 8Q2vF9umbiwKU4Jmp3rYPKvP3ueUJRSfoJWkG2D7QlN7hdtmiknWVrTH/4ZXTCuWEUgTffSrVMIC+ LNg/uMKNADAI2PikkHiKTY6rmSNLVqWt1RRdaowItBqeInn2iA2asYrfzwln7NZffhDIqhARNsZMI Xk35xEmbF3Vw5X404yz8StmT12j7TUb7wDMhwzcP5mJM4830BUTqQiXtuv2L11Eci5TJ67k+4l17H 7gdM1gdGuRKEFIPOj/CN/a7a5dOrYlHMD8GO1GzuJ9vY1NrcmEz5EFm3D4xBNxzXedYA4gZlyfsLt JAmQ4TLM5ZkQxmnYhKlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zEA-00000007dhw-2u2r; Mon, 06 May 2024 14:22:02 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zE5-00000007ddz-0dWc; Mon, 06 May 2024 14:22:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005317; x=1746541317; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CNszT9zdbvvsTrnr/o0AApgAShmBR0yidgvxQsMHIno=; b=M+t8MbgvUD7lM7/pjI/7dbvc/1rz2Hdw+ZC8gj5Pv4sTkxBPqPt2ME6F tV5gkQbFgkvTWjLRNhULx2vAKSgxEdoHlJGDEUUit0NjHafP98/DzGrtz opHz059qb02bpnoFYD1V8LkMUxSTpeWQPz5kwcBzTm9YP5CtGZKXhNVX1 c+dFxAxLaIcQjG8tcTgkSNEGBhlfrf5GmistyAWqZNBj5tcHKXden6dDT xKuw1uqzec8UZ8fbAVJGvRWm1A2SLZxF8eJTYb9uODK6asud+r5AAswpQ WAgtUDciRDBvaZCOTXtSSqlP9o15FmC51kJ4xDqGwQfHxCpAcWauNv8M0 Q==; X-CSE-ConnectionGUID: C+fk2o/gR2Ojkf++MMyQSQ== X-CSE-MsgGUID: BanU4JYDSkO80+Uvg/vCfw== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="22155537" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="22155537" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:53 -0700 X-CSE-ConnectionGUID: tzhk4GXGSGuSvrL4IdOFhQ== X-CSE-MsgGUID: vhTfbuHiTc29wrruM+hkgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32988756" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa005.jf.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0E48F68; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Xiaowei Song , Binghui Wang , Thierry Reding , Jonathan Hunter , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Linus Walleij Subject: [PATCH v4 1/5] PCI: dra7xx: Add missing header inclusion Date: Mon, 6 May 2024 17:20:37 +0300 Message-ID: <20240506142142.4042810-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_072157_227742_C9614423 X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Driver is using chained_irq_*() APIs, add the respective inclusion. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/dwc/pci-dra7xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index d2d17d37d3e0..b67071a63f8a 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include From patchwork Mon May 6 14:20:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655569 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 5C126C10F16 for ; Mon, 6 May 2024 14:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VwEQt0qMkm7Mi5EL9GpvWxtyCL3MQgls5DXMMYg1JoU=; b=dGf8iCHuOfovCn RzTAit5WBJRzBzIJ+ZrzfGDSL2AuIR0kzjtfojiOUaXDLh/viez50m4/OCmm8rSxY/bUS1N8UZLsr IMxsPnYc7mDLX+i58tbtiAgWJepacxOhkQEP5gVutKXF72N8yMH+G06MUJD7rrLKq25IpWslltEME TC6/cENZDObM5rA7fAMMuPmjgThcutGWIe1HjGjgyfbO/It5hv/3+EUVaEXZxFFMXABWPNQR4Jw5J CjLPDjt80t2c6N2o4bWyjUWZdM4E0JVUB+/wdi9YNdL2l6hlNMzdwfK3BE2y2bcruHPyF64TQwW4o N8K5O3f38W+16rhBRPHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zE9-00000007dgg-0yjX; Mon, 06 May 2024 14:22:01 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zE4-00000007ddv-3b7o; Mon, 06 May 2024 14:21:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005317; x=1746541317; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mnVWFiBfYUU2lpuKyQVuWsMjv4lrzOkciv18t8WSb+Q=; b=ELneKoaWjVq9JWzkoZECY1+R1Y66CiHDsOc5A/wTikdO9fJS2tuEAoAT n3gxtU+lxRy1BRTatzIjYm86FsF1r8EzYINscoawmk7dTyR4Ffym1sCj5 eTo5ZPmiIJSeqTZTsIGC0kNLps22TtbPTGATJEuM5ll9QyfB0I1BfO/KT PVvvGspMWhjNeqoGJjTMgDbZ9Oz0tWHmYk4QIV60TJVEIhnO+eoOriPGy Gh23b5aElgHF6d0UqNLKFK5IvlsRLtfUEeJu9mqH52zUCV5v7Uur/XRzJ YpM+ehobVGvLdUuta4it53MtiSEeAVDbLFgK5sPcLnoW9ZQOjJOimk7q7 w==; X-CSE-ConnectionGUID: bpVMCZcKQeq0y8Hf2zi9kg== X-CSE-MsgGUID: I8x9SCARRVCb7FQ9eAdI3Q== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="10631822" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="10631822" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:51 -0700 X-CSE-ConnectionGUID: v6vxQqJzQgqtr/xtC6HB+Q== X-CSE-MsgGUID: FLhmLFrsTPe4VWRVLgvWFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32652260" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1AACF43E; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Xiaowei Song , Binghui Wang , Thierry Reding , Jonathan Hunter , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Linus Walleij Subject: [PATCH v4 2/5] PCI: aardvark: Remove unused of_gpio.h Date: Mon, 6 May 2024 17:20:38 +0300 Message-ID: <20240506142142.4042810-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_072156_928622_FAA50CE6 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org of_gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/pci-aardvark.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 71ecd7ddcc8a..8b3e1a079cf3 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "../pci.h" From patchwork Mon May 6 14:20:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655570 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 0901BC25B5F for ; Mon, 6 May 2024 14:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gW9bPVDRjPk9UoA7F9Gj/DqFe7j6oRC3X6luO5wx7Mc=; b=M+ZvAdpTIZnKGm hrRymwtKTTyWZbcRuKHfsN3QgERQzbtHJ7rSeOl1mvqYPXLZXvxiDZHMPDTPff4HG2laXFMlel2b5 d48EXowEuHXjkHGR3mscJ9UVCNkowCoamJFAy0QXH3xXf0jZi22Vo8PwrwYrIIcimBNExLg5qKU7z hhnJ4OTq2undkC/+QbG7919yGB5P75ZnYgZsUr8IGRYqyBk9eYpEqLgJJ6xK1vfrDc4ufh1MzZblI cwECEGPaCkmzG5FNiQVjdpknRR1wdCnWJoxw/JgRFya3FuR+eyWgzSivO/Kvn8HfKPdgqOBPqM6s2 Fm7NuQIBMi9IYxfYufwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zEE-00000007dkF-03W9; Mon, 06 May 2024 14:22:06 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zE8-00000007ddv-0WhH; Mon, 06 May 2024 14:22:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005320; x=1746541320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8rSWiYZvmKFnXcw8ynHscd2dH4mpaWep1+0Q3U6jY4c=; b=NXMkfO6ZonOD0ISfPB8bKoTNUjmPJvexwqkQ+udtaRyeZoOmAYHY0GDl ApD23IAZml+FIqIchruxbKwk0wx5QROpQ40jUWVpxIm2A1YhmHXW5Wez3 +fhPtIidugKHffqJPP90Ynx2BCQ6gK8Yy3d1e3tFHzFg+3wD7v34lCXtQ 5Bald1uFZTfSQyo7OUQJOIgBr1L9DfHTXWIwE0GiswZF2tSaL7NPPvdeb GoGe+7VDouXQ/jd1A4vgp7gyJiC8DBWB7BLYgwHz9p8TMHiR+2BB3/nRD JPv+bt2s5nlSCvcu/x8yw0AHcFVtdNJEsXQvbUtgpO6nLk9yk4ntfIgPJ Q==; X-CSE-ConnectionGUID: WT2qiRbIRqyd2OQmsIJDcA== X-CSE-MsgGUID: P7i/fJc2QsO6klIfw9Ks4w== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="10631837" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="10631837" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:51 -0700 X-CSE-ConnectionGUID: dc8p9NFvQJWZ6MHCsO4kmA== X-CSE-MsgGUID: YEsu2LobRQyrkpY2uDctpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32652261" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 29B8249F; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Xiaowei Song , Binghui Wang , Thierry Reding , Jonathan Hunter , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Linus Walleij Subject: [PATCH v4 3/5] PCI: dwc: Remove unused of_gpio.h Date: Mon, 6 May 2024 17:20:39 +0300 Message-ID: <20240506142142.4042810-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_072200_199983_66C3546B X-CRM114-Status: UNSURE ( 8.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org of_gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/dwc/pci-dra7xx.c | 1 - drivers/pci/controller/dwc/pci-meson.c | 1 - drivers/pci/controller/dwc/pcie-qcom.c | 1 - drivers/pci/controller/dwc/pcie-tegra194.c | 2 -- 4 files changed, 5 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index b67071a63f8a..cf8392190856 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c index 6477c83262c2..db9482a113e9 100644 --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 14772edcf0d3..436076612c8f 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 93f5433c5c55..e8cd8c1bd4f4 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -21,7 +20,6 @@ #include #include #include -#include #include #include #include From patchwork Mon May 6 14:20:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655571 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 DE3C9C10F16 for ; Mon, 6 May 2024 14:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j9Q7QpQwfIAgA4A3NBvwZPR8KT5yyQ0cPriff9wFf1g=; b=FNeNcKzdwOm0+L /R4ILjZgM+6Xfqff4d5auB+tORqeX3zqEIqUOPf5Hx/IO+W8DkVQS/eB73ZJ4zjTGV0HRI9CoFl6z 3FrWKd+z4DwdEYj0cMs85lDh+0AVkRHkwTlwR4RHgL3mKJJaM6m8vQ6VApc/pepbo1u9EQkXRKIER vv1ffp0DwrFGgvECqKAprMNHZ2UqKbYDlJzSu+KCcWROv7xs1OhG9LOZVG8yPpdWzCBkznmefJf57 sHny2qF/Bk3k+rg+ir+bz6x5zilTGkBbvBcI9OeNGn3nePku6sQPqduwJL9E3OQNemhja8RzERs9o 0Xi2dNX72/LpOmKE6EbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zEE-00000007dki-1sAw; Mon, 06 May 2024 14:22:06 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zE8-00000007dfZ-0lFm; Mon, 06 May 2024 14:22:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005320; x=1746541320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z57pGJjnjRVkYzZo0wihsvwiTkK/ndmlOsPxrIGszlo=; b=IlS+Z1F4d1VnKjaHRIvlStWhQHDw4f23jYIsveMcWU+HnNQdQ7QQNj+n TgeM+8KJLAsgCxSvggbG6ldTR67KeqSnYOgkX+tG8RfGCMxa3Uhlu7vie wWJvAXXB3LdOm0goCG7KcynVjIjXHqk5SQrrLnqYpCVPhfOXw2jTKBTmn uytAD3tHGUXk3XXwDw4TasI4bwze0mtOl3x9XdcSYTra77iSm0rRotc4L FFwv1au617ySM/fx8pvxxmo9FvoNwTqOylf4h4TSRepL3vw/Z5sjy054c 6mY/mvSJX9hUJQYf+/p2CPo5lvKjydytsLW7XRuRw3Nu3CS6SEeokKfj4 Q==; X-CSE-ConnectionGUID: aHcJIxAKRJmZ4KrFV9EzXA== X-CSE-MsgGUID: l2QOLdc1QpCarpsBZi9nag== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="10631854" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="10631854" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:52 -0700 X-CSE-ConnectionGUID: LmUtZS9TRKi6vdTo+P+jMQ== X-CSE-MsgGUID: SSFBTkBWSVaqnxNR9fDPHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32652262" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 341DB537; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Xiaowei Song , Binghui Wang , Thierry Reding , Jonathan Hunter , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Linus Walleij Subject: [PATCH v4 4/5] PCI: imx6: Convert to agnostic GPIO API Date: Mon, 6 May 2024 17:20:40 +0300 Message-ID: <20240506142142.4042810-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_072200_265659_B4B8D9F6 X-CRM114-Status: GOOD ( 15.18 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/pci/controller/dwc/pci-imx6.c | 36 ++++++++------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 917c69edee1d..62a4994c5501 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -11,14 +11,13 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include #include #include #include @@ -107,8 +106,7 @@ struct imx6_pcie_drvdata { struct imx6_pcie { struct dw_pcie *pci; - int reset_gpio; - bool gpio_active_high; + struct gpio_desc *reset_gpiod; bool link_is_up; struct clk_bulk_data clks[IMX6_PCIE_MAX_CLKS]; struct regmap *iomuxc_gpr; @@ -721,9 +719,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) } /* Some boards don't have PCIe reset GPIO. */ - if (gpio_is_valid(imx6_pcie->reset_gpio)) - gpio_set_value_cansleep(imx6_pcie->reset_gpio, - imx6_pcie->gpio_active_high); + gpiod_set_value_cansleep(imx6_pcie->reset_gpiod, 1); } static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) @@ -771,10 +767,9 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) } /* Some boards don't have PCIe reset GPIO. */ - if (gpio_is_valid(imx6_pcie->reset_gpio)) { + if (imx6_pcie->reset_gpiod) { msleep(100); - gpio_set_value_cansleep(imx6_pcie->reset_gpio, - !imx6_pcie->gpio_active_high); + gpiod_set_value_cansleep(imx6_pcie->reset_gpiod, 0); /* Wait for 100ms after PERST# deassertion (PCIe r5.0, 6.6.1) */ msleep(100); } @@ -1285,22 +1280,11 @@ static int imx6_pcie_probe(struct platform_device *pdev) return PTR_ERR(pci->dbi_base); /* Fetch GPIOs */ - imx6_pcie->reset_gpio = of_get_named_gpio(node, "reset-gpio", 0); - imx6_pcie->gpio_active_high = of_property_read_bool(node, - "reset-gpio-active-high"); - if (gpio_is_valid(imx6_pcie->reset_gpio)) { - ret = devm_gpio_request_one(dev, imx6_pcie->reset_gpio, - imx6_pcie->gpio_active_high ? - GPIOF_OUT_INIT_HIGH : - GPIOF_OUT_INIT_LOW, - "PCIe reset"); - if (ret) { - dev_err(dev, "unable to get reset gpio\n"); - return ret; - } - } else if (imx6_pcie->reset_gpio == -EPROBE_DEFER) { - return imx6_pcie->reset_gpio; - } + imx6_pcie->reset_gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); + if (IS_ERR(imx6_pcie->reset_gpiod)) + return dev_err_probe(dev, PTR_ERR(imx6_pcie->reset_gpiod), + "unable to get reset gpio\n"); + gpiod_set_consumer_name(imx6_pcie->reset_gpiod, "PCIe reset"); if (imx6_pcie->drvdata->clks_cnt >= IMX6_PCIE_MAX_CLKS) return dev_err_probe(dev, -ENOMEM, "clks_cnt is too big\n"); From patchwork Mon May 6 14:20:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655573 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 4042EC25B4F for ; Mon, 6 May 2024 14:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=701rm535H/MkMqSGZxrn0VsA+eKXQ6WvIE85vRUek50=; b=TMHeT6oSHTI/rB esJIwuzAK5E1SkhDsLeV5l3LL3V/1UlWuU6RG9Oi8ufCy/OdLZwwsDaYWFRUvr89flEhAFaAaV58I 9EGOhcksdfEdPO6ocnfCeF/UFOdjbxR6uQCncGzAnsFekJRVROTBW7k1vTk+2Mp81R7flc5MKaDKS ojY3FJ9LnAWjNJ3F34w84ObucBEiitsJir6OSQ9ZApwk/UfttFImtrU3wXmZyUQ05OL99GasaOMmP vtGmizOCZj1vsrNblKRUYYItCVOUTq4yEuvbBw3oMaOIKE2weYx++avFn05rFRL05XlbJMWHr5Cxz vGY0P06bDvQARq3WHyqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zET-00000007dyn-2ufM; Mon, 06 May 2024 14:22:21 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3zEI-00000007dod-3gik; Mon, 06 May 2024 14:22:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005331; x=1746541331; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zfipl6FRTfKyTzY0Cyv5249Uhwjc0MFiQSe+NaO7iiI=; b=SyZco2a0e8h6DwbmWllN7dyNloQkclGUi7SDDqoSUoxO1Xe+qG2u1f2Q Y2sXyLSd8oPVlnWJ1XfqunHxiFOpTNKOEZhEXtvbzGeGlLg0igwg+6sGN ey4ARuqAJWubT8SFZjTLt+26OC2eLaOiACGklclMkLG0OSPtBWojRkf/s 8+NTvbSWWUduqBlXkZdhT6g+DcHmctQPFs7f0AH8Exgil5O8GCXC950rB Gf8MBjZ1uKfvNAsHvXKL4Kr32q6L+ArwFpih+KOztSRWx+7pnvTnmnqS8 AGUytU3oa59pkWmEde/26TgjuMkEKX4/tkwjQrOOE7uhOqtQiBhzIJqgK g==; X-CSE-ConnectionGUID: hYCE/wwURW6HMU2tglk3EA== X-CSE-MsgGUID: T7XtuLxlRx24U8KDO3vqAA== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="22155610" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="22155610" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:22:01 -0700 X-CSE-ConnectionGUID: W7ga+nScT0mXar9tI4jBqg== X-CSE-MsgGUID: waswy0tmReqTs/9s5pGM6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32988759" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa005.jf.intel.com with ESMTP; 06 May 2024 07:21:53 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3EDE35A2; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Xiaowei Song , Binghui Wang , Thierry Reding , Jonathan Hunter , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Linus Walleij Subject: [PATCH v4 5/5] PCI: kirin: Convert to agnostic GPIO API Date: Mon, 6 May 2024 17:20:41 +0300 Message-ID: <20240506142142.4042810-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_072211_715443_18886EE6 X-CRM114-Status: GOOD ( 19.27 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/dwc/pcie-kirin.c | 105 ++++++++---------------- 1 file changed, 35 insertions(+), 70 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c index d5523f302102..d1f54f188e71 100644 --- a/drivers/pci/controller/dwc/pcie-kirin.c +++ b/drivers/pci/controller/dwc/pcie-kirin.c @@ -12,12 +12,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -78,16 +76,16 @@ struct kirin_pcie { void *phy_priv; /* only for PCIE_KIRIN_INTERNAL_PHY */ /* DWC PERST# */ - int gpio_id_dwc_perst; + struct gpio_desc *id_dwc_perst_gpio; /* Per-slot PERST# */ int num_slots; - int gpio_id_reset[MAX_PCI_SLOTS]; + struct gpio_desc *id_reset_gpio[MAX_PCI_SLOTS]; const char *reset_names[MAX_PCI_SLOTS]; /* Per-slot clkreq */ int n_gpio_clkreq; - int gpio_id_clkreq[MAX_PCI_SLOTS]; + struct gpio_desc *id_clkreq_gpio[MAX_PCI_SLOTS]; const char *clkreq_names[MAX_PCI_SLOTS]; }; @@ -381,15 +379,20 @@ static int kirin_pcie_get_gpio_enable(struct kirin_pcie *pcie, pcie->n_gpio_clkreq = ret; for (i = 0; i < pcie->n_gpio_clkreq; i++) { - pcie->gpio_id_clkreq[i] = of_get_named_gpio(dev->of_node, - "hisilicon,clken-gpios", i); - if (pcie->gpio_id_clkreq[i] < 0) - return pcie->gpio_id_clkreq[i]; + pcie->id_clkreq_gpio[i] = devm_gpiod_get_index(dev, + "hisilicon,clken", i, + GPIOD_OUT_LOW); + if (IS_ERR(pcie->id_clkreq_gpio[i])) + return dev_err_probe(dev, PTR_ERR(pcie->id_clkreq_gpio[i]), + "unable to get a valid clken gpio\n"); pcie->clkreq_names[i] = devm_kasprintf(dev, GFP_KERNEL, "pcie_clkreq_%d", i); if (!pcie->clkreq_names[i]) return -ENOMEM; + + gpiod_set_consumer_name(pcie->id_clkreq_gpio[i], + pcie->clkreq_names[i]); } return 0; @@ -407,10 +410,16 @@ static int kirin_pcie_parse_port(struct kirin_pcie *pcie, for_each_available_child_of_node(parent, child) { i = pcie->num_slots; - pcie->gpio_id_reset[i] = of_get_named_gpio(child, - "reset-gpios", 0); - if (pcie->gpio_id_reset[i] < 0) - continue; + pcie->id_reset_gpio[i] = devm_fwnode_gpiod_get_index(dev, + of_fwnode_handle(child), + "reset", 0, GPIOD_OUT_LOW, + NULL); + if (IS_ERR(pcie->id_reset_gpio[i])) { + if (PTR_ERR(pcie->id_reset_gpio[i]) == -ENOENT) + continue; + return dev_err_probe(dev, PTR_ERR(pcie->id_reset_gpio[i]), + "unable to get a valid reset gpio\n"); + } pcie->num_slots++; if (pcie->num_slots > MAX_PCI_SLOTS) { @@ -434,6 +443,9 @@ static int kirin_pcie_parse_port(struct kirin_pcie *pcie, ret = -ENOMEM; goto put_node; } + + gpiod_set_consumer_name(pcie->id_reset_gpio[i], + pcie->reset_names[i]); } } @@ -463,14 +475,11 @@ static long kirin_pcie_get_resource(struct kirin_pcie *kirin_pcie, return PTR_ERR(kirin_pcie->apb); /* pcie internal PERST# gpio */ - kirin_pcie->gpio_id_dwc_perst = of_get_named_gpio(dev->of_node, - "reset-gpios", 0); - if (kirin_pcie->gpio_id_dwc_perst == -EPROBE_DEFER) { - return -EPROBE_DEFER; - } else if (!gpio_is_valid(kirin_pcie->gpio_id_dwc_perst)) { - dev_err(dev, "unable to get a valid gpio pin\n"); - return -ENODEV; - } + kirin_pcie->id_dwc_perst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(kirin_pcie->id_dwc_perst_gpio)) + return dev_err_probe(dev, PTR_ERR(kirin_pcie->id_dwc_perst_gpio), + "unable to get a valid gpio pin\n"); + gpiod_set_consumer_name(kirin_pcie->id_dwc_perst_gpio, "pcie_perst_bridge"); ret = kirin_pcie_get_gpio_enable(kirin_pcie, pdev); if (ret) @@ -553,7 +562,7 @@ static int kirin_pcie_add_bus(struct pci_bus *bus) /* Send PERST# to each slot */ for (i = 0; i < kirin_pcie->num_slots; i++) { - ret = gpio_direction_output(kirin_pcie->gpio_id_reset[i], 1); + ret = gpiod_direction_output_raw(kirin_pcie->id_reset_gpio[i], 1); if (ret) { dev_err(pci->dev, "PERST# %s error: %d\n", kirin_pcie->reset_names[i], ret); @@ -623,44 +632,6 @@ static int kirin_pcie_host_init(struct dw_pcie_rp *pp) return 0; } -static int kirin_pcie_gpio_request(struct kirin_pcie *kirin_pcie, - struct device *dev) -{ - int ret, i; - - for (i = 0; i < kirin_pcie->num_slots; i++) { - if (!gpio_is_valid(kirin_pcie->gpio_id_reset[i])) { - dev_err(dev, "unable to get a valid %s gpio\n", - kirin_pcie->reset_names[i]); - return -ENODEV; - } - - ret = devm_gpio_request(dev, kirin_pcie->gpio_id_reset[i], - kirin_pcie->reset_names[i]); - if (ret) - return ret; - } - - for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++) { - if (!gpio_is_valid(kirin_pcie->gpio_id_clkreq[i])) { - dev_err(dev, "unable to get a valid %s gpio\n", - kirin_pcie->clkreq_names[i]); - return -ENODEV; - } - - ret = devm_gpio_request(dev, kirin_pcie->gpio_id_clkreq[i], - kirin_pcie->clkreq_names[i]); - if (ret) - return ret; - - ret = gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 0); - if (ret) - return ret; - } - - return 0; -} - static const struct dw_pcie_ops kirin_dw_pcie_ops = { .read_dbi = kirin_pcie_read_dbi, .write_dbi = kirin_pcie_write_dbi, @@ -680,7 +651,7 @@ static int kirin_pcie_power_off(struct kirin_pcie *kirin_pcie) return hi3660_pcie_phy_power_off(kirin_pcie); for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++) - gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 1); + gpiod_direction_output_raw(kirin_pcie->id_clkreq_gpio[i], 1); phy_power_off(kirin_pcie->phy); phy_exit(kirin_pcie->phy); @@ -707,10 +678,6 @@ static int kirin_pcie_power_on(struct platform_device *pdev, if (IS_ERR(kirin_pcie->phy)) return PTR_ERR(kirin_pcie->phy); - ret = kirin_pcie_gpio_request(kirin_pcie, dev); - if (ret) - return ret; - ret = phy_init(kirin_pcie->phy); if (ret) goto err; @@ -723,11 +690,9 @@ static int kirin_pcie_power_on(struct platform_device *pdev, /* perst assert Endpoint */ usleep_range(REF_2_PERST_MIN, REF_2_PERST_MAX); - if (!gpio_request(kirin_pcie->gpio_id_dwc_perst, "pcie_perst_bridge")) { - ret = gpio_direction_output(kirin_pcie->gpio_id_dwc_perst, 1); - if (ret) - goto err; - } + ret = gpiod_direction_output_raw(kirin_pcie->id_dwc_perst_gpio, 1); + if (ret) + goto err; usleep_range(PERST_2_ACCESS_MIN, PERST_2_ACCESS_MAX);