From patchwork Tue Feb 14 12:13:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140307 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3139C61DA4 for ; Tue, 14 Feb 2023 14:26:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233452AbjBNO0k (ORCPT ); Tue, 14 Feb 2023 09:26:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233193AbjBNO0S (ORCPT ); Tue, 14 Feb 2023 09:26:18 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 347733C01 for ; Tue, 14 Feb 2023 06:26:13 -0800 (PST) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230214140645epoutp03545bdfa06ff5311c4026e72fd5e2f1e5~DtgH7LBnA1709717097epoutp03f for ; Tue, 14 Feb 2023 14:06:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230214140645epoutp03545bdfa06ff5311c4026e72fd5e2f1e5~DtgH7LBnA1709717097epoutp03f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383605; bh=kPWMNQWjS6SF6VWeK5pULwfmzkzmPni0cKHjY437eXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D09AFWkCacU04lmAxcYwb7Xc0pLwQ8jHfnOrxwF09q8l38MlQmPxm4kH2c4PRsijs dBqAX6K+xHjaAAa9WAf/4VN6dBT9Qd2dr31Rxii3+hk/30dFzwFYOrCDnIMzGIr9VF rXfj3L7/zw5bLtXBpvcDad0KblTg9IfHb/x/0rC4= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230214140645epcas5p3d268c031ebdfbf2585009aa99dd3b833~DtgHQADcE1511815118epcas5p3p; Tue, 14 Feb 2023 14:06:45 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.183]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4PGNLB6bB6z4x9Pr; Tue, 14 Feb 2023 14:06:42 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 96.FF.55678.2759BE36; Tue, 14 Feb 2023 23:06:42 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230214121404epcas5p3bfa6af0151b7f319d418f7c0dbed7c5a~Dr9vJjIzu2572325723epcas5p3W; Tue, 14 Feb 2023 12:14:04 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121404epsmtrp1d07f41a848e4f7e523d73e21e63c92d8~Dr9vIqte-1733117331epsmtrp1Y; Tue, 14 Feb 2023 12:14:04 +0000 (GMT) X-AuditID: b6c32a4a-6a3ff7000000d97e-00-63eb95729cb0 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id DE.EA.17995.C0B7BE36; Tue, 14 Feb 2023 21:14:04 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121402epsmtip191e934de5270483bae4b5119e07abd9d~Dr9sjJ5Fi2380623806epsmtip1t; Tue, 14 Feb 2023 12:14:01 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 01/16] dt-bindings: PCI: Rename Exynos PCIe binding to Samsung PCIe Date: Tue, 14 Feb 2023 17:43:18 +0530 Message-Id: <20230214121333.1837-2-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTe1BUVRzH59y73L2oW9eFxgNOuF3HFBpg13gcSMAmcC7SNMw4jA0ztl2X G0ssu8veXRWrCQoweWvACsPDATSBBPeCQIBFaJEPqOGVmowwomIQLUJkgEPL7lL/fX6/3/d3 fo9zDolLewlPMklr5AxaVkMTG0RtV713+RpKplXyZ/NyNF7VRqC6z9So+tqACypvqwRobnlA hC4slIlRwdQEjtLzll2Q8GDUBQ11VhCov6qPQGd+/hZDmSuZIpT5wwkRunhtTIxqLi+I0Wp3 hxitmK0ilH/1E9QilOB73ZkZ4W8x8035mJg5K5gYoeEkwdwb7SaY2YEBMTM5bMaYlrpPGcts B8bUpM8RTEFrA2DmBa/YTfHJe9Qcm8AZZJxWpUtI0iaG0TEHlG8pA4PkCl9FCAqmZVo2hQuj I9+O9d2XpLGNScuOsBqTzRXL8jztH77HoDMZOZlaxxvDaE6foNEH6P14NoU3aRP9tJwxVCGX 7w60Cd9PVv9hHib030uOLZy7C9LB0MYc4EpCKgDeqc3Ac8AGUkp1AVjZl+k0ngKY+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bdlFaPH501yATxRXDYp qTmZZalF+nYJXBlvp19hKzjIW/Fl6S3GBsbL3F2MnBwSAiYSb+YsYeli5OIQEtjBKLGh8zgj REJS4vPFdUwQtrDEyn/P2SGKmpkkzh84C5ZgE9CSaPzaxQySEBF4xSRxeM8MMIdZ4AKjxK2D 3ewgVcICwRLvdj1hAbFZBFQltq+7BhbnFbCU+HRgJdQKeYnVGw4wg9icAlYSLa2bwGwhoJpZ v1YxTmDkW8DIsIpRMrWgODc9t9iwwCgvtVyvODG3uDQvXS85P3cTIzh2tLR2MO5Z9UHvECMT B+MhRgkOZiURXuGnL5KFeFMSK6tSi/Lji0pzUosPMUpzsCiJ817oOhkvJJCeWJKanZpakFoE k2Xi4JRqYCqt5p0Xe+zylHNf+mRjxFgcVGfLxEQdOVO/ZY/eU8f5b/6rpps1O702ODmbK5jl 8TrNHXv/f5hpncdU3h25bN72g/I3TuS99wg6Mafj0a0XRc9uXv5avvDQq/8H1p53runNLT53 /sH0yesEbPpU09917bp/wmtSbNuTxBlXTC/aeN2667f030Gl01VhJ9xZ6yJiApwE014VzK2y a7lzYW9s0dVf6ypNpM4Zuh75d3hTxEelFQ+k2RaavH98dsGje2mhZ4sa1b+UfS4yTTjAafIg WYhJ0tJTqlWpr4a/9GPSPD+1XWem2LksCr+wzcj1zda5VTFyVUZvJHtz2qt+HjK6XTzHMOOF tOjM6C3LNy1TYinOSDTUYi4qTgQABx/DIAwDAAA= X-CMS-MailID: 20230214121404epcas5p3bfa6af0151b7f319d418f7c0dbed7c5a X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121404epcas5p3bfa6af0151b7f319d418f7c0dbed7c5a References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The current DT bindings is being used for Exynos5433 SoC only. In order to extend this binding for all SoCs manufactured by Samsung using DWC PCIe controller, renaming this file to a more generic name. Signed-off-by: Shradha Todi --- .../pci/{samsung,exynos-pcie.yaml => samsung,pcie.yaml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename Documentation/devicetree/bindings/pci/{samsung,exynos-pcie.yaml => samsung,pcie.yaml} (93%) diff --git a/Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml b/Documentation/devicetree/bindings/pci/samsung,pcie.yaml similarity index 93% rename from Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml rename to Documentation/devicetree/bindings/pci/samsung,pcie.yaml index f20ed7e709f7..6cd36d9ccba0 100644 --- a/Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/samsung,pcie.yaml @@ -1,17 +1,17 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- -$id: http://devicetree.org/schemas/pci/samsung,exynos-pcie.yaml# +$id: http://devicetree.org/schemas/pci/samsung,pcie.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Samsung SoC series PCIe Host Controller +title: Samsung SoC series PCIe Controller maintainers: - Marek Szyprowski - Jaehoon Chung description: |+ - Exynos5433 SoC PCIe host controller is based on the Synopsys DesignWare + Samsung SoC PCIe controller is based on the Synopsys DesignWare PCIe IP and thus inherits all the common properties defined in snps,dw-pcie.yaml. From patchwork Tue Feb 14 12:13:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140309 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 666A6C05027 for ; Tue, 14 Feb 2023 14:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231572AbjBNO0m (ORCPT ); Tue, 14 Feb 2023 09:26:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232844AbjBNO0V (ORCPT ); Tue, 14 Feb 2023 09:26:21 -0500 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95830113C6 for ; Tue, 14 Feb 2023 06:26:13 -0800 (PST) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230214140654epoutp043de3c6fb6b2a61d87a93505bc16dd350~DtgQEGkDZ2151721517epoutp04q for ; Tue, 14 Feb 2023 14:06:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230214140654epoutp043de3c6fb6b2a61d87a93505bc16dd350~DtgQEGkDZ2151721517epoutp04q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383614; bh=eIcDirgtV8qN9plFXoUeyRc8NT+nYHD885KzjKd3kiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GmVrxAvRM8IV9Aa/eFj71ap8TRaD0nJW4w99RG2QwFfflER3aJLM+Rz0sd3Slt2Ez Yl0N5yAX9fGr2le+5ZfEU/1jtOJdqMUJ6HuPHqKpTZYrwCbIQeFBiPL7zs+H1BDQCm hAagOQ7jq6W0m/Jodj4TZILDhOt12c//vOFtIMeY= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230214140653epcas5p336439875d989277525e840b13f6ed354~DtgOvzvS41731617316epcas5p3r; Tue, 14 Feb 2023 14:06:53 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.182]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4PGNLN0yDwz4x9Pt; Tue, 14 Feb 2023 14:06:52 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 54.49.10528.B759BE36; Tue, 14 Feb 2023 23:06:51 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230214121411epcas5p25efd5d4242c512f21165df0c2e81b8bc~Dr91oEM8l3058930589epcas5p2v; Tue, 14 Feb 2023 12:14:11 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121411epsmtrp27d1f81be0cb57b3819da1c28ef1ef5ee~Dr91nIUZM1888418884epsmtrp2G; Tue, 14 Feb 2023 12:14:11 +0000 (GMT) X-AuditID: b6c32a49-e75fa70000012920-85-63eb957b0683 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 2C.7E.05839.31B7BE36; Tue, 14 Feb 2023 21:14:11 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121408epsmtip142a0a642b57491c7daf7930f59068986~Dr9yns0Kx1886618866epsmtip1d; Tue, 14 Feb 2023 12:14:08 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 02/16] PCI: exynos: Rename Exynos PCIe driver to Samsung PCIe Date: Tue, 14 Feb 2023 17:43:19 +0530 Message-Id: <20230214121333.1837-3-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTfVBUVRjG59x7uXexYG4LTEdCpIUsmYDd3MWDSeVEcEVHECudsoHrcttF 9uO2u1iwYy4OjImuU8wwECGhUq00WCzEgMFGiDIQUQIxLLoMTJKYtfIl4QDS7l6s/37neZ53 3vOeDxEudpChohydiTPoWI2EXEc0X9n8XIy57K5SOlyagMarm0lUe1yNPu/q90OVzWcBmlnq J5Bt/lMKnZmawJHl9JIfsv8+7IcGL1eR6OfqbhJV/OLAUNFyEYGKrp4gUH2Xi0Lnv5un0Gpb C4WWy6cJZL1yFDXay/BXgpm/7P9QTGuli2Jq7HmMve4kydwcbiMZd38/xdwaKseYxtpjTIO7 BWPOW2ZI5kxTHWDm7OHpj7+Vu13NsdmcIYLTKfXZOTpVomTXvsxXMxXxUlmMLAFtlUToWC2X KEnanR6TnKPxjCmJOMJq8jxSOms0SuJe2m7Q55m4CLXeaEqUcHy2hpfzsUZWa8zTqWJ1nGmb TCp9QeEJZuWqZ1dHcX7K9EFJdStmAZZDJcBfBGk5vP3FCFUC1onE9PcAHl9xE15DTM8C+HD1 acFYALC5fNJjiHwVi71aQW8HcHDaRgqLYgwW9tVQ3mqSjoaF90twrxFMj2LwztyErwdO9wLY MdXuSwXRadB234l5maCfgZesD/28LQLoBNh3jhf2txF+/W0H7mV/ehssKrbjgn5TBI87OIGT 4GztAilwEPyzu4kSOBTOudvXdBW82FixVquBC421mMAvw46hKt9kOL0ZfnM5TpA3wLLeS74I TgdC69KttXgAbKl+xJFwfqWNEHg9rL426CcwA1v/GAbCKVoB/Pvqux+D8Mr/O9QAUAfWc7xR q+KMCl6m497/786Ueq0d+B5y9M4W4Bqfju0EmAh0AijCJcEBQZNTSnFANptfwBn0mYY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TWnyIUZqDRUmc90LXyXghgfTEktTs1NSC 1CKYLBMHp1QDk8G+4CM2+mv7VvcLb57N75O+68UCj8fTjK4ta34ofMvtY3aa1D7vkBsTP0j3 LQit1La8dPTU5miX/sYnxqfetv8uvqhS23aIjVmx8UKYy9cDE5WNY6X9+TLyUzZILk6tO798 7/+X9nmvTkZ/mVnNUXcvaMOeK3sNuHquM95beknz8dYjBUtuHBXjmWnw+F3Du08SYb3Ju0UU 7AKTUzcJ+TNd+Tvvr3xX5y8V66I9Pb/VmxfvyZivIPi/2KBSOtLi7fel958qX81cVrTD1Epw xoS3ymu4KvOOb+lwdjSXPl+nI9k0M6jtzIoPqSaWy36fq/7W7fvmZ+my1etOyRdPichRzFnL teKRvMfqbSdfL1BiKc5INNRiLipOBACp5VU4CQMAAA== X-CMS-MailID: 20230214121411epcas5p25efd5d4242c512f21165df0c2e81b8bc X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121411epcas5p25efd5d4242c512f21165df0c2e81b8bc References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The current PCIe controller driver is being used for Exynos5433 SoC only. In order to extend this driver for all SoCs manufactured by Samsung using DWC PCIe controller, rename this driver and make it Samsung specific instead of any Samsung SoC name. Signed-off-by: Shradha Todi --- MAINTAINERS | 4 +- drivers/pci/controller/dwc/Kconfig | 6 +- drivers/pci/controller/dwc/Makefile | 2 +- drivers/pci/controller/dwc/pci-samsung.c | 443 +++++++++++++++++++++++ 4 files changed, 449 insertions(+), 6 deletions(-) create mode 100644 drivers/pci/controller/dwc/pci-samsung.c diff --git a/MAINTAINERS b/MAINTAINERS index a9d38274bd4d..e61374adf193 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16084,13 +16084,13 @@ S: Maintained F: Documentation/devicetree/bindings/pci/*rcar* F: drivers/pci/controller/*rcar* -PCI DRIVER FOR SAMSUNG EXYNOS +PCI DRIVER FOR SAMSUNG M: Jingoo Han L: linux-pci@vger.kernel.org L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-samsung-soc@vger.kernel.org S: Maintained -F: drivers/pci/controller/dwc/pci-exynos.c +F: drivers/pci/controller/dwc/pci-samsung.c PCI DRIVER FOR SYNOPSYS DESIGNWARE M: Jingoo Han diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 434f6a4f4041..837c7693ac6e 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -80,13 +80,13 @@ config PCIE_DW_PLAT_EP order to enable device-specific features PCI_DW_PLAT_EP must be selected. -config PCI_EXYNOS - tristate "Samsung Exynos PCIe controller" +config PCI_SAMSUNG + tristate "Samsung PCIe controller" depends on ARCH_EXYNOS || COMPILE_TEST depends on PCI_MSI select PCIE_DW_HOST help - Enables support for the PCIe controller in the Samsung Exynos SoCs + Enables support for the PCIe controller in the Samsung SoCs to work in host mode. The PCI controller is based on the DesignWare hardware and therefore the driver re-uses the DesignWare core functions to implement the driver. diff --git a/drivers/pci/controller/dwc/Makefile b/drivers/pci/controller/dwc/Makefile index bf5c311875a1..9daf9643342d 100644 --- a/drivers/pci/controller/dwc/Makefile +++ b/drivers/pci/controller/dwc/Makefile @@ -5,7 +5,7 @@ obj-$(CONFIG_PCIE_DW_EP) += pcie-designware-ep.o obj-$(CONFIG_PCIE_DW_PLAT) += pcie-designware-plat.o obj-$(CONFIG_PCIE_BT1) += pcie-bt1.o obj-$(CONFIG_PCI_DRA7XX) += pci-dra7xx.o -obj-$(CONFIG_PCI_EXYNOS) += pci-exynos.o +obj-$(CONFIG_PCI_SAMSUNG) += pci-samsung.o obj-$(CONFIG_PCIE_FU740) += pcie-fu740.o obj-$(CONFIG_PCI_IMX6) += pci-imx6.o obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c new file mode 100644 index 000000000000..cc562a8694fb --- /dev/null +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -0,0 +1,443 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * PCIe host controller driver for Samsung SoCs + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * https://www.samsung.com + * + * Author: Jingoo Han + * Jaehoon Chung + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pcie-designware.h" + +#define to_exynos_pcie(x) dev_get_drvdata((x)->dev) + +/* PCIe ELBI registers */ +#define PCIE_IRQ_PULSE 0x000 +#define IRQ_INTA_ASSERT BIT(0) +#define IRQ_INTB_ASSERT BIT(2) +#define IRQ_INTC_ASSERT BIT(4) +#define IRQ_INTD_ASSERT BIT(6) +#define PCIE_IRQ_LEVEL 0x004 +#define PCIE_IRQ_SPECIAL 0x008 +#define PCIE_IRQ_EN_PULSE 0x00c +#define PCIE_IRQ_EN_LEVEL 0x010 +#define PCIE_IRQ_EN_SPECIAL 0x014 +#define PCIE_SW_WAKE 0x018 +#define PCIE_BUS_EN BIT(1) +#define PCIE_CORE_RESET 0x01c +#define PCIE_CORE_RESET_ENABLE BIT(0) +#define PCIE_STICKY_RESET 0x020 +#define PCIE_NONSTICKY_RESET 0x024 +#define PCIE_APP_INIT_RESET 0x028 +#define PCIE_APP_LTSSM_ENABLE 0x02c +#define PCIE_ELBI_RDLH_LINKUP 0x074 +#define PCIE_ELBI_XMLH_LINKUP BIT(4) +#define PCIE_ELBI_LTSSM_ENABLE 0x1 +#define PCIE_ELBI_SLV_AWMISC 0x11c +#define PCIE_ELBI_SLV_ARMISC 0x120 +#define PCIE_ELBI_SLV_DBI_ENABLE BIT(21) + +struct exynos_pcie { + struct dw_pcie pci; + void __iomem *elbi_base; + struct clk *clk; + struct clk *bus_clk; + struct phy *phy; + struct regulator_bulk_data supplies[2]; +}; + +static int exynos_pcie_init_clk_resources(struct exynos_pcie *ep) +{ + struct device *dev = ep->pci.dev; + int ret; + + ret = clk_prepare_enable(ep->clk); + if (ret) { + dev_err(dev, "cannot enable pcie rc clock"); + return ret; + } + + ret = clk_prepare_enable(ep->bus_clk); + if (ret) { + dev_err(dev, "cannot enable pcie bus clock"); + goto err_bus_clk; + } + + return 0; + +err_bus_clk: + clk_disable_unprepare(ep->clk); + + return ret; +} + +static void exynos_pcie_deinit_clk_resources(struct exynos_pcie *ep) +{ + clk_disable_unprepare(ep->bus_clk); + clk_disable_unprepare(ep->clk); +} + +static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg) +{ + writel(val, base + reg); +} + +static u32 exynos_pcie_readl(void __iomem *base, u32 reg) +{ + return readl(base + reg); +} + +static void exynos_pcie_sideband_dbi_w_mode(struct exynos_pcie *ep, bool on) +{ + u32 val; + + val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_AWMISC); + if (on) + val |= PCIE_ELBI_SLV_DBI_ENABLE; + else + val &= ~PCIE_ELBI_SLV_DBI_ENABLE; + exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_AWMISC); +} + +static void exynos_pcie_sideband_dbi_r_mode(struct exynos_pcie *ep, bool on) +{ + u32 val; + + val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_ARMISC); + if (on) + val |= PCIE_ELBI_SLV_DBI_ENABLE; + else + val &= ~PCIE_ELBI_SLV_DBI_ENABLE; + exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_ARMISC); +} + +static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep) +{ + u32 val; + + val = exynos_pcie_readl(ep->elbi_base, PCIE_CORE_RESET); + val &= ~PCIE_CORE_RESET_ENABLE; + exynos_pcie_writel(ep->elbi_base, val, PCIE_CORE_RESET); + exynos_pcie_writel(ep->elbi_base, 0, PCIE_STICKY_RESET); + exynos_pcie_writel(ep->elbi_base, 0, PCIE_NONSTICKY_RESET); +} + +static void exynos_pcie_deassert_core_reset(struct exynos_pcie *ep) +{ + u32 val; + + val = exynos_pcie_readl(ep->elbi_base, PCIE_CORE_RESET); + val |= PCIE_CORE_RESET_ENABLE; + + exynos_pcie_writel(ep->elbi_base, val, PCIE_CORE_RESET); + exynos_pcie_writel(ep->elbi_base, 1, PCIE_STICKY_RESET); + exynos_pcie_writel(ep->elbi_base, 1, PCIE_NONSTICKY_RESET); + exynos_pcie_writel(ep->elbi_base, 1, PCIE_APP_INIT_RESET); + exynos_pcie_writel(ep->elbi_base, 0, PCIE_APP_INIT_RESET); +} + +static int exynos_pcie_start_link(struct dw_pcie *pci) +{ + struct exynos_pcie *ep = to_exynos_pcie(pci); + u32 val; + + val = exynos_pcie_readl(ep->elbi_base, PCIE_SW_WAKE); + val &= ~PCIE_BUS_EN; + exynos_pcie_writel(ep->elbi_base, val, PCIE_SW_WAKE); + + /* assert LTSSM enable */ + exynos_pcie_writel(ep->elbi_base, PCIE_ELBI_LTSSM_ENABLE, + PCIE_APP_LTSSM_ENABLE); + return 0; +} + +static void exynos_pcie_clear_irq_pulse(struct exynos_pcie *ep) +{ + u32 val = exynos_pcie_readl(ep->elbi_base, PCIE_IRQ_PULSE); + + exynos_pcie_writel(ep->elbi_base, val, PCIE_IRQ_PULSE); +} + +static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg) +{ + struct exynos_pcie *ep = arg; + + exynos_pcie_clear_irq_pulse(ep); + return IRQ_HANDLED; +} + +static void exynos_pcie_enable_irq_pulse(struct exynos_pcie *ep) +{ + u32 val = IRQ_INTA_ASSERT | IRQ_INTB_ASSERT | + IRQ_INTC_ASSERT | IRQ_INTD_ASSERT; + + exynos_pcie_writel(ep->elbi_base, val, PCIE_IRQ_EN_PULSE); + exynos_pcie_writel(ep->elbi_base, 0, PCIE_IRQ_EN_LEVEL); + exynos_pcie_writel(ep->elbi_base, 0, PCIE_IRQ_EN_SPECIAL); +} + +static u32 exynos_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base, + u32 reg, size_t size) +{ + struct exynos_pcie *ep = to_exynos_pcie(pci); + u32 val; + + exynos_pcie_sideband_dbi_r_mode(ep, true); + dw_pcie_read(base + reg, size, &val); + exynos_pcie_sideband_dbi_r_mode(ep, false); + return val; +} + +static void exynos_pcie_write_dbi(struct dw_pcie *pci, void __iomem *base, + u32 reg, size_t size, u32 val) +{ + struct exynos_pcie *ep = to_exynos_pcie(pci); + + exynos_pcie_sideband_dbi_w_mode(ep, true); + dw_pcie_write(base + reg, size, val); + exynos_pcie_sideband_dbi_w_mode(ep, false); +} + +static int exynos_pcie_rd_own_conf(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 *val) +{ + struct dw_pcie *pci = to_dw_pcie_from_pp(bus->sysdata); + + if (PCI_SLOT(devfn)) + return PCIBIOS_DEVICE_NOT_FOUND; + + *val = dw_pcie_read_dbi(pci, where, size); + return PCIBIOS_SUCCESSFUL; +} + +static int exynos_pcie_wr_own_conf(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 val) +{ + struct dw_pcie *pci = to_dw_pcie_from_pp(bus->sysdata); + + if (PCI_SLOT(devfn)) + return PCIBIOS_DEVICE_NOT_FOUND; + + dw_pcie_write_dbi(pci, where, size, val); + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops exynos_pci_ops = { + .read = exynos_pcie_rd_own_conf, + .write = exynos_pcie_wr_own_conf, +}; + +static int exynos_pcie_link_up(struct dw_pcie *pci) +{ + struct exynos_pcie *ep = to_exynos_pcie(pci); + u32 val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_RDLH_LINKUP); + + return (val & PCIE_ELBI_XMLH_LINKUP); +} + +static int exynos_pcie_host_init(struct dw_pcie_rp *pp) +{ + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); + struct exynos_pcie *ep = to_exynos_pcie(pci); + + pp->bridge->ops = &exynos_pci_ops; + + exynos_pcie_assert_core_reset(ep); + + phy_init(ep->phy); + phy_power_on(ep->phy); + + exynos_pcie_deassert_core_reset(ep); + exynos_pcie_enable_irq_pulse(ep); + + return 0; +} + +static const struct dw_pcie_host_ops exynos_pcie_host_ops = { + .host_init = exynos_pcie_host_init, +}; + +static int exynos_add_pcie_port(struct exynos_pcie *ep, + struct platform_device *pdev) +{ + struct dw_pcie *pci = &ep->pci; + struct dw_pcie_rp *pp = &pci->pp; + struct device *dev = &pdev->dev; + int ret; + + pp->irq = platform_get_irq(pdev, 0); + if (pp->irq < 0) + return pp->irq; + + ret = devm_request_irq(dev, pp->irq, exynos_pcie_irq_handler, + IRQF_SHARED, "exynos-pcie", ep); + if (ret) { + dev_err(dev, "failed to request irq\n"); + return ret; + } + + pp->ops = &exynos_pcie_host_ops; + pp->msi_irq[0] = -ENODEV; + + ret = dw_pcie_host_init(pp); + if (ret) { + dev_err(dev, "failed to initialize host\n"); + return ret; + } + + return 0; +} + +static const struct dw_pcie_ops dw_pcie_ops = { + .read_dbi = exynos_pcie_read_dbi, + .write_dbi = exynos_pcie_write_dbi, + .link_up = exynos_pcie_link_up, + .start_link = exynos_pcie_start_link, +}; + +static int exynos_pcie_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct exynos_pcie *ep; + struct device_node *np = dev->of_node; + int ret; + + ep = devm_kzalloc(dev, sizeof(*ep), GFP_KERNEL); + if (!ep) + return -ENOMEM; + + ep->pci.dev = dev; + ep->pci.ops = &dw_pcie_ops; + + ep->phy = devm_of_phy_get(dev, np, NULL); + if (IS_ERR(ep->phy)) + return PTR_ERR(ep->phy); + + /* External Local Bus interface (ELBI) registers */ + ep->elbi_base = devm_platform_ioremap_resource_byname(pdev, "elbi"); + if (IS_ERR(ep->elbi_base)) + return PTR_ERR(ep->elbi_base); + + ep->clk = devm_clk_get(dev, "pcie"); + if (IS_ERR(ep->clk)) { + dev_err(dev, "Failed to get pcie rc clock\n"); + return PTR_ERR(ep->clk); + } + + ep->bus_clk = devm_clk_get(dev, "pcie_bus"); + if (IS_ERR(ep->bus_clk)) { + dev_err(dev, "Failed to get pcie bus clock\n"); + return PTR_ERR(ep->bus_clk); + } + + ep->supplies[0].supply = "vdd18"; + ep->supplies[1].supply = "vdd10"; + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ep->supplies), + ep->supplies); + if (ret) + return ret; + + ret = exynos_pcie_init_clk_resources(ep); + if (ret) + return ret; + + ret = regulator_bulk_enable(ARRAY_SIZE(ep->supplies), ep->supplies); + if (ret) + return ret; + + platform_set_drvdata(pdev, ep); + + ret = exynos_add_pcie_port(ep, pdev); + if (ret < 0) + goto fail_probe; + + return 0; + +fail_probe: + phy_exit(ep->phy); + exynos_pcie_deinit_clk_resources(ep); + regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); + + return ret; +} + +static int __exit exynos_pcie_remove(struct platform_device *pdev) +{ + struct exynos_pcie *ep = platform_get_drvdata(pdev); + + dw_pcie_host_deinit(&ep->pci.pp); + exynos_pcie_assert_core_reset(ep); + phy_power_off(ep->phy); + phy_exit(ep->phy); + exynos_pcie_deinit_clk_resources(ep); + regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); + + return 0; +} + +static int exynos_pcie_suspend_noirq(struct device *dev) +{ + struct exynos_pcie *ep = dev_get_drvdata(dev); + + exynos_pcie_assert_core_reset(ep); + phy_power_off(ep->phy); + phy_exit(ep->phy); + regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); + + return 0; +} + +static int exynos_pcie_resume_noirq(struct device *dev) +{ + struct exynos_pcie *ep = dev_get_drvdata(dev); + struct dw_pcie *pci = &ep->pci; + struct dw_pcie_rp *pp = &pci->pp; + int ret; + + ret = regulator_bulk_enable(ARRAY_SIZE(ep->supplies), ep->supplies); + if (ret) + return ret; + + /* exynos_pcie_host_init controls ep->phy */ + exynos_pcie_host_init(pp); + dw_pcie_setup_rc(pp); + exynos_pcie_start_link(pci); + return dw_pcie_wait_for_link(pci); +} + +static const struct dev_pm_ops exynos_pcie_pm_ops = { + NOIRQ_SYSTEM_SLEEP_PM_OPS(exynos_pcie_suspend_noirq, + exynos_pcie_resume_noirq) +}; + +static const struct of_device_id exynos_pcie_of_match[] = { + { .compatible = "samsung,exynos5433-pcie", }, + { }, +}; + +static struct platform_driver exynos_pcie_driver = { + .probe = exynos_pcie_probe, + .remove = __exit_p(exynos_pcie_remove), + .driver = { + .name = "exynos-pcie", + .of_match_table = exynos_pcie_of_match, + .pm = &exynos_pcie_pm_ops, + }, +}; +module_platform_driver(exynos_pcie_driver); +MODULE_LICENSE("GPL v2"); +MODULE_DEVICE_TABLE(of, exynos_pcie_of_match); From patchwork Tue Feb 14 12:13:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140305 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15539C05027 for ; Tue, 14 Feb 2023 14:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbjBNO0U (ORCPT ); Tue, 14 Feb 2023 09:26:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233062AbjBNO0N (ORCPT ); Tue, 14 Feb 2023 09:26:13 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E1302A9AD for ; Tue, 14 Feb 2023 06:26:07 -0800 (PST) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230214140735epoutp011b469248ef93a4254731bad7126ac511~Dtg2dNMLs1509115091epoutp01R for ; Tue, 14 Feb 2023 14:07:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230214140735epoutp011b469248ef93a4254731bad7126ac511~Dtg2dNMLs1509115091epoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383655; bh=RWBmjFAwipURTdEjBQt0TPuT+ojNakaSjKcHTBJXkBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=flkcQ8aBiwH5fI6ogkIJOiyucVrCJe6cvO3DS/r/X7w0O76qCp0gmr1nbO/dJF86g zSeU+FfppgqHeBTa1PII3sc9xvn/YaRi5eySGxu/Uh7Z1TXFwhlH1myz3384kC3sAN 7d1Vo/zOxx+nLslqVR2NYWuhv38n1f1ltZmV6a7I= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230214140735epcas5p315479286ae9c7f9145628af0b24b28ae~Dtg1xrAsn1511815118epcas5p3w; Tue, 14 Feb 2023 14:07:35 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.178]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4PGNMB03PYz4x9Pq; Tue, 14 Feb 2023 14:07:34 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id D6.00.55678.5A59BE36; Tue, 14 Feb 2023 23:07:33 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20230214121416epcas5p4de066199144cba18858e68f6d0ccb1c0~Dr959w0Rh0536905369epcas5p4G; Tue, 14 Feb 2023 12:14:16 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121416epsmtrp2e21356409ec312791e8d8bb7d6d43f7d~Dr9585lPw1888418884epsmtrp2P; Tue, 14 Feb 2023 12:14:16 +0000 (GMT) X-AuditID: b6c32a4a-6a3ff7000000d97e-5b-63eb95a5b1ff Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 51.8E.05839.81B7BE36; Tue, 14 Feb 2023 21:14:16 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121412epsmtip16b2056a766c6d8bfdb919dd9855aabcb~Dr92tqndW2484124841epsmtip1M; Tue, 14 Feb 2023 12:14:12 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 03/16] PCI: samsung: Change macro names to exynos specific Date: Tue, 14 Feb 2023 17:43:20 +0530 Message-Id: <20230214121333.1837-4-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMJsWRmVeSWpSXmKPExsWy7bCmhu7Sqa+TDV48M7V4MG8bm8WSpgyL +UfOsVrM2jaX0eLj73MsFiu+zGS36HvxkNmioec3q8Wmx9dYLS7vmsNmcXbecTaLGef3MVm0 /GlhsWg52s5isfbIXXaLRVu/sFv837OD3eLP9A8sFr2Hay02b5rK7CDi8WbTd3aPnbPusnss 2FTqsWlVJ5vHnWt72DzenTvH7vHkynQmj81L6j02vtvB5LGo4SObR9+WVYwenzfJBfBEZ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ID: 20230214121416epcas5p4de066199144cba18858e68f6d0ccb1c0 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121416epcas5p4de066199144cba18858e68f6d0ccb1c0 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Since the macros being used in samsung file are for exynos only, renaming it to be more specific. Signed-off-by: Shradha Todi Suggested-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski --- drivers/pci/controller/dwc/pci-samsung.c | 116 +++++++++++------------ 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index cc562a8694fb..cfe384aee754 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -26,30 +26,30 @@ #define to_exynos_pcie(x) dev_get_drvdata((x)->dev) /* PCIe ELBI registers */ -#define PCIE_IRQ_PULSE 0x000 -#define IRQ_INTA_ASSERT BIT(0) -#define IRQ_INTB_ASSERT BIT(2) -#define IRQ_INTC_ASSERT BIT(4) -#define IRQ_INTD_ASSERT BIT(6) -#define PCIE_IRQ_LEVEL 0x004 -#define PCIE_IRQ_SPECIAL 0x008 -#define PCIE_IRQ_EN_PULSE 0x00c -#define PCIE_IRQ_EN_LEVEL 0x010 -#define PCIE_IRQ_EN_SPECIAL 0x014 -#define PCIE_SW_WAKE 0x018 -#define PCIE_BUS_EN BIT(1) -#define PCIE_CORE_RESET 0x01c -#define PCIE_CORE_RESET_ENABLE BIT(0) -#define PCIE_STICKY_RESET 0x020 -#define PCIE_NONSTICKY_RESET 0x024 -#define PCIE_APP_INIT_RESET 0x028 -#define PCIE_APP_LTSSM_ENABLE 0x02c -#define PCIE_ELBI_RDLH_LINKUP 0x074 -#define PCIE_ELBI_XMLH_LINKUP BIT(4) -#define PCIE_ELBI_LTSSM_ENABLE 0x1 -#define PCIE_ELBI_SLV_AWMISC 0x11c -#define PCIE_ELBI_SLV_ARMISC 0x120 -#define PCIE_ELBI_SLV_DBI_ENABLE BIT(21) +#define EXYNOS_PCIE_IRQ_PULSE 0x000 +#define EXYNOS_IRQ_INTA_ASSERT BIT(0) +#define EXYNOS_IRQ_INTB_ASSERT BIT(2) +#define EXYNOS_IRQ_INTC_ASSERT BIT(4) +#define EXYNOS_IRQ_INTD_ASSERT BIT(6) +#define EXYNOS_PCIE_IRQ_LEVEL 0x004 +#define EXYNOS_PCIE_IRQ_SPECIAL 0x008 +#define EXYNOS_PCIE_IRQ_EN_PULSE 0x00c +#define EXYNOS_PCIE_IRQ_EN_LEVEL 0x010 +#define EXYNOS_PCIE_IRQ_EN_SPECIAL 0x014 +#define EXYNOS_PCIE_SW_WAKE 0x018 +#define EXYNOS_PCIE_BUS_EN BIT(1) +#define EXYNOS_PCIE_CORE_RESET 0x01c +#define EXYNOS_PCIE_CORE_RESET_ENABLE BIT(0) +#define EXYNOS_PCIE_STICKY_RESET 0x020 +#define EXYNOS_PCIE_NONSTICKY_RESET 0x024 +#define EXYNOS_PCIE_APP_INIT_RESET 0x028 +#define EXYNOS_PCIE_APP_LTSSM_ENABLE 0x02c +#define EXYNOS_PCIE_ELBI_RDLH_LINKUP 0x074 +#define EXYNOS_PCIE_ELBI_XMLH_LINKUP BIT(4) +#define EXYNOS_PCIE_ELBI_LTSSM_ENABLE 0x1 +#define EXYNOS_PCIE_ELBI_SLV_AWMISC 0x11c +#define EXYNOS_PCIE_ELBI_SLV_ARMISC 0x120 +#define EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE BIT(21) struct exynos_pcie { struct dw_pcie pci; @@ -105,49 +105,49 @@ static void exynos_pcie_sideband_dbi_w_mode(struct exynos_pcie *ep, bool on) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_AWMISC); + val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_ELBI_SLV_AWMISC); if (on) - val |= PCIE_ELBI_SLV_DBI_ENABLE; + val |= EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; else - val &= ~PCIE_ELBI_SLV_DBI_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_AWMISC); + val &= ~EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_ELBI_SLV_AWMISC); } static void exynos_pcie_sideband_dbi_r_mode(struct exynos_pcie *ep, bool on) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_ARMISC); + val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_ELBI_SLV_ARMISC); if (on) - val |= PCIE_ELBI_SLV_DBI_ENABLE; + val |= EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; else - val &= ~PCIE_ELBI_SLV_DBI_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_ARMISC); + val &= ~EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_ELBI_SLV_ARMISC); } static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, PCIE_CORE_RESET); - val &= ~PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, PCIE_CORE_RESET); - exynos_pcie_writel(ep->elbi_base, 0, PCIE_STICKY_RESET); - exynos_pcie_writel(ep->elbi_base, 0, PCIE_NONSTICKY_RESET); + val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_CORE_RESET); + val &= ~EXYNOS_PCIE_CORE_RESET_ENABLE; + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_CORE_RESET); + exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_STICKY_RESET); + exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_NONSTICKY_RESET); } static void exynos_pcie_deassert_core_reset(struct exynos_pcie *ep) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, PCIE_CORE_RESET); - val |= PCIE_CORE_RESET_ENABLE; + val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_CORE_RESET); + val |= EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, PCIE_CORE_RESET); - exynos_pcie_writel(ep->elbi_base, 1, PCIE_STICKY_RESET); - exynos_pcie_writel(ep->elbi_base, 1, PCIE_NONSTICKY_RESET); - exynos_pcie_writel(ep->elbi_base, 1, PCIE_APP_INIT_RESET); - exynos_pcie_writel(ep->elbi_base, 0, PCIE_APP_INIT_RESET); + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_CORE_RESET); + exynos_pcie_writel(ep->elbi_base, 1, EXYNOS_PCIE_STICKY_RESET); + exynos_pcie_writel(ep->elbi_base, 1, EXYNOS_PCIE_NONSTICKY_RESET); + exynos_pcie_writel(ep->elbi_base, 1, EXYNOS_PCIE_APP_INIT_RESET); + exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_APP_INIT_RESET); } static int exynos_pcie_start_link(struct dw_pcie *pci) @@ -155,21 +155,21 @@ static int exynos_pcie_start_link(struct dw_pcie *pci) struct exynos_pcie *ep = to_exynos_pcie(pci); u32 val; - val = exynos_pcie_readl(ep->elbi_base, PCIE_SW_WAKE); - val &= ~PCIE_BUS_EN; - exynos_pcie_writel(ep->elbi_base, val, PCIE_SW_WAKE); + val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_SW_WAKE); + val &= ~EXYNOS_PCIE_BUS_EN; + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_SW_WAKE); /* assert LTSSM enable */ - exynos_pcie_writel(ep->elbi_base, PCIE_ELBI_LTSSM_ENABLE, - PCIE_APP_LTSSM_ENABLE); + exynos_pcie_writel(ep->elbi_base, EXYNOS_PCIE_ELBI_LTSSM_ENABLE, + EXYNOS_PCIE_APP_LTSSM_ENABLE); return 0; } static void exynos_pcie_clear_irq_pulse(struct exynos_pcie *ep) { - u32 val = exynos_pcie_readl(ep->elbi_base, PCIE_IRQ_PULSE); + u32 val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_IRQ_PULSE); - exynos_pcie_writel(ep->elbi_base, val, PCIE_IRQ_PULSE); + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_IRQ_PULSE); } static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg) @@ -182,12 +182,12 @@ static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg) static void exynos_pcie_enable_irq_pulse(struct exynos_pcie *ep) { - u32 val = IRQ_INTA_ASSERT | IRQ_INTB_ASSERT | - IRQ_INTC_ASSERT | IRQ_INTD_ASSERT; + u32 val = EXYNOS_IRQ_INTA_ASSERT | EXYNOS_IRQ_INTB_ASSERT | + EXYNOS_IRQ_INTC_ASSERT | EXYNOS_IRQ_INTD_ASSERT; - exynos_pcie_writel(ep->elbi_base, val, PCIE_IRQ_EN_PULSE); - exynos_pcie_writel(ep->elbi_base, 0, PCIE_IRQ_EN_LEVEL); - exynos_pcie_writel(ep->elbi_base, 0, PCIE_IRQ_EN_SPECIAL); + exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_IRQ_EN_PULSE); + exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); + exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); } static u32 exynos_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base, @@ -244,9 +244,9 @@ static struct pci_ops exynos_pci_ops = { static int exynos_pcie_link_up(struct dw_pcie *pci) { struct exynos_pcie *ep = to_exynos_pcie(pci); - u32 val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_RDLH_LINKUP); + u32 val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_ELBI_RDLH_LINKUP); - return (val & PCIE_ELBI_XMLH_LINKUP); + return (val & EXYNOS_PCIE_ELBI_XMLH_LINKUP); } static int exynos_pcie_host_init(struct dw_pcie_rp *pp) From patchwork Tue Feb 14 12:13:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140308 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2358CC64EC7 for ; Tue, 14 Feb 2023 14:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232771AbjBNO0l (ORCPT ); Tue, 14 Feb 2023 09:26:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232850AbjBNO0U (ORCPT ); Tue, 14 Feb 2023 09:26:20 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C277F2687A for ; Tue, 14 Feb 2023 06:26:13 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230214140805epoutp03b356c8adb6a012dfd698593568018dcf~DthRrZZpw1722517225epoutp032 for ; Tue, 14 Feb 2023 14:08:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230214140805epoutp03b356c8adb6a012dfd698593568018dcf~DthRrZZpw1722517225epoutp032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383685; bh=ioxxE2VMA3x/A6W1QH3U2KDW+tzmDt8bOgi0sTzKxc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gN9lO+NLrJKU7rTknLKZxqsbbGo/EXYnTPMNf+aOnASKXvldfAtToR3xTbHIyVKTe BdgjwD24le0C/xZ+kzeB9fXYCcKGH0jCapqMysof+OnmJT+IEL0kTIrGxvXAXtXmWr ZH05CPx0Q8KdgswEWbFNpEImg3pdOF8bpIRqcl2M= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230214140804epcas5p30ff8e85dcfbdbc952799e15edf18b41c~DthQus8hM1511815118epcas5p3A; Tue, 14 Feb 2023 14:08:04 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.177]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4PGNMk6qZ0z4x9Pp; Tue, 14 Feb 2023 14:08:02 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id D4.48.06765.2C59BE36; Tue, 14 Feb 2023 23:08:02 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230214121420epcas5p3a4419059969adfb45b379f7e7741968c~Dr99u__hD2330023300epcas5p3D; Tue, 14 Feb 2023 12:14:20 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121420epsmtrp13d02d0e29655688e26ac6ba69407ec66~Dr99t3azt1788717887epsmtrp11; Tue, 14 Feb 2023 12:14:20 +0000 (GMT) X-AuditID: b6c32a4b-46dfa70000011a6d-3f-63eb95c2e239 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 16.FA.17995.C1B7BE36; Tue, 14 Feb 2023 21:14:20 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121417epsmtip10da7614a02844143b442ca0c139b0737~Dr968m25i2493724937epsmtip1R; Tue, 14 Feb 2023 12:14:17 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 04/16] PCI: samsung: Use clock bulk API to get clocks Date: Tue, 14 Feb 2023 17:43:21 +0530 Message-Id: <20230214121333.1837-5-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEJsWRmVeSWpSXmKPExsWy7bCmpu6hqa+TDVb9MLF4MG8bm8WSpgyL +UfOsVrM2jaX0eLj73MsFiu+zGS36HvxkNmioec3q8Wmx9dYLS7vmsNmcXbecTaLGef3MVm0 /GlhsWg52s5isfbIXXaLRVu/sFv837OD3eLP9A8sFr2Hay02b5rK7CDi8WbTd3aPnbPusnss 2FTqsWlVJ5vHnWt72DzenTvH7vHkynQmj81L6j02vtvB5LGo4SObR9+WVYwenzfJBfBEZdtk pCampBYppOYl56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXmAL2ppFCWmFMK FApILC5W0rezKcovLUlVyMgvLrFVSi1IySkwKdArTswtLs1L18tLLbEyNDAwMgUqTMjO+DBl FlvBRrGKzTf2MDUwbhLqYuTkkBAwkfg34wN7FyMXh5DAbkaJnq7lzBDOJ0aJq68fskA4nxkl Nuy+yw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Bi0Xu41mLzpqnMDiIebzZ9Z/fYOesuu8eC TaUem1Z1snncubaHzePduXPsHk+uTGfy2Lyk3mPjux1MHosaPrJ59G1ZxejxeZNcAE8Ul01K ak5mWWqRvl0CV8aHKbPYCjaKVWy+sYepgXGTUBcjJ4eEgInElG/rmLsYuTiEBHYwSmy40MII kZCU+HxxHROELSyx8t9zdoiiZiaJax1/wYrYBLQkGr92gXWLCLxikji8ZwaYwyxwgVHi1sFu dpAqYQFXiQlrn4LZLAKqEi/PTwCzeQUsJRZfmcYMsUJeYvWGA2A2p4CVREvrJjBbCKhm1q9V jBMY+RYwMqxilEwtKM5Nzy02LDDKSy3XK07MLS7NS9dLzs/dxAiOHS2tHYx7Vn3QO8TIxMF4 iFGCg1lJhFf46YtkId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rwXuk7GCwmkJ5akZqemFqQWwWSZ ODilGpjaeE+9Nt/ZtZOhhVU37mza/y+1MaI6J/9YSE3l/vzep5frkS4bj9CLCKe6BhG5XDeV iOW9uaUiNavWfLcx+3Z6Y5Zn24HYG4ERbBL3n83SS05zfbaroyH72cnJ/Hxz1wpVnk19l9/C serDy20lu3J7Dsx/slvLuyfzu7A1h8PChm9Hyw66HXjz6WrOkb375k1k6sy6v+3qns4Xe75c z3bLv8g1rTbQ/P7Z/zZvKsXP/VzQvSUn/8ACF76OZXe8uxbq69lvY9n4IGnZzRs5k0x1HOQT A++s2vB4+wnW0h0LHB9d6LC8EutyMzfq/flD257dU/nn6lCpbbWVIfOUQq/HtSMbI9ZyBbye 6pqX2aGlxFKckWioxVxUnAgAgak7egwDAAA= X-CMS-MailID: 20230214121420epcas5p3a4419059969adfb45b379f7e7741968c X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121420epcas5p3a4419059969adfb45b379f7e7741968c References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Adopt to clock bulk API to handle clocks. Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 46 ++++++------------------ 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index cfe384aee754..6c07d3f151be 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -54,8 +54,8 @@ struct exynos_pcie { struct dw_pcie pci; void __iomem *elbi_base; - struct clk *clk; - struct clk *bus_clk; + struct clk_bulk_data *clks; + int clk_cnt; struct phy *phy; struct regulator_bulk_data supplies[2]; }; @@ -65,30 +65,18 @@ static int exynos_pcie_init_clk_resources(struct exynos_pcie *ep) struct device *dev = ep->pci.dev; int ret; - ret = clk_prepare_enable(ep->clk); - if (ret) { - dev_err(dev, "cannot enable pcie rc clock"); + ret = devm_clk_bulk_get_all(dev, &ep->clks); + if (ret < 0) return ret; - } - ret = clk_prepare_enable(ep->bus_clk); - if (ret) { - dev_err(dev, "cannot enable pcie bus clock"); - goto err_bus_clk; - } + ep->clk_cnt = ret; - return 0; - -err_bus_clk: - clk_disable_unprepare(ep->clk); - - return ret; + return clk_bulk_prepare_enable(ep->clk_cnt, ep->clks); } static void exynos_pcie_deinit_clk_resources(struct exynos_pcie *ep) { - clk_disable_unprepare(ep->bus_clk); - clk_disable_unprepare(ep->clk); + clk_bulk_disable_unprepare(ep->clk_cnt, ep->clks); } static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg) @@ -332,17 +320,9 @@ static int exynos_pcie_probe(struct platform_device *pdev) if (IS_ERR(ep->elbi_base)) return PTR_ERR(ep->elbi_base); - ep->clk = devm_clk_get(dev, "pcie"); - if (IS_ERR(ep->clk)) { - dev_err(dev, "Failed to get pcie rc clock\n"); - return PTR_ERR(ep->clk); - } - - ep->bus_clk = devm_clk_get(dev, "pcie_bus"); - if (IS_ERR(ep->bus_clk)) { - dev_err(dev, "Failed to get pcie bus clock\n"); - return PTR_ERR(ep->bus_clk); - } + ret = exynos_pcie_init_clk_resources(ep); + if (ret < 0) + return ret; ep->supplies[0].supply = "vdd18"; ep->supplies[1].supply = "vdd10"; @@ -351,10 +331,6 @@ static int exynos_pcie_probe(struct platform_device *pdev) if (ret) return ret; - ret = exynos_pcie_init_clk_resources(ep); - if (ret) - return ret; - ret = regulator_bulk_enable(ARRAY_SIZE(ep->supplies), ep->supplies); if (ret) return ret; @@ -369,8 +345,8 @@ static int exynos_pcie_probe(struct platform_device *pdev) fail_probe: phy_exit(ep->phy); - exynos_pcie_deinit_clk_resources(ep); regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); + exynos_pcie_deinit_clk_resources(ep); return ret; } From patchwork Tue Feb 14 12:13:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140254 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFD10C61DA4 for ; Tue, 14 Feb 2023 14:10:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233328AbjBNOKV (ORCPT ); Tue, 14 Feb 2023 09:10:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233299AbjBNOKT (ORCPT ); Tue, 14 Feb 2023 09:10:19 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2942A17162 for ; Tue, 14 Feb 2023 06:09:38 -0800 (PST) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230214140840epoutp02e0155feaa7a0abfacc9592c65f5a976b~Dthy1Rt0n0874708747epoutp02a for ; Tue, 14 Feb 2023 14:08:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230214140840epoutp02e0155feaa7a0abfacc9592c65f5a976b~Dthy1Rt0n0874708747epoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383720; bh=P4o2RODWrzpC0VraKdmaU2+Wsu5NhyyDqSjcT9MD770=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=shPIJ6HfaiRYa62FMQH15a1LJXvKnpxUUElYD28PB2mXMcYRmQizTFdrdR5M3Rfi2 RuWQB1pJcAtKAY+9I7+zv4NNTwQSlgSDGFM/pRL47pXW/ilaLfnq1AAtzWABsxKgPr x6w2tT9d80Ng/h2EBpngnCF4DEJH4a30dx+NvjnQ= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20230214140839epcas5p2a33f397fd00d4b08838b0012423c31f1~DthyBc6L72728027280epcas5p2-; Tue, 14 Feb 2023 14:08:39 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.181]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4PGNNQ1VV0z4x9Pv; Tue, 14 Feb 2023 14:08:38 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 88.79.10528.6E59BE36; Tue, 14 Feb 2023 23:08:38 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230214121424epcas5p38e74b52a2d94a32b82a093c7e0a12499~Dr_BbpmeK2572325723epcas5p3B; Tue, 14 Feb 2023 12:14:24 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121424epsmtrp114f31489629691cd65e62d91d8f2a18d~Dr_Bas2u41843918439epsmtrp1E; Tue, 14 Feb 2023 12:14:24 +0000 (GMT) X-AuditID: b6c32a49-e75fa70000012920-47-63eb95e62dff Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 98.FA.17995.02B7BE36; Tue, 14 Feb 2023 21:14:24 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121421epsmtip11cc3c41c0c08218d174e751e42f73cba~Dr9_oUh8v2436024360epsmtip1j; Tue, 14 Feb 2023 12:14:21 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 05/16] dt-bindings: PCI: Rename the term elbi to appl Date: Tue, 14 Feb 2023 17:43:22 +0530 Message-Id: <20230214121333.1837-6-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAJsWRmVeSWpSXmKPExsWy7bCmuu6zqa+TDf4cY7d4MG8bm8WSpgyL +UfOsVrM2jaX0eLj73MsFiu+zGS36HvxkNmioec3q8Wmx9dYLS7vmsNmcXbecTaLGef3MVm0 /GlhsWg52s5isfbIXXaLRVu/sF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szufu27EV7PjKnPVlR7JJb1LWx7vz+jjVjn7ed3a7s33WL3jt7rK/s6OzHsbKiyw jM9ZiaU4I9FQi7moOBEAJbfJ/QsDAAA= X-CMS-MailID: 20230214121424epcas5p38e74b52a2d94a32b82a093c7e0a12499 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121424epcas5p38e74b52a2d94a32b82a093c7e0a12499 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org DT uses the name elbi in reg-names for application logic registers which is a wrong nomenclature. This patch fixes the same. This commit shouldn't be applied without changes "arm64: dts: Rename the term elbi to appl" and "PCI: samsung: Rename the term elbi to appl" Signed-off-by: Shradha Todi --- Documentation/devicetree/bindings/pci/samsung,pcie.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/samsung,pcie.yaml b/Documentation/devicetree/bindings/pci/samsung,pcie.yaml index 6cd36d9ccba0..9c58c4d1f6a7 100644 --- a/Documentation/devicetree/bindings/pci/samsung,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/samsung,pcie.yaml @@ -25,13 +25,13 @@ properties: reg: items: - description: Data Bus Interface (DBI) registers. - - description: External Local Bus interface (ELBI) registers. + - description: Controller's application logic registers. - description: PCIe configuration space region. reg-names: items: - const: dbi - - const: elbi + - const: appl - const: config interrupts: From patchwork Tue Feb 14 12:13:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140306 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F79AC61DA4 for ; Tue, 14 Feb 2023 14:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233136AbjBNO0Y (ORCPT ); Tue, 14 Feb 2023 09:26:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232846AbjBNO0P (ORCPT ); Tue, 14 Feb 2023 09:26:15 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493EF2B29B for ; Tue, 14 Feb 2023 06:26:10 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230214140901epoutp0213e33ce8b05554af2ba11ce7d0c11064~DtiGUrgMs0915609156epoutp02R for ; Tue, 14 Feb 2023 14:09:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230214140901epoutp0213e33ce8b05554af2ba11ce7d0c11064~DtiGUrgMs0915609156epoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383741; bh=FtyaHDtSUU/5LX0AKMY1M0E99WuJ7+NX0KOgQ1B829c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gDhgh2+11b/mU2GhbdR1pRYt/YIbxHWWVX91SQfE0uq8KcfacKoAvFFzyn9E1GDZd JXkibV/l+PFNkycOD/HQCndG4rX9NKXNrDsFblfpuw2E4czv64uwLJSGj9SdChD9y0 oeo8xVMmGvjEBHeLPmpq4OU/U+aYhLGOi9FOmyoI= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230214140900epcas5p3e52df60e235c903ff8bdb82f43ee7f2e~DtiFWQBo_2972429724epcas5p3g; Tue, 14 Feb 2023 14:09:00 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.175]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4PGNNp6s2Rz4x9Pp; Tue, 14 Feb 2023 14:08:58 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 55.68.06765.AF59BE36; Tue, 14 Feb 2023 23:08:58 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230214121428epcas5p3d91e877e62a78008d2b0d6066efea059~Dr_FPX-FA2572325723epcas5p3K; Tue, 14 Feb 2023 12:14:28 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121428epsmtrp1c101c1be933254e023baebcdba5d17d8~Dr_FOZZP_1843918439epsmtrp1J; Tue, 14 Feb 2023 12:14:28 +0000 (GMT) X-AuditID: b6c32a4b-20fff70000011a6d-a8-63eb95fa01e7 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 17.8E.05839.42B7BE36; Tue, 14 Feb 2023 21:14:28 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121425epsmtip1837bf30f8b9641c1a91e0ec137968c60~Dr_CVAQ6I1886618866epsmtip1h; Tue, 14 Feb 2023 12:14:25 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 06/16] arm64: dts: exynos: Rename the term elbi to appl Date: Tue, 14 Feb 2023 17:43:23 +0530 Message-Id: <20230214121333.1837-7-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAJsWRmVeSWpSXmKPExsWy7bCmpu6vqa+TDfbvMLV4MG8bm8WSpgyL +UfOsVrM2jaX0eLj73MsFiu+zGS36HvxkNmioec3q8Wmx9dYLS7vmsNmcXbecTaLGef3MVm0 /GlhsWg52s5isfbIXXaLRVu/sFv837OD3eLP9A8sFr2Hay02b5rK7CDi8WbTd3aPnbPusnss 2FTqsWlVJ5vHnWt72DzenTvH7vHkynQmj81L6j02vtvB5LGo4SObR9+WVYwenzfJBfBEZdtk pCampBYppOYl56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXmAL2ppFCWmFMK FApILC5W0rezKcovLUlVyMgvLrFVSi1IySkwKdArTswtLs1L18tLLbEyNDAwMgUqTMjO+Pb3 D3PBT/aKy2/uszUwHmXrYuTkkBAwkdhweD2QzcUhJLCbUeLSpFfsEM4nRon5n1ZAZb4xStxf /pwZpuXQ+U6oqr2MEj86F0A5rUwSq47tZwWpYhPQkmj82sUMkhARuMUk8fLzQ7AqZoFTjBIH XuwFcjg4hAXcJY4cVgJpYBFQlbjXuhdsBa+ApcTGlldQF8pLrN5wACzOKWAl0dK6CeqMGxwS H07wgIyREHCRmD3VHSIsLPHq+BZ2CFtK4mV/G5SdLrFy8wyo1hyJb5uXMEHY9hIHrsxhARnD LKApsX6XPkRYVmLqqXVgJcwCfBK9v59AlfNK7JgHYytLfPm7hwXClpSYd+wyK4TtIfFl3mZG SJj0MkpsvXKIdQKj3CyEFQsYGVcxSqYWFOempxabFhjnpZbDYy05P3c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zUcr3ixNzi0rx0veT83E2M4MjR0tzBuH3VB71DjEwc jIcYJTiYlUR4hZ++SBbiTUmsrEotyo8vKs1JLT7EKM3BoiTOe6HrZLyQQHpiSWp2ampBahFM lomDU6qBSdeVaba53n97AYtUm+ls4vabpum/j7qfMnlZy91ZvvMnTFnyaFLaZ2eHRW9VXA/9 0tNrl1K+9GJW1WItsQ88LyTufY/RDNFT3zlXdGach/F6C77vuz037G3P5qp83nB7mYXGtA+t Wq/TeRZGp0/WcmowWvZBgFna1PpB/7/qVVKTn8Q0LzxwbfrVs+6P+m/O47Q16OOz0liY7r30 2YGjduahJjsYZS7Pj2w4l26/K6DDcs3i2lSx6B2vj+mdnlh2W/Ng/Zfr8z7UOX3LCpd549hq /c//UFXY8knnhJqaGapX3TqUW3o4ROyl+MneLTfSWh8d7f6xcMbkXXz7X2/o0Hv1O3BC0aea M6xPT7pN+q3EUpyRaKjFXFScCAAXo6RbCwMAAA== X-CMS-MailID: 20230214121428epcas5p3d91e877e62a78008d2b0d6066efea059 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121428epcas5p3d91e877e62a78008d2b0d6066efea059 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org DT uses the name elbi in reg-names for application logic registers which is a wrong nomenclature. This patch fixes the same. This commit shouldn't be applied without changes "dt-bindings: PCI: Rename the term elbi to appl" and "PCI: samsung: Rename the term elbi to appl" Signed-off-by: Shradha Todi --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 5519a80576c5..96b216099594 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -1944,7 +1944,7 @@ compatible = "samsung,exynos5433-pcie"; reg = <0x15700000 0x1000>, <0x156b0000 0x1000>, <0x0c000000 0x1000>; - reg-names = "dbi", "elbi", "config"; + reg-names = "dbi", "appl", "config"; #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; From patchwork Tue Feb 14 12:13:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140284 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A66EC05027 for ; Tue, 14 Feb 2023 14:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjBNOV3 (ORCPT ); Tue, 14 Feb 2023 09:21:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjBNOVY (ORCPT ); Tue, 14 Feb 2023 09:21:24 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211EC2A9BA for ; Tue, 14 Feb 2023 06:21:09 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230214140947epoutp0266fbf1c3e9534f9d0e22e45d13c05e21~DtixOlo7m0915609156epoutp02Z for ; Tue, 14 Feb 2023 14:09:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230214140947epoutp0266fbf1c3e9534f9d0e22e45d13c05e21~DtixOlo7m0915609156epoutp02Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383787; bh=4fhan0Tw+cznyXrr7NgUEAhifEgTnLcEgNjy+Wty2Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=olDVb81Nst6/wevqa91KPXlhz4A76c3IZfQBCHbOFp8hVqEF3sqoo1bL/JL+/qnjy UmcOb6ahKWhIKJIUYuB8zHM0EXJ0WCYhIwOi6WYIw41VaL5urM+hH+/rWGvX/g0iFw 7K3G1wvf7d5svqTbgv3MrxmvRjJ6x5qjxBxxloX4= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230214140946epcas5p486c00e47e91f42ab64c5e4790e25c773~DtiwDhMJF0632406324epcas5p4S; Tue, 14 Feb 2023 14:09:46 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.178]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4PGNPj28DXz4x9Pr; Tue, 14 Feb 2023 14:09:45 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 05.78.06765.9269BE36; Tue, 14 Feb 2023 23:09:45 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230214121432epcas5p27248b4dafdec64b0172c69f7909d7a64~Dr_Iz7q-k0795707957epcas5p2u; Tue, 14 Feb 2023 12:14:32 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121432epsmtrp2aaeff2e6d8ba1fd91cf68af8eee5f102~Dr_Iy7bEK1888418884epsmtrp2h; Tue, 14 Feb 2023 12:14:32 +0000 (GMT) X-AuditID: b6c32a4b-20fff70000011a6d-fa-63eb96296114 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 4D.FA.17995.82B7BE36; Tue, 14 Feb 2023 21:14:32 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121429epsmtip1b719ca6d898005b96417aba8e73dc392~Dr_GIkwkM2553425534epsmtip1D; Tue, 14 Feb 2023 12:14:29 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 07/16] PCI: samsung: Rename the term elbi to appl Date: Tue, 14 Feb 2023 17:43:24 +0530 Message-Id: <20230214121333.1837-8-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMJsWRmVeSWpSXmKPExsWy7bCmpq7mtNfJBpPf81g8mLeNzWJJU4bF /CPnWC1mbZvLaPHx9zkWixVfZrJb9L14yGzR0POb1WLT42usFpd3zWGzODvvOJvFjPP7mCxa /rSwWLQcbWexWHvkLrvFoq1f2C3+79nBbvFn+gcWi97DtRabN01ldhDxeLPpO7vHzll32T0W bCr12LSqk83jzrU9bB7vzp1j93hyZTqTx+Yl9R4b3+1g8ljU8JHNo2/LKkaPz5vkAniism0y UhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJzgN5UUihLzCkF CgUkFhcr6dvZFOWXlqQqZOQXl9gqpRak5BSYFOgVJ+YWl+al6+WlllgZGhgYmQIV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13nM1ixvl9TBYt f1pYLFqOtrNYrD1yl91i0dYv7Bb/9+xgt/gz/QOLRe/hWovNm6YyO4h4vNn0nd1j56y77B4L NpV6bFrVyeZx59oeNo93586xezy5Mp3JY/OSeo+N73YweSxq+Mjm0bdlFaPH501yATxRXDYp qTmZZalF+nYJXBmTXi9iLVhuXbF19hmmBsa9xl2MnBwSAiYSm/umsncxcnEICexglJjYcIYV IiEp8fniOiYIW1hi5b/n7CC2kEAzk8SyM7UgNpuAlkTj1y5mkGYRgVdMEof3zABzmAUuMErc OtgN1iEs4Cix99N5NhCbRUBVYsrf/WAbeAUsJdbtfswIsUFeYvWGA8wgNqeAlURL6yZmiG2W ErN+rWKcwMi3gJFhFaNkakFxbnpusWGBUV5quV5xYm5xaV66XnJ+7iZGcORoae1g3LPqg94h RiYOxkOMEhzMSiK8wk9fJAvxpiRWVqUW5ccXleakFh9ilOZgURLnvdB1Ml5IID2xJDU7NbUg tQgmy8TBKdXAxHht/wWJ1fuuKN98u/bG7rrqyr2/vr340nB9/oGm/1fit9SlLgpXU2CZ66l2 cueE8CCt9Sy6ks9YqkRZdmf0frV7MyHz7+7YdqePEx0Dbu428d33YeWdByf2Cs2ebG0Wb+g/ WUrM+GaXSOeTQun0494XWcze/Q1cGD31lubTxwcVM7e+OT/1plWN+PqzP25v0W45+HDJqc3n 77vFXTz+aaWI7DHJ26e03f6GHJtV1RJbJSszS+iE2/93bofnP7vy9MilnVzNHFXpB7WXix/s q78XKv8tPP3xMaGGPHuO9ryJymvk3n8XvhYTkrexJPPcT50PJjrSTAavru6NqT98wY29/fuH sGmdH1e03C5zOmGpxFKckWioxVxUnAgAhP21vAsDAAA= X-CMS-MailID: 20230214121432epcas5p27248b4dafdec64b0172c69f7909d7a64 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121432epcas5p27248b4dafdec64b0172c69f7909d7a64 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The driver uses the name elbi for application logic registers which is a wrong nomenclature. This patch fixes the same. This commit shouldn't be applied without changes "arm64: dts: exynos: Rename the term elbi to appl" and "dt-bindings: PCI: Rename the term elbi to appl" Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 80 ++++++++++++------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index 6c07d3f151be..d5adf1017a05 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -25,7 +25,7 @@ #define to_exynos_pcie(x) dev_get_drvdata((x)->dev) -/* PCIe ELBI registers */ +/* PCIe APPL registers */ #define EXYNOS_PCIE_IRQ_PULSE 0x000 #define EXYNOS_IRQ_INTA_ASSERT BIT(0) #define EXYNOS_IRQ_INTB_ASSERT BIT(2) @@ -44,16 +44,16 @@ #define EXYNOS_PCIE_NONSTICKY_RESET 0x024 #define EXYNOS_PCIE_APP_INIT_RESET 0x028 #define EXYNOS_PCIE_APP_LTSSM_ENABLE 0x02c -#define EXYNOS_PCIE_ELBI_RDLH_LINKUP 0x074 -#define EXYNOS_PCIE_ELBI_XMLH_LINKUP BIT(4) -#define EXYNOS_PCIE_ELBI_LTSSM_ENABLE 0x1 -#define EXYNOS_PCIE_ELBI_SLV_AWMISC 0x11c -#define EXYNOS_PCIE_ELBI_SLV_ARMISC 0x120 -#define EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE BIT(21) +#define EXYNOS_PCIE_APPL_RDLH_LINKUP 0x074 +#define EXYNOS_PCIE_APPL_XMLH_LINKUP BIT(4) +#define EXYNOS_PCIE_APPL_LTSSM_ENABLE 0x1 +#define EXYNOS_PCIE_APPL_SLV_AWMISC 0x11c +#define EXYNOS_PCIE_APPL_SLV_ARMISC 0x120 +#define EXYNOS_PCIE_APPL_SLV_DBI_ENABLE BIT(21) struct exynos_pcie { struct dw_pcie pci; - void __iomem *elbi_base; + void __iomem *appl_base; struct clk_bulk_data *clks; int clk_cnt; struct phy *phy; @@ -93,49 +93,49 @@ static void exynos_pcie_sideband_dbi_w_mode(struct exynos_pcie *ep, bool on) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_ELBI_SLV_AWMISC); + val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_APPL_SLV_AWMISC); if (on) - val |= EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; + val |= EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; else - val &= ~EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_ELBI_SLV_AWMISC); + val &= ~EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_APPL_SLV_AWMISC); } static void exynos_pcie_sideband_dbi_r_mode(struct exynos_pcie *ep, bool on) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_ELBI_SLV_ARMISC); + val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_APPL_SLV_ARMISC); if (on) - val |= EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; + val |= EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; else - val &= ~EXYNOS_PCIE_ELBI_SLV_DBI_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_ELBI_SLV_ARMISC); + val &= ~EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_APPL_SLV_ARMISC); } static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_CORE_RESET); + val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_CORE_RESET); val &= ~EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_CORE_RESET); - exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_STICKY_RESET); - exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_NONSTICKY_RESET); + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_CORE_RESET); + exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_STICKY_RESET); + exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_NONSTICKY_RESET); } static void exynos_pcie_deassert_core_reset(struct exynos_pcie *ep) { u32 val; - val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_CORE_RESET); + val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_CORE_RESET); val |= EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_CORE_RESET); - exynos_pcie_writel(ep->elbi_base, 1, EXYNOS_PCIE_STICKY_RESET); - exynos_pcie_writel(ep->elbi_base, 1, EXYNOS_PCIE_NONSTICKY_RESET); - exynos_pcie_writel(ep->elbi_base, 1, EXYNOS_PCIE_APP_INIT_RESET); - exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_APP_INIT_RESET); + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_CORE_RESET); + exynos_pcie_writel(ep->appl_base, 1, EXYNOS_PCIE_STICKY_RESET); + exynos_pcie_writel(ep->appl_base, 1, EXYNOS_PCIE_NONSTICKY_RESET); + exynos_pcie_writel(ep->appl_base, 1, EXYNOS_PCIE_APP_INIT_RESET); + exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_APP_INIT_RESET); } static int exynos_pcie_start_link(struct dw_pcie *pci) @@ -143,21 +143,21 @@ static int exynos_pcie_start_link(struct dw_pcie *pci) struct exynos_pcie *ep = to_exynos_pcie(pci); u32 val; - val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_SW_WAKE); + val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_SW_WAKE); val &= ~EXYNOS_PCIE_BUS_EN; - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_SW_WAKE); + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_SW_WAKE); /* assert LTSSM enable */ - exynos_pcie_writel(ep->elbi_base, EXYNOS_PCIE_ELBI_LTSSM_ENABLE, + exynos_pcie_writel(ep->appl_base, EXYNOS_PCIE_APPL_LTSSM_ENABLE, EXYNOS_PCIE_APP_LTSSM_ENABLE); return 0; } static void exynos_pcie_clear_irq_pulse(struct exynos_pcie *ep) { - u32 val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_IRQ_PULSE); + u32 val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_IRQ_PULSE); - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_IRQ_PULSE); + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_IRQ_PULSE); } static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg) @@ -173,9 +173,9 @@ static void exynos_pcie_enable_irq_pulse(struct exynos_pcie *ep) u32 val = EXYNOS_IRQ_INTA_ASSERT | EXYNOS_IRQ_INTB_ASSERT | EXYNOS_IRQ_INTC_ASSERT | EXYNOS_IRQ_INTD_ASSERT; - exynos_pcie_writel(ep->elbi_base, val, EXYNOS_PCIE_IRQ_EN_PULSE); - exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); - exynos_pcie_writel(ep->elbi_base, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); + exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_IRQ_EN_PULSE); + exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); + exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); } static u32 exynos_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base, @@ -232,9 +232,9 @@ static struct pci_ops exynos_pci_ops = { static int exynos_pcie_link_up(struct dw_pcie *pci) { struct exynos_pcie *ep = to_exynos_pcie(pci); - u32 val = exynos_pcie_readl(ep->elbi_base, EXYNOS_PCIE_ELBI_RDLH_LINKUP); + u32 val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_APPL_RDLH_LINKUP); - return (val & EXYNOS_PCIE_ELBI_XMLH_LINKUP); + return (val & EXYNOS_PCIE_APPL_XMLH_LINKUP); } static int exynos_pcie_host_init(struct dw_pcie_rp *pp) @@ -315,10 +315,10 @@ static int exynos_pcie_probe(struct platform_device *pdev) if (IS_ERR(ep->phy)) return PTR_ERR(ep->phy); - /* External Local Bus interface (ELBI) registers */ - ep->elbi_base = devm_platform_ioremap_resource_byname(pdev, "elbi"); - if (IS_ERR(ep->elbi_base)) - return PTR_ERR(ep->elbi_base); + /* Application logic registers */ + ep->appl_base = devm_platform_ioremap_resource_byname(pdev, "appl"); + if (IS_ERR(ep->appl_base)) + return PTR_ERR(ep->appl_base); ret = exynos_pcie_init_clk_resources(ep); if (ret < 0) From patchwork Tue Feb 14 12:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140285 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2DC0C61DA4 for ; Tue, 14 Feb 2023 14:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229510AbjBNOVa (ORCPT ); Tue, 14 Feb 2023 09:21:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjBNOVY (ORCPT ); Tue, 14 Feb 2023 09:21:24 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212822A9BC for ; Tue, 14 Feb 2023 06:21:09 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230214141025epoutp026cdae8fbc34c5e2a3fb9c4f838973cbf~DtjUtWSGj1101811018epoutp02B for ; Tue, 14 Feb 2023 14:10:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230214141025epoutp026cdae8fbc34c5e2a3fb9c4f838973cbf~DtjUtWSGj1101811018epoutp02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383825; bh=MOcrJcXHly7wo4D9UZYY9r2SCH3BsrRfo+jz2eSLh0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mke6+YTv1minzkSgcQPjMbnvsZ6UtqgZK8HRLKoo//vndtrOsvJw+NGl3GsGNoxDK EE5MPjWoSdqWWkzcg9UwPEX2PsaRIDkskC5UMsXsudcg7MNnc6H5yBgxE7yrpTr939 ucB5BU4AVZBhf3BP05BlL/+Z5UwS1p8TGzFIgvA8= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230214141025epcas5p34a819401fc05238b71370c6a057fc7aa~DtjUFutOG2787227872epcas5p3b; Tue, 14 Feb 2023 14:10:25 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.181]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4PGNQR73F0z4x9Pv; Tue, 14 Feb 2023 14:10:23 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 7D.88.06765.F469BE36; Tue, 14 Feb 2023 23:10:23 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230214121436epcas5p1641de02220bea5edb23bc875b6311270~Dr_Mddck31714317143epcas5p1R; Tue, 14 Feb 2023 12:14:36 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121436epsmtrp12d6ddddf7dc275adc40b127820b53838~Dr_Mca57B1788717887epsmtrp1B; Tue, 14 Feb 2023 12:14:36 +0000 (GMT) X-AuditID: b6c32a4b-46dfa70000011a6d-4d-63eb964f1ee7 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5A.8E.05839.C2B7BE36; Tue, 14 Feb 2023 21:14:36 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121433epsmtip1a3fddefe573546349aa6f900e47fff4f~Dr_Jq6lkH2436024360epsmtip1m; Tue, 14 Feb 2023 12:14:33 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 08/16] PCI: samsung: Rename exynos_pcie to samsung_pcie Date: Tue, 14 Feb 2023 17:43:25 +0530 Message-Id: <20230214121333.1837-9-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-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 C3Z+27mx/d/e1xNizZ8u92yfmLL5ScvteY1qD42XmzfvEw5w/XMpLtnUyG3PdfFT8y+JHD74 +4vdlDq+nbzXjp3zMHq3dZVpRtR/n9ylnx455ax4N+XP/6rbGk6Bb7892NmpwCfz/+AE30km odVfGg6VBBX15OslGx9YZ/t7yYen1q/OijxL8b6ULbGjU/fyGYnOFQcPKVpsjvNY29gdzpS1 SPJmwL/YZfcOnPmz2tpey1/XYLn7Hy5W1atXbjJwflvx/FSUtdqj7v4t4retWDc6Wpo4CF04 VxfN4XJHTomlOCPRUIu5qDgRAHhZzFAIAwAA X-CMS-MailID: 20230214121436epcas5p1641de02220bea5edb23bc875b6311270 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121436epcas5p1641de02220bea5edb23bc875b6311270 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The platform specific structure being used is named exynos_pcie. Changing it to samsung_pcie for making it generic. Suggested-by: Pankaj Dubey Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 190 +++++++++++------------ 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index d5adf1017a05..be0177fcd763 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -23,7 +23,7 @@ #include "pcie-designware.h" -#define to_exynos_pcie(x) dev_get_drvdata((x)->dev) +#define to_samsung_pcie(x) dev_get_drvdata((x)->dev) /* PCIe APPL registers */ #define EXYNOS_PCIE_IRQ_PULSE 0x000 @@ -51,7 +51,7 @@ #define EXYNOS_PCIE_APPL_SLV_ARMISC 0x120 #define EXYNOS_PCIE_APPL_SLV_DBI_ENABLE BIT(21) -struct exynos_pcie { +struct samsung_pcie { struct dw_pcie pci; void __iomem *appl_base; struct clk_bulk_data *clks; @@ -60,23 +60,23 @@ struct exynos_pcie { struct regulator_bulk_data supplies[2]; }; -static int exynos_pcie_init_clk_resources(struct exynos_pcie *ep) +static int exynos_pcie_init_clk_resources(struct samsung_pcie *sp) { - struct device *dev = ep->pci.dev; + struct device *dev = sp->pci.dev; int ret; - ret = devm_clk_bulk_get_all(dev, &ep->clks); + ret = devm_clk_bulk_get_all(dev, &sp->clks); if (ret < 0) return ret; - ep->clk_cnt = ret; + sp->clk_cnt = ret; - return clk_bulk_prepare_enable(ep->clk_cnt, ep->clks); + return clk_bulk_prepare_enable(sp->clk_cnt, sp->clks); } -static void exynos_pcie_deinit_clk_resources(struct exynos_pcie *ep) +static void exynos_pcie_deinit_clk_resources(struct samsung_pcie *sp) { - clk_bulk_disable_unprepare(ep->clk_cnt, ep->clks); + clk_bulk_disable_unprepare(sp->clk_cnt, sp->clks); } static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg) @@ -89,115 +89,115 @@ static u32 exynos_pcie_readl(void __iomem *base, u32 reg) return readl(base + reg); } -static void exynos_pcie_sideband_dbi_w_mode(struct exynos_pcie *ep, bool on) +static void exynos_pcie_sideband_dbi_w_mode(struct samsung_pcie *sp, bool on) { u32 val; - val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_APPL_SLV_AWMISC); + val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_APPL_SLV_AWMISC); if (on) val |= EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; else val &= ~EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_APPL_SLV_AWMISC); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_APPL_SLV_AWMISC); } -static void exynos_pcie_sideband_dbi_r_mode(struct exynos_pcie *ep, bool on) +static void exynos_pcie_sideband_dbi_r_mode(struct samsung_pcie *sp, bool on) { u32 val; - val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_APPL_SLV_ARMISC); + val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_APPL_SLV_ARMISC); if (on) val |= EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; else val &= ~EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_APPL_SLV_ARMISC); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_APPL_SLV_ARMISC); } -static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep) +static void exynos_pcie_assert_core_reset(struct samsung_pcie *sp) { u32 val; - val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_CORE_RESET); + val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_CORE_RESET); val &= ~EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_CORE_RESET); - exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_STICKY_RESET); - exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_NONSTICKY_RESET); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_CORE_RESET); + exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_STICKY_RESET); + exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_NONSTICKY_RESET); } -static void exynos_pcie_deassert_core_reset(struct exynos_pcie *ep) +static void exynos_pcie_deassert_core_reset(struct samsung_pcie *sp) { u32 val; - val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_CORE_RESET); + val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_CORE_RESET); val |= EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_CORE_RESET); - exynos_pcie_writel(ep->appl_base, 1, EXYNOS_PCIE_STICKY_RESET); - exynos_pcie_writel(ep->appl_base, 1, EXYNOS_PCIE_NONSTICKY_RESET); - exynos_pcie_writel(ep->appl_base, 1, EXYNOS_PCIE_APP_INIT_RESET); - exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_APP_INIT_RESET); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_CORE_RESET); + exynos_pcie_writel(sp->appl_base, 1, EXYNOS_PCIE_STICKY_RESET); + exynos_pcie_writel(sp->appl_base, 1, EXYNOS_PCIE_NONSTICKY_RESET); + exynos_pcie_writel(sp->appl_base, 1, EXYNOS_PCIE_APP_INIT_RESET); + exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_APP_INIT_RESET); } static int exynos_pcie_start_link(struct dw_pcie *pci) { - struct exynos_pcie *ep = to_exynos_pcie(pci); + struct samsung_pcie *sp = to_samsung_pcie(pci); u32 val; - val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_SW_WAKE); + val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_SW_WAKE); val &= ~EXYNOS_PCIE_BUS_EN; - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_SW_WAKE); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_SW_WAKE); /* assert LTSSM enable */ - exynos_pcie_writel(ep->appl_base, EXYNOS_PCIE_APPL_LTSSM_ENABLE, + exynos_pcie_writel(sp->appl_base, EXYNOS_PCIE_APPL_LTSSM_ENABLE, EXYNOS_PCIE_APP_LTSSM_ENABLE); return 0; } -static void exynos_pcie_clear_irq_pulse(struct exynos_pcie *ep) +static void exynos_pcie_clear_irq_pulse(struct samsung_pcie *sp) { - u32 val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_IRQ_PULSE); + u32 val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_IRQ_PULSE); - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_IRQ_PULSE); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_IRQ_PULSE); } static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg) { - struct exynos_pcie *ep = arg; + struct samsung_pcie *sp = arg; - exynos_pcie_clear_irq_pulse(ep); + exynos_pcie_clear_irq_pulse(sp); return IRQ_HANDLED; } -static void exynos_pcie_enable_irq_pulse(struct exynos_pcie *ep) +static void exynos_pcie_enable_irq_pulse(struct samsung_pcie *sp) { u32 val = EXYNOS_IRQ_INTA_ASSERT | EXYNOS_IRQ_INTB_ASSERT | EXYNOS_IRQ_INTC_ASSERT | EXYNOS_IRQ_INTD_ASSERT; - exynos_pcie_writel(ep->appl_base, val, EXYNOS_PCIE_IRQ_EN_PULSE); - exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); - exynos_pcie_writel(ep->appl_base, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); + exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_IRQ_EN_PULSE); + exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); + exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); } static u32 exynos_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base, u32 reg, size_t size) { - struct exynos_pcie *ep = to_exynos_pcie(pci); + struct samsung_pcie *sp = to_samsung_pcie(pci); u32 val; - exynos_pcie_sideband_dbi_r_mode(ep, true); + exynos_pcie_sideband_dbi_r_mode(sp, true); dw_pcie_read(base + reg, size, &val); - exynos_pcie_sideband_dbi_r_mode(ep, false); + exynos_pcie_sideband_dbi_r_mode(sp, false); return val; } static void exynos_pcie_write_dbi(struct dw_pcie *pci, void __iomem *base, u32 reg, size_t size, u32 val) { - struct exynos_pcie *ep = to_exynos_pcie(pci); + struct samsung_pcie *sp = to_samsung_pcie(pci); - exynos_pcie_sideband_dbi_w_mode(ep, true); + exynos_pcie_sideband_dbi_w_mode(sp, true); dw_pcie_write(base + reg, size, val); - exynos_pcie_sideband_dbi_w_mode(ep, false); + exynos_pcie_sideband_dbi_w_mode(sp, false); } static int exynos_pcie_rd_own_conf(struct pci_bus *bus, unsigned int devfn, @@ -231,8 +231,8 @@ static struct pci_ops exynos_pci_ops = { static int exynos_pcie_link_up(struct dw_pcie *pci) { - struct exynos_pcie *ep = to_exynos_pcie(pci); - u32 val = exynos_pcie_readl(ep->appl_base, EXYNOS_PCIE_APPL_RDLH_LINKUP); + struct samsung_pcie *sp = to_samsung_pcie(pci); + u32 val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_APPL_RDLH_LINKUP); return (val & EXYNOS_PCIE_APPL_XMLH_LINKUP); } @@ -240,17 +240,17 @@ static int exynos_pcie_link_up(struct dw_pcie *pci) static int exynos_pcie_host_init(struct dw_pcie_rp *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); - struct exynos_pcie *ep = to_exynos_pcie(pci); + struct samsung_pcie *sp = to_samsung_pcie(pci); pp->bridge->ops = &exynos_pci_ops; - exynos_pcie_assert_core_reset(ep); + exynos_pcie_assert_core_reset(sp); - phy_init(ep->phy); - phy_power_on(ep->phy); + phy_init(sp->phy); + phy_power_on(sp->phy); - exynos_pcie_deassert_core_reset(ep); - exynos_pcie_enable_irq_pulse(ep); + exynos_pcie_deassert_core_reset(sp); + exynos_pcie_enable_irq_pulse(sp); return 0; } @@ -259,10 +259,10 @@ static const struct dw_pcie_host_ops exynos_pcie_host_ops = { .host_init = exynos_pcie_host_init, }; -static int exynos_add_pcie_port(struct exynos_pcie *ep, +static int exynos_add_pcie_port(struct samsung_pcie *sp, struct platform_device *pdev) { - struct dw_pcie *pci = &ep->pci; + struct dw_pcie *pci = &sp->pci; struct dw_pcie_rp *pp = &pci->pp; struct device *dev = &pdev->dev; int ret; @@ -272,7 +272,7 @@ static int exynos_add_pcie_port(struct exynos_pcie *ep, return pp->irq; ret = devm_request_irq(dev, pp->irq, exynos_pcie_irq_handler, - IRQF_SHARED, "exynos-pcie", ep); + IRQF_SHARED, "exynos-pcie", sp); if (ret) { dev_err(dev, "failed to request irq\n"); return ret; @@ -300,95 +300,95 @@ static const struct dw_pcie_ops dw_pcie_ops = { static int exynos_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct exynos_pcie *ep; + struct samsung_pcie *sp; struct device_node *np = dev->of_node; int ret; - ep = devm_kzalloc(dev, sizeof(*ep), GFP_KERNEL); - if (!ep) + sp = devm_kzalloc(dev, sizeof(*sp), GFP_KERNEL); + if (!sp) return -ENOMEM; - ep->pci.dev = dev; - ep->pci.ops = &dw_pcie_ops; + sp->pci.dev = dev; + sp->pci.ops = &dw_pcie_ops; - ep->phy = devm_of_phy_get(dev, np, NULL); - if (IS_ERR(ep->phy)) - return PTR_ERR(ep->phy); + sp->phy = devm_of_phy_get(dev, np, NULL); + if (IS_ERR(sp->phy)) + return PTR_ERR(sp->phy); /* Application logic registers */ - ep->appl_base = devm_platform_ioremap_resource_byname(pdev, "appl"); - if (IS_ERR(ep->appl_base)) - return PTR_ERR(ep->appl_base); + sp->appl_base = devm_platform_ioremap_resource_byname(pdev, "appl"); + if (IS_ERR(sp->appl_base)) + return PTR_ERR(sp->appl_base); - ret = exynos_pcie_init_clk_resources(ep); + ret = exynos_pcie_init_clk_resources(sp); if (ret < 0) return ret; - ep->supplies[0].supply = "vdd18"; - ep->supplies[1].supply = "vdd10"; - ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ep->supplies), - ep->supplies); + sp->supplies[0].supply = "vdd18"; + sp->supplies[1].supply = "vdd10"; + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(sp->supplies), + sp->supplies); if (ret) return ret; - ret = regulator_bulk_enable(ARRAY_SIZE(ep->supplies), ep->supplies); + ret = regulator_bulk_enable(ARRAY_SIZE(sp->supplies), sp->supplies); if (ret) return ret; - platform_set_drvdata(pdev, ep); + platform_set_drvdata(pdev, sp); - ret = exynos_add_pcie_port(ep, pdev); + ret = exynos_add_pcie_port(sp, pdev); if (ret < 0) goto fail_probe; return 0; fail_probe: - phy_exit(ep->phy); - regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); - exynos_pcie_deinit_clk_resources(ep); + phy_exit(sp->phy); + regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); + exynos_pcie_deinit_clk_resources(sp); return ret; } static int __exit exynos_pcie_remove(struct platform_device *pdev) { - struct exynos_pcie *ep = platform_get_drvdata(pdev); + struct samsung_pcie *sp = platform_get_drvdata(pdev); - dw_pcie_host_deinit(&ep->pci.pp); - exynos_pcie_assert_core_reset(ep); - phy_power_off(ep->phy); - phy_exit(ep->phy); - exynos_pcie_deinit_clk_resources(ep); - regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); + dw_pcie_host_deinit(&sp->pci.pp); + exynos_pcie_assert_core_reset(sp); + phy_power_off(sp->phy); + phy_exit(sp->phy); + exynos_pcie_deinit_clk_resources(sp); + regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); return 0; } static int exynos_pcie_suspend_noirq(struct device *dev) { - struct exynos_pcie *ep = dev_get_drvdata(dev); + struct samsung_pcie *sp = dev_get_drvdata(dev); - exynos_pcie_assert_core_reset(ep); - phy_power_off(ep->phy); - phy_exit(ep->phy); - regulator_bulk_disable(ARRAY_SIZE(ep->supplies), ep->supplies); + exynos_pcie_assert_core_reset(sp); + phy_power_off(sp->phy); + phy_exit(sp->phy); + regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); return 0; } static int exynos_pcie_resume_noirq(struct device *dev) { - struct exynos_pcie *ep = dev_get_drvdata(dev); - struct dw_pcie *pci = &ep->pci; + struct samsung_pcie *sp = dev_get_drvdata(dev); + struct dw_pcie *pci = &sp->pci; struct dw_pcie_rp *pp = &pci->pp; int ret; - ret = regulator_bulk_enable(ARRAY_SIZE(ep->supplies), ep->supplies); + ret = regulator_bulk_enable(ARRAY_SIZE(sp->supplies), sp->supplies); if (ret) return ret; - /* exynos_pcie_host_init controls ep->phy */ + /* exynos_pcie_host_init controls sp->phy */ exynos_pcie_host_init(pp); dw_pcie_setup_rc(pp); exynos_pcie_start_link(pci); From patchwork Tue Feb 14 12:13:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140304 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D31D5C05027 for ; Tue, 14 Feb 2023 14:26:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbjBNO0R (ORCPT ); Tue, 14 Feb 2023 09:26:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232540AbjBNO0M (ORCPT ); Tue, 14 Feb 2023 09:26:12 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 858ED30D3 for ; Tue, 14 Feb 2023 06:26:04 -0800 (PST) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230214141036epoutp013fb87be5691cef548e401706f24c92bb~DtjeRQ49Y1584215842epoutp011 for ; Tue, 14 Feb 2023 14:10:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230214141036epoutp013fb87be5691cef548e401706f24c92bb~DtjeRQ49Y1584215842epoutp011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383836; bh=yPfAt9ZEYFCzh/HAJPtibMGnwe48kdLxqS78BSOGynE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XDl6OmAYjIvxY4kClHI5UVLFh75JI6Ug8ZLAnYr5Xx9gAZgvniM3E/wGgl0xWONCK 81kr6IOexDXwpK1ScqE+qzUy+d5A+G6kf5Sv/EDn5cm3k55BwaRzbBovYkxLv/XO00 JBZb7tiWsABhGAuKxLQqNeNEFpz0xBHVqkLqhqzs= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20230214141034epcas5p236a6e9a4b55a69ad122ef81d96e46c84~DtjdIl8NZ0163401634epcas5p2b; Tue, 14 Feb 2023 14:10:34 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.178]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4PGNQd4zqSz4x9Pp; Tue, 14 Feb 2023 14:10:33 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 71.98.06765.9569BE36; Tue, 14 Feb 2023 23:10:33 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20230214121440epcas5p46db82a141c3e2664cff4b290b49c3938~Dr_P-dY5w1007810078epcas5p4e; Tue, 14 Feb 2023 12:14:40 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121440epsmtrp173e65dc5c147190ee7241b11956b2c93~Dr_P_TDNQ1788717887epsmtrp1F; Tue, 14 Feb 2023 12:14:40 +0000 (GMT) X-AuditID: b6c32a4b-46dfa70000011a6d-61-63eb96596475 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 10.0B.17995.F2B7BE36; Tue, 14 Feb 2023 21:14:39 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121437epsmtip1f825737ce144318188ec9e3afb312c2b~Dr_NKqQiS2493824938epsmtip1S; Tue, 14 Feb 2023 12:14:36 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 09/16] PCI: samsung: Make common appl readl/writel functions Date: Tue, 14 Feb 2023 17:43:26 +0530 Message-Id: <20230214121333.1837-10-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAJsWRmVeSWpSXmKPExsWy7bCmhm7ktNfJBiduqVg8mLeNzWJJU4bF /CPnWC1mbZvLaPHx9zkWixVfZrJb9L14yGzR0POb1WLT42usFpd3zWGzODvvOJvFjPP7mCxa /rSwWLQcbWexWHvkLrvFoq1f2C3+79nBbvFn+gcWi97DtRabN01ldhDxeLPpO7vHzll32T0W bCr12LSqk83jzrU9bB7vzp1j93hyZTqTx+Yl9R4b3+1g8ljU8JHNo2/LKkaPz5vkAniism0y UhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJzgN5UUihLzCkF CgUkFhcr6dvZFOWXlqQqZOQXl9gqpRak5BSYFOgVJ+YWl+al6+WlllgZGhgYmQIVJmRnTFvR wFLwUrfiwoGIBsZv6l2MnBwSAiYSv35NYu9i5OIQEtjNKLHu0iFWkISQwCdGialf5SESnxkl 7q/8w9LFyAHW8eRdBkR8F1B82wdmCKeVSaJl/S1GkG42AS2Jxq9dYAkRgVtMEi8/PwTbwSxw ilHiwIu97CBVwgI+Ej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Yp qTmZZalF+nYJXBnTVjSwFLzUrbhwIKKB8Zt6FyMHh4SAicSTdxldjFwcQgI7GCW+vr7A2MXI CRSXlPh8cR0ThC0ssfLfc3aIomYmib5T91hBEmwCWhKNX7uYQRIiAq+YJA7vmQHmMAtcYJS4 dbCbHaRKWMBH4ucTiLEsAqoS3Tc2M4PYvAJWEnt6HjJDrJCXWL3hAJjNCRRvad0EZgsJWErM +rWKcQIj3wJGhlWMkqkFxbnpucWGBUZ5qeV6xYm5xaV56XrJ+bmbGMFxo6W1g3HPqg96hxiZ OBgPMUpwMCuJ8Ao/fZEsxJuSWFmVWpQfX1Sak1p8iFGag0VJnPdC18l4IYH0xJLU7NTUgtQi mCwTB6dUA5OJtb7Ysjm/zzTo+u8Xed9g++L+z4nbi3buKT/4Ibts+/tAtiKGf6zb9yqE/H0l HKNjsMGH9abR3CW8VwW/dl0pnJbsuvzpp4XRHIWrtuueXCTdtGTyovNrWdnqY3VVTzO5blR7 tOq1fnFFvEJcMGcP18XNfgfs00/KWGTXNbMcijzbdXDLz+P6N3/0HdIuiYn8fZPlVXtM6eTy 6+mi9Yt+5K2q/VizrUNnrqUoY8amhby3LH30Jp6SeCXTyPm/28z4cvnFcuPjG+/dfmeel1zQ yeXHHmjGUM3qvP/p3TyRHcuCfnHYhYkGPfWYpcF0+o3y7jUyht7/HyZPzUiYcnb2m8f5SR2T Dpkqfk3Xl1ViKc5INNRiLipOBACL4r2/CgMAAA== X-CMS-MailID: 20230214121440epcas5p46db82a141c3e2664cff4b290b49c3938 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121440epcas5p46db82a141c3e2664cff4b290b49c3938 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Common application logic register read and write functions used for better readability. Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index be0177fcd763..e6e2a8ab4403 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -79,63 +79,63 @@ static void exynos_pcie_deinit_clk_resources(struct samsung_pcie *sp) clk_bulk_disable_unprepare(sp->clk_cnt, sp->clks); } -static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg) +static void samsung_pcie_appl_writel(struct samsung_pcie *sp, u32 val, u32 reg) { - writel(val, base + reg); + writel(val, sp->appl_base + reg); } -static u32 exynos_pcie_readl(void __iomem *base, u32 reg) +static unsigned int samsung_pcie_appl_readl(struct samsung_pcie *sp, u32 reg) { - return readl(base + reg); + return readl(sp->appl_base + reg); } static void exynos_pcie_sideband_dbi_w_mode(struct samsung_pcie *sp, bool on) { u32 val; - val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_APPL_SLV_AWMISC); + val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_APPL_SLV_AWMISC); if (on) val |= EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; else val &= ~EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_APPL_SLV_AWMISC); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_APPL_SLV_AWMISC); } static void exynos_pcie_sideband_dbi_r_mode(struct samsung_pcie *sp, bool on) { u32 val; - val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_APPL_SLV_ARMISC); + val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_APPL_SLV_ARMISC); if (on) val |= EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; else val &= ~EXYNOS_PCIE_APPL_SLV_DBI_ENABLE; - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_APPL_SLV_ARMISC); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_APPL_SLV_ARMISC); } static void exynos_pcie_assert_core_reset(struct samsung_pcie *sp) { u32 val; - val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_CORE_RESET); + val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_CORE_RESET); val &= ~EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_CORE_RESET); - exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_STICKY_RESET); - exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_NONSTICKY_RESET); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_CORE_RESET); + samsung_pcie_appl_writel(sp, 0, EXYNOS_PCIE_STICKY_RESET); + samsung_pcie_appl_writel(sp, 0, EXYNOS_PCIE_NONSTICKY_RESET); } static void exynos_pcie_deassert_core_reset(struct samsung_pcie *sp) { u32 val; - val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_CORE_RESET); + val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_CORE_RESET); val |= EXYNOS_PCIE_CORE_RESET_ENABLE; - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_CORE_RESET); - exynos_pcie_writel(sp->appl_base, 1, EXYNOS_PCIE_STICKY_RESET); - exynos_pcie_writel(sp->appl_base, 1, EXYNOS_PCIE_NONSTICKY_RESET); - exynos_pcie_writel(sp->appl_base, 1, EXYNOS_PCIE_APP_INIT_RESET); - exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_APP_INIT_RESET); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_CORE_RESET); + samsung_pcie_appl_writel(sp, 1, EXYNOS_PCIE_STICKY_RESET); + samsung_pcie_appl_writel(sp, 1, EXYNOS_PCIE_NONSTICKY_RESET); + samsung_pcie_appl_writel(sp, 1, EXYNOS_PCIE_APP_INIT_RESET); + samsung_pcie_appl_writel(sp, 0, EXYNOS_PCIE_APP_INIT_RESET); } static int exynos_pcie_start_link(struct dw_pcie *pci) @@ -143,21 +143,21 @@ static int exynos_pcie_start_link(struct dw_pcie *pci) struct samsung_pcie *sp = to_samsung_pcie(pci); u32 val; - val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_SW_WAKE); + val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_SW_WAKE); val &= ~EXYNOS_PCIE_BUS_EN; - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_SW_WAKE); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_SW_WAKE); /* assert LTSSM enable */ - exynos_pcie_writel(sp->appl_base, EXYNOS_PCIE_APPL_LTSSM_ENABLE, + samsung_pcie_appl_writel(sp, EXYNOS_PCIE_APPL_LTSSM_ENABLE, EXYNOS_PCIE_APP_LTSSM_ENABLE); return 0; } static void exynos_pcie_clear_irq_pulse(struct samsung_pcie *sp) { - u32 val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_IRQ_PULSE); + u32 val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_IRQ_PULSE); - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_IRQ_PULSE); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_IRQ_PULSE); } static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg) @@ -173,9 +173,9 @@ static void exynos_pcie_enable_irq_pulse(struct samsung_pcie *sp) u32 val = EXYNOS_IRQ_INTA_ASSERT | EXYNOS_IRQ_INTB_ASSERT | EXYNOS_IRQ_INTC_ASSERT | EXYNOS_IRQ_INTD_ASSERT; - exynos_pcie_writel(sp->appl_base, val, EXYNOS_PCIE_IRQ_EN_PULSE); - exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); - exynos_pcie_writel(sp->appl_base, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); + samsung_pcie_appl_writel(sp, val, EXYNOS_PCIE_IRQ_EN_PULSE); + samsung_pcie_appl_writel(sp, 0, EXYNOS_PCIE_IRQ_EN_LEVEL); + samsung_pcie_appl_writel(sp, 0, EXYNOS_PCIE_IRQ_EN_SPECIAL); } static u32 exynos_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base, @@ -232,7 +232,7 @@ static struct pci_ops exynos_pci_ops = { static int exynos_pcie_link_up(struct dw_pcie *pci) { struct samsung_pcie *sp = to_samsung_pcie(pci); - u32 val = exynos_pcie_readl(sp->appl_base, EXYNOS_PCIE_APPL_RDLH_LINKUP); + u32 val = samsung_pcie_appl_readl(sp, EXYNOS_PCIE_APPL_RDLH_LINKUP); return (val & EXYNOS_PCIE_APPL_XMLH_LINKUP); } From patchwork Tue Feb 14 12:13:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140310 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E29ADC64EC7 for ; Tue, 14 Feb 2023 14:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232803AbjBNO0s (ORCPT ); Tue, 14 Feb 2023 09:26:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233251AbjBNO0a (ORCPT ); Tue, 14 Feb 2023 09:26:30 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BE692A9B9 for ; Tue, 14 Feb 2023 06:26:20 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230214141047epoutp03c7b70294c3192df918836ea2b2689142~DtjoiqNQi1771117711epoutp03g for ; Tue, 14 Feb 2023 14:10:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230214141047epoutp03c7b70294c3192df918836ea2b2689142~DtjoiqNQi1771117711epoutp03g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383847; bh=4+P3LcEWNHqtJXPXgDkBs88eaM7Lgag34FxKALksevo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WanGN2/9iGN7rYQCA/ZXar5mqWLcSZoOnV2fuGM7eaH/tPqkb0Qz0R7rhXEdHaOts 54F0RWn2vRwuM2q7l4AaGzFFtARoImPeUhSmc0NWEw1TkmQ49jQy0Wnrc4u+tfCPLG wkNl15mmOyQ+XHxqvLR3QOMmAaFBbLddQzbIbVmA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230214141046epcas5p11b05b957c72f6185b0a00c1437cd4743~Dtjn8mdIH1464814648epcas5p1n; Tue, 14 Feb 2023 14:10:46 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.182]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4PGNQr4fYqz4x9Pt; Tue, 14 Feb 2023 14:10:44 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 75.99.10528.4669BE36; Tue, 14 Feb 2023 23:10:44 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230214121444epcas5p16c5f7665fc9dee78cd427d976114e4f1~Dr_T2O9wW1714317143epcas5p1W; Tue, 14 Feb 2023 12:14:44 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121444epsmtrp2850fc3957b8b00c69884f37970c2b9ab~Dr_T1CEHh1888418884epsmtrp2o; Tue, 14 Feb 2023 12:14:44 +0000 (GMT) X-AuditID: b6c32a49-c17ff70000012920-22-63eb96642f86 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 6D.8E.05839.43B7BE36; Tue, 14 Feb 2023 21:14:44 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121441epsmtip16a4cfe37f004dab5520b727e5563a714~Dr_Q3t0xU2493824938epsmtip1T; Tue, 14 Feb 2023 12:14:40 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 10/16] dt-bindings: PCI: Add phy-names as required property Date: Tue, 14 Feb 2023 17:43:27 +0530 Message-Id: <20230214121333.1837-11-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTa0xbZRj26ynnHHCwY4HwrW6F1CkbGdBubT0Qihtu7OwWUSMxxARP2pO2 o7f0ArploTNlaqUgsgnUjSEXdZCpazcsCKMBxrIpsAVCEMeEUQ1sE0FuysVZ2qL/nvd9n+e9 fh+OcLpQLq7SmhiDllbz0TB2c9fOHYnyTx/JBGW/88ix6maUrH9PSV7s7gshHc0XADm70scm v5qvwsi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9zn8Tt75Au/f fZ4Qw1e+REqJpTgj0VCLuag4EQA/2ovQDAMAAA== X-CMS-MailID: 20230214121444epcas5p16c5f7665fc9dee78cd427d976114e4f1 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121444epcas5p16c5f7665fc9dee78cd427d976114e4f1 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org To replace devm_of_phy_get with devm_phy_get to get the PHY pointer using non DT version, we need to add phy-names property in DT and make it a required property with const value. Signed-off-by: Shradha Todi --- Documentation/devicetree/bindings/pci/samsung,pcie.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/samsung,pcie.yaml b/Documentation/devicetree/bindings/pci/samsung,pcie.yaml index 9c58c4d1f6a7..11feff9d6526 100644 --- a/Documentation/devicetree/bindings/pci/samsung,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/samsung,pcie.yaml @@ -50,6 +50,10 @@ properties: phys: maxItems: 1 + phy-names: + items: + - const: pcie_phy + vdd10-supply: description: Phandle to a regulator that provides 1.0V power to the PCIe block. @@ -81,6 +85,7 @@ required: - clocks - clock-names - phys + - phy-names - vdd10-supply - vdd18-supply From patchwork Tue Feb 14 12:13:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140288 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A537C05027 for ; Tue, 14 Feb 2023 14:22:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233355AbjBNOWB (ORCPT ); Tue, 14 Feb 2023 09:22:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233320AbjBNOVr (ORCPT ); Tue, 14 Feb 2023 09:21:47 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8613125BB1 for ; Tue, 14 Feb 2023 06:21:25 -0800 (PST) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230214141109epoutp02f188922d748abea3d44936658de465c8~Dtj9tj9S31102511025epoutp02e for ; Tue, 14 Feb 2023 14:11:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230214141109epoutp02f188922d748abea3d44936658de465c8~Dtj9tj9S31102511025epoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383869; bh=dTB+VjEDyzvL76nvipyJ2ztjpE2s8jZhOfCcodwAcqo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=stIN6kxNFTAzKgrhclE60uhUiD/b/JSGD0HYxmZwGAi4UrjlyUbuBkxNlr6F2h6SI ydOd38z8Fmq7xIZjWkcvzpqx1DfIvdUgF0GU6PiDXf24k+nw8tKy2NN/5Aaref/fvu qCNLdOhyEvzcTf8eTEnyITjzKXzUMXke5Mxms5TA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230214141108epcas5p15735fbd8fa1477f87d6e9c6826b65812~Dtj8QZkLf0389203892epcas5p1H; Tue, 14 Feb 2023 14:11:08 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.177]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4PGNRG3yx3z4x9Pv; Tue, 14 Feb 2023 14:11:06 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 2E.98.06765.A769BE36; Tue, 14 Feb 2023 23:11:06 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20230214121448epcas5p48e626bd21819a37308b6277f7b29286c~Dr_Xkovfc2156221562epcas5p4i; Tue, 14 Feb 2023 12:14:48 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121448epsmtrp151d94608bf3005cbfd04a79e241ac2e5~Dr_Xj2I8m1788717887epsmtrp1J; Tue, 14 Feb 2023 12:14:48 +0000 (GMT) X-AuditID: b6c32a4b-46dfa70000011a6d-9b-63eb967a7380 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id DF.8E.05839.73B7BE36; Tue, 14 Feb 2023 21:14:48 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121445epsmtip103668dd51043511c3e8ad7ecc141e026~Dr_UyTDLR2380623806epsmtip1x; Tue, 14 Feb 2023 12:14:45 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 11/16] arm64: dts: exynos: Add phy-names as DT property Date: Tue, 14 Feb 2023 17:43:28 +0530 Message-Id: <20230214121333.1837-12-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTe0xbVRzHPb3tvbdo2Q0wd1YBoc5NmEC7ATsQUJYteBNMhjNoFBS7cm2R vuwDhcTIqxNxMMjCw44VZCiIqHCLjFXGKoMRi1QIZC4MIiiE4uYyHBtBGNoH0/8+v9/v+zu/ xzmHxAIGcCGZqzYwOrVUKcL9uL1XIiKiCutuysQNC8FoztKLo9YSBWoacvKQufccQCsbTi5q X/2UQFWueQwVndrgIfb3azw0aWvE0ZhlBEcNPw9wUNlmGReVDX/ERV8PzRKo5btVAv3T30eg zfo7XFR55QNkZWuxlCD6FrtG0BfNswTdzBpptuNjnJ651o/Tt51Ogl6YqufQ1tYP6e7bfRy6 pWgFp6t6OgB9lw1Nf+z1vCQFI81hdGGMWqbJyVXLk0VpL2cfyY6LF0uiJAnokChMLVUxyaKj L6ZHpeYq3WOKwvKlSqPblS7V60UxzyXpNEYDE6bQ6A3JIkabo9TGaqP1UpXeqJZHqxlDokQs PhDnFr6Vp3DdMxPaTvz9xYsvFYFGXgUgSUjFwrafMiuAHxlAfQ/gwlw1XgH4buMvAJd6jvsC 9wH83NHsDXgSTnUuYb7AJQDb66uBzzBx4K26cq8KpyJh8b0KryqImubA5bvzhMfAKAeAdtcl wlM8kHoBTlcVeBK41NOwqoslPCygEmFJUet2uSfhV112zMN8t7/MxHoPhdQUCUtvfIL5REfh 1Y46no8D4R8jPYSPhXD59MltlsMvrQ3beiW8b23l+Ph5aJ9q5Hr6wagI+K0txucOgbWOb7wS jPKHlRsL23IB7LM85Kfg6oN+ro93Q8vVye0WaLjSs8bx7bESwJnLWdUg1Px/hWYAOsBuRqtX yRl9nPagmnnvvzuTaVQs8D7kyLQ+8NvcnehBwCHBIIAkJgoSBC66ZAGCHGlBIaPTZOuMSkY/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U4kOM0hwsSuK8F7pOxgsJpCeWpGanphakFsFk mTg4pRqYlujLp56e++n61Db+6BxzEytdE5kp+acfG3D/OX1lvuLxYvcyX7+TDlcEa9O78pse r2UzquY6xHft4QWbZxv9cxa3SXXXXV/qsMvq14yEL/lhXXLy2VPXzG2W+KVy+sz3axJPL3vP uai06JE+g6bWe933v5cblH/Wyb3BpsMrZ2f453klzxqNbbtvdWh1vDsX6hG+7f7t+axZD+eY pN93ftPJkh08/f8WS1sW6R+dPN/93z0xv+5vynZK7lJ13KYf/xM3OvGtE1xkfWrFv1JFQQXn 0Grh6M1NuZ6hdv0vYzlelJj9YWsLzzFIP7v1trjY/kqDA/L8sheevVukJMhRZMlTuog/+a/O zcwj5uJKLMUZiYZazEXFiQDESOSDCgMAAA== X-CMS-MailID: 20230214121448epcas5p48e626bd21819a37308b6277f7b29286c X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121448epcas5p48e626bd21819a37308b6277f7b29286c References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org To replace devm_of_phy_get with devm_phy_get to get the PHY pointer using non DT version, we need to add phy-names property in DT. Signed-off-by: Shradha Todi --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 96b216099594..f50167923fd8 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -1957,6 +1957,7 @@ num-viewport = <3>; bus-range = <0x00 0xff>; phys = <&pcie_phy>; + phy-names = "pcie_phy"; ranges = <0x81000000 0 0 0x0c001000 0 0x00010000>, <0x82000000 0 0x0c011000 0x0c011000 0 0x03feefff>; status = "disabled"; From patchwork Tue Feb 14 12:13:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140326 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94953C05027 for ; Tue, 14 Feb 2023 14:31:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjBNObR (ORCPT ); Tue, 14 Feb 2023 09:31:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232568AbjBNObP (ORCPT ); Tue, 14 Feb 2023 09:31:15 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E44A8 for ; Tue, 14 Feb 2023 06:31:14 -0800 (PST) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230214141132epoutp03ecc18dee7b0ae286e1416c5ad99ad8ab~DtkTDGJzm2112821128epoutp03N for ; Tue, 14 Feb 2023 14:11:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230214141132epoutp03ecc18dee7b0ae286e1416c5ad99ad8ab~DtkTDGJzm2112821128epoutp03N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383892; bh=auUVRqKrczwr8dxcJj9iJlHqVS46IWR7h5f9bDyL/9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CTG6IKLtVtvhnts0T73rG075LCpqsA+Gzc05aCz+pBrHlOZzwttk9baOsHwDqG+VF HPgpX/n51K+mGvW1icT+AbdJFo30T4vH8joB/PvUCkUS7iBbSkCkF+pwFCtu8OI17R Vn36HCBxO0xTeHVQNe5VIv3AkY7E5fzHDo0brqiE= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230214141132epcas5p1b3b6a2f3148f5350fa0f0b6b928c3fd4~DtkSaTmol1928819288epcas5p13; Tue, 14 Feb 2023 14:11:32 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.182]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4PGNRk2nzHz4x9Py; Tue, 14 Feb 2023 14:11:30 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 54.A9.10528.2969BE36; Tue, 14 Feb 2023 23:11:30 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230214121451epcas5p148118502c76299b2a6f389881fa296cc~Dr_a7gRUk1679116791epcas5p1y; Tue, 14 Feb 2023 12:14:51 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121451epsmtrp1c9dcc1ace98f1c0abbdda39d4d22fc5c~Dr_a6oYg01843918439epsmtrp1Y; Tue, 14 Feb 2023 12:14:51 +0000 (GMT) X-AuditID: b6c32a49-e75fa70000012920-71-63eb969239f3 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 42.9E.05839.B3B7BE36; Tue, 14 Feb 2023 21:14:51 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121448epsmtip1e40e9843a96cbd637c69ac1b6b33fb8a~Dr_YP1vvE2380623806epsmtip1y; Tue, 14 Feb 2023 12:14:48 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 12/16] PCI: samsung: Get PHY using non-DT version Date: Tue, 14 Feb 2023 17:43:29 +0530 Message-Id: <20230214121333.1837-13-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEJsWRmVeSWpSXmKPExsWy7bCmlu6kaa+TDWa94Ld4MG8bm8WSpgyL +UfOsVrM2jaX0eLj73MsFiu+zGS36HvxkNmioec3q8Wmx9dYLS7vmsNmcXbecTaLGef3MVm0 /GlhsWg52s5isfbIXXaLRVu/sFv837OD3eLP9A8sFr2Hay02b5rK7CDi8WbTd3aPnbPusnss 2FTqsWlVJ5vHnWt72DzenTvH7vHkynQmj81L6j02vtvB5LGo4SObR9+WVYwenzfJBfBEZdtk pCampBYppOYl56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXmAL2ppFCWmFMK FApILC5W0rezKcovLUlVyMgvLrFVSi1IySkwKdArTswtLs1L18tLLbEyNDAwMgUqTMjO2PP9 J3PBL/aK89M/MDUw3mTrYuTkkBAwkdg76yZTFyMXh5DAbkaJ97Pes0E4nxgl+r48gXK+MUrM bT7ACNNy+cE0qMReRok5rz+wQjitTBJru8+BVbEJaEk0fu1iBkmICNxiknj5+SE7iMMscIpR 4sCLvewgVcICjhKPuq8ygdgsAqoS92bMAO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vv9kLvjFXnF++gemBsabbF2MnBwSAiYSlx9MA7K5OIQEdjNKfJt8kAUi ISnx+eI6JghbWGLlv+fsEEXNTBKbn+9gBEmwCWhJNH7tYgZJiAi8YpI4vGcGmMMscIFR4tbB bnaQKmEBR4lH3VfBRrEIqErcmzEDrJtXwErixZ8V7BAr5CVWbzjADGJzAsVbWjeB2UIClhKz fq1inMDIt4CRYRWjZGpBcW56brFhgWFearlecWJucWleul5yfu4mRnDsaGnuYNy+6oPeIUYm DsZDjBIczEoivMJPXyQL8aYkVlalFuXHF5XmpBYfYpTmYFES573QdTJeSCA9sSQ1OzW1ILUI JsvEwSnVwNQpsXmt1c8bRct+ZZs6GjuyrHT57WlY/GnW6dfVF1+/rqyckZXH9WZnn5ipr9wl uUNXv3Rc8jMP/a372WZNSq6Yz9yUnkMBvM67fvb9sT8RaFAbUTpv22LdK40L954TNb/Glqcr fqufVWrfQqHjczVOVHnumf8vSv7kxifF9/nyLdhfnrLU2r7SpnT2wuAg6ZJQeW22fYayX9Ln TtWIm2b0W/xB+PWvG05uyaopPMDfyxP1fbLm1vqAeRr9kxL9H7XOqvbwzFp6UMSP0XmXQSwb 50JB5ZPy/t47DH3Z+d1Epi7c8Uih5YV95T7LRUpp/uz3k23tOrUbnY50nytglbC6fU9dUOCZ 2cGM2mYBJZbijERDLeai4kQAjgOM/AwDAAA= X-CMS-MailID: 20230214121451epcas5p148118502c76299b2a6f389881fa296cc X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121451epcas5p148118502c76299b2a6f389881fa296cc References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace devm_of_phy_get with devm_phy_get to get the PHY pointer. Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index e6e2a8ab4403..719d284e1552 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -301,7 +301,6 @@ static int exynos_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct samsung_pcie *sp; - struct device_node *np = dev->of_node; int ret; sp = devm_kzalloc(dev, sizeof(*sp), GFP_KERNEL); @@ -311,7 +310,7 @@ static int exynos_pcie_probe(struct platform_device *pdev) sp->pci.dev = dev; sp->pci.ops = &dw_pcie_ops; - sp->phy = devm_of_phy_get(dev, np, NULL); + sp->phy = devm_phy_get(dev, "pcie_phy"); if (IS_ERR(sp->phy)) return PTR_ERR(sp->phy); From patchwork Tue Feb 14 12:13:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140287 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B787C05027 for ; Tue, 14 Feb 2023 14:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbjBNOVm (ORCPT ); Tue, 14 Feb 2023 09:21:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjBNOVe (ORCPT ); Tue, 14 Feb 2023 09:21:34 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3B872B08C for ; Tue, 14 Feb 2023 06:21:13 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230214141207epoutp0189b5492c12eea8d362b8c0d167693571~DtkzMklCG1584215842epoutp01G for ; Tue, 14 Feb 2023 14:12:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230214141207epoutp0189b5492c12eea8d362b8c0d167693571~DtkzMklCG1584215842epoutp01G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383927; bh=kuxFDkZgnx1SPc8bSDimvFlfEON/qYA/DJ+OdV4F/YQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DDuRAcqb+5hyg832WJoKuUhqt6rKqIWP5KtENOp/+vXJd+K/aQk1gdqYF9KN2NSaB EaUFU0RBplmSMrVgzkLLnsdX+S4bNPAh8LXQ1J+Ni09TTzJfo9oUf3AVCwF34ivqnq xOLwsjaFUNuf+bkUjfgf205G7y8z8ekKZ/P6SSiA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20230214141205epcas5p2d1a6f101ff50ff4839d6e38ac321f605~Dtkx45R8m2451524515epcas5p2p; Tue, 14 Feb 2023 14:12:05 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.179]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4PGNSN4yFnz4x9Pv; Tue, 14 Feb 2023 14:12:04 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.A8.06765.4B69BE36; Tue, 14 Feb 2023 23:12:04 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230214121456epcas5p36603c8d717588699d1b5575229d19114~Dr_e7CiW40081100811epcas5p3B; Tue, 14 Feb 2023 12:14:56 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230214121456epsmtrp1fda2db0719d5e8d922c54d556495a537~Dr_e04eqs1788717887epsmtrp1Q; Tue, 14 Feb 2023 12:14:56 +0000 (GMT) X-AuditID: b6c32a4b-46dfa70000011a6d-f5-63eb96b4cc3b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id E6.0B.17995.F3B7BE36; Tue, 14 Feb 2023 21:14:55 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121452epsmtip16085c3c7717daffba84e84cb8bf1ee37~Dr_bm37Mg2436024360epsmtip1q; Tue, 14 Feb 2023 12:14:52 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 13/16] PCI: samsung: Rename common functions to samsung Date: Tue, 14 Feb 2023 17:43:30 +0530 Message-Id: <20230214121333.1837-14-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTbUxTVxje6b3tLcyyO8DtQCKD65CAAi2WcjDiZzeuccmaEPcDSdhduaGV 0ja97YYm22ABmXWgiyIfQlUkU1kEKVA7YICAoCxUExgkBBJRdMUtfJXh5COutGX79zzP+7wf 5z3nCLHAXkGoUK01sgYto6EE/ritNzoqtuXSn0r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mG7Xtx7qyN68rGhmPqNCUz7W9nbHtUnaExcpb3q 7Aqu+SJP05RYijMSDbWYi4oTAcxvLLcMAwAA X-CMS-MailID: 20230214121456epcas5p36603c8d717588699d1b5575229d19114 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121456epcas5p36603c8d717588699d1b5575229d19114 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use samsung instead of exynos for all common functions like probe/remove/suspend/resume. Suggested-by: Pankaj Dubey Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index 719d284e1552..dc8ec0b546fd 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -60,7 +60,7 @@ struct samsung_pcie { struct regulator_bulk_data supplies[2]; }; -static int exynos_pcie_init_clk_resources(struct samsung_pcie *sp) +static int samsung_pcie_init_clk_resources(struct samsung_pcie *sp) { struct device *dev = sp->pci.dev; int ret; @@ -74,7 +74,7 @@ static int exynos_pcie_init_clk_resources(struct samsung_pcie *sp) return clk_bulk_prepare_enable(sp->clk_cnt, sp->clks); } -static void exynos_pcie_deinit_clk_resources(struct samsung_pcie *sp) +static void samsung_pcie_deinit_clk_resources(struct samsung_pcie *sp) { clk_bulk_disable_unprepare(sp->clk_cnt, sp->clks); } @@ -297,7 +297,7 @@ static const struct dw_pcie_ops dw_pcie_ops = { .start_link = exynos_pcie_start_link, }; -static int exynos_pcie_probe(struct platform_device *pdev) +static int samsung_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct samsung_pcie *sp; @@ -319,7 +319,7 @@ static int exynos_pcie_probe(struct platform_device *pdev) if (IS_ERR(sp->appl_base)) return PTR_ERR(sp->appl_base); - ret = exynos_pcie_init_clk_resources(sp); + ret = samsung_pcie_init_clk_resources(sp); if (ret < 0) return ret; @@ -345,12 +345,12 @@ static int exynos_pcie_probe(struct platform_device *pdev) fail_probe: phy_exit(sp->phy); regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); - exynos_pcie_deinit_clk_resources(sp); + samsung_pcie_deinit_clk_resources(sp); return ret; } -static int __exit exynos_pcie_remove(struct platform_device *pdev) +static int __exit samsung_pcie_remove(struct platform_device *pdev) { struct samsung_pcie *sp = platform_get_drvdata(pdev); @@ -358,13 +358,13 @@ static int __exit exynos_pcie_remove(struct platform_device *pdev) exynos_pcie_assert_core_reset(sp); phy_power_off(sp->phy); phy_exit(sp->phy); - exynos_pcie_deinit_clk_resources(sp); + samsung_pcie_deinit_clk_resources(sp); regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); return 0; } -static int exynos_pcie_suspend_noirq(struct device *dev) +static int samsung_pcie_suspend_noirq(struct device *dev) { struct samsung_pcie *sp = dev_get_drvdata(dev); @@ -376,7 +376,7 @@ static int exynos_pcie_suspend_noirq(struct device *dev) return 0; } -static int exynos_pcie_resume_noirq(struct device *dev) +static int samsung_pcie_resume_noirq(struct device *dev) { struct samsung_pcie *sp = dev_get_drvdata(dev); struct dw_pcie *pci = &sp->pci; @@ -394,25 +394,25 @@ static int exynos_pcie_resume_noirq(struct device *dev) return dw_pcie_wait_for_link(pci); } -static const struct dev_pm_ops exynos_pcie_pm_ops = { - NOIRQ_SYSTEM_SLEEP_PM_OPS(exynos_pcie_suspend_noirq, - exynos_pcie_resume_noirq) +static const struct dev_pm_ops samsung_pcie_pm_ops = { + NOIRQ_SYSTEM_SLEEP_PM_OPS(samsung_pcie_suspend_noirq, + samsung_pcie_resume_noirq) }; -static const struct of_device_id exynos_pcie_of_match[] = { +static const struct of_device_id samsung_pcie_of_match[] = { { .compatible = "samsung,exynos5433-pcie", }, { }, }; -static struct platform_driver exynos_pcie_driver = { - .probe = exynos_pcie_probe, - .remove = __exit_p(exynos_pcie_remove), +static struct platform_driver samsung_pcie_driver = { + .probe = samsung_pcie_probe, + .remove = __exit_p(samsung_pcie_remove), .driver = { - .name = "exynos-pcie", - .of_match_table = exynos_pcie_of_match, - .pm = &exynos_pcie_pm_ops, + .name = "samsung-pcie", + .of_match_table = samsung_pcie_of_match, + .pm = &samsung_pcie_pm_ops, }, }; -module_platform_driver(exynos_pcie_driver); +module_platform_driver(samsung_pcie_driver); MODULE_LICENSE("GPL v2"); -MODULE_DEVICE_TABLE(of, exynos_pcie_of_match); +MODULE_DEVICE_TABLE(of, samsung_pcie_of_match); From patchwork Tue Feb 14 12:13:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140289 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 206E9C64EC7 for ; Tue, 14 Feb 2023 14:22:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233320AbjBNOWC (ORCPT ); Tue, 14 Feb 2023 09:22:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233365AbjBNOVu (ORCPT ); Tue, 14 Feb 2023 09:21:50 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 335D829E09 for ; Tue, 14 Feb 2023 06:21:26 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230214141314epoutp02b6d3561aa08ac601689e47681c41da7e~Dtlxv-fkN1460014600epoutp02k for ; Tue, 14 Feb 2023 14:13:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230214141314epoutp02b6d3561aa08ac601689e47681c41da7e~Dtlxv-fkN1460014600epoutp02k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383994; bh=5mjw8UmLM6PO7LT0mi6iOKsr2OMYxUDN9WnWHYBrfiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ujoDBIpTRCM46scdrGbM9rLXqyX2i8LkUlgGfiZ7ikl1Z6lmxTuIg8e0FzWgTRm1C Bky8cjhv+dP2MG86HFormZZeKjDN2zSpcmlHjFA/dr+m5effPqg9sjFnEqP7tXRVWq JPWHm+nMqmL9F4eHVgfkzVjJZrIVU0ihYcjZ/dYg= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230214141313epcas5p4d49d3caeb3609b6921393b3ab02cad3a~DtlxNXCTM2002420024epcas5p4Y; Tue, 14 Feb 2023 14:13:13 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.178]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4PGNTh1QXBz4x9Pq; Tue, 14 Feb 2023 14:13:12 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C3.C9.10528.8F69BE36; Tue, 14 Feb 2023 23:13:12 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230214121503epcas5p291dce2b37ec4cdabcfecbf8fbdfcca51~Dr_mABlK_0033300333epcas5p2q; Tue, 14 Feb 2023 12:15:03 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121503epsmtrp2bfc29dd6e661af95921a823f554c978e~Dr_l-CZxx1888418884epsmtrp26; Tue, 14 Feb 2023 12:15:03 +0000 (GMT) X-AuditID: b6c32a49-e75fa70000012920-2d-63eb96f8983e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 78.9E.05839.74B7BE36; Tue, 14 Feb 2023 21:15:03 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121500epsmtip106e59f353fd89b085fd5fb3806a8e2a2~Dr_jSVJzv2481024810epsmtip1a; Tue, 14 Feb 2023 12:15:00 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 15/16] PCI: samsung: Add structure to hold resource operations Date: Tue, 14 Feb 2023 17:43:32 +0530 Message-Id: <20230214121333.1837-16-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAJsWRmVeSWpSXmKPExsWy7bCmpu6Paa+TDXZM5rB4MG8bm8WSpgyL +UfOsVrM2jaX0eLj73MsFiu+zGS36HvxkNmioec3q8Wmx9dYLS7vmsNmcXbecTaLGef3MVm0 /GlhsWg52s5isfbIXXaLRVu/sFv837OD3eLP9A8sFr2Hay02b5rK7CDi8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fOvSt51ZJXMldHZFbc4Yur bdCZ4naWXYmlOCPRUIu5qDgRAOawcDAKAwAA X-CMS-MailID: 20230214121503epcas5p291dce2b37ec4cdabcfecbf8fbdfcca51 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121503epcas5p291dce2b37ec4cdabcfecbf8fbdfcca51 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Some resources might differ based on platforms and we need platform specific functions to initialize or alter them. For better code reusibility, making a separate res_ops which will hold all such function pointers or other resource specific data. This patch includes adding function pointer for IRQ initialization which will help to move common operations for host init into the probe sequence. Suggested-by: Pankaj Dubey Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 26 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index 47ca2a6a545d..01882f2d06c7 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -55,6 +55,7 @@ struct samsung_pcie_pdata { struct pci_ops *pci_ops; const struct dw_pcie_ops *dwc_ops; const struct dw_pcie_host_ops *host_ops; + const struct samsung_res_ops *res_ops; }; /* @@ -77,6 +78,10 @@ struct samsung_pcie { struct regulator_bulk_data supplies[2]; }; +struct samsung_res_ops { + int (*irq_init)(struct samsung_pcie *sp, struct platform_device *pdev); +}; + static int samsung_pcie_init_clk_resources(struct samsung_pcie *sp) { struct device *dev = sp->pci.dev; @@ -276,7 +281,7 @@ static const struct dw_pcie_host_ops exynos_pcie_host_ops = { .host_init = exynos_pcie_host_init, }; -static int exynos_add_pcie_port(struct samsung_pcie *sp, +static int exynos_irq_init(struct samsung_pcie *sp, struct platform_device *pdev) { struct dw_pcie *pci = &sp->pci; @@ -295,15 +300,8 @@ static int exynos_add_pcie_port(struct samsung_pcie *sp, return ret; } - pp->ops = &exynos_pcie_host_ops; pp->msi_irq[0] = -ENODEV; - ret = dw_pcie_host_init(pp); - if (ret) { - dev_err(dev, "failed to initialize host\n"); - return ret; - } - return 0; } @@ -314,6 +312,10 @@ static const struct dw_pcie_ops exynos_dw_pcie_ops = { .start_link = exynos_pcie_start_link, }; +static const struct samsung_res_ops exynos_res_ops_data = { + .irq_init = exynos_irq_init, +}; + static int samsung_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -357,7 +359,12 @@ static int samsung_pcie_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sp); - ret = exynos_add_pcie_port(sp, pdev); + if (pdata->res_ops->irq_init) + pdata->res_ops->irq_init(sp, pdev); + + sp->pci.pp.ops = pdata->host_ops; + + ret = dw_pcie_host_init(&sp->pci.pp); if (ret < 0) goto fail_probe; @@ -428,6 +435,7 @@ static const struct samsung_pcie_pdata exynos_5433_pcie_rc_pdata = { .dwc_ops = &exynos_dw_pcie_ops, .pci_ops = &exynos_pci_ops, .host_ops = &exynos_pcie_host_ops, + .res_ops = &exynos_res_ops_data, }; static const struct of_device_id samsung_pcie_of_match[] = { From patchwork Tue Feb 14 12:13:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 13140286 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81548C61DA4 for ; Tue, 14 Feb 2023 14:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231355AbjBNOVl (ORCPT ); Tue, 14 Feb 2023 09:21:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjBNOVd (ORCPT ); Tue, 14 Feb 2023 09:21:33 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 665332B086 for ; Tue, 14 Feb 2023 06:21:13 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230214141324epoutp01a9793442870ffdde093e8273bccf88d4~Dtl7Dd-pr1509115091epoutp01h for ; Tue, 14 Feb 2023 14:13:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230214141324epoutp01a9793442870ffdde093e8273bccf88d4~Dtl7Dd-pr1509115091epoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676384004; bh=w6/lQyH1riSnz4KIsiIukyvKM2g4H0wS9IalebzqTIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qPbuoe/4supWXXdpo9Nk2he5qZSt8yamhJWLXP90EUnLDRvptl9Ah8eUKs1aS03yo 0rKYRXr08BS4NwcyCf1/tWb+p30UqNEwQIl5WsQAe2X83VVFZ0Y7oknI3RcXsHgSCb p19uNwdi7WDlgc9GqTNn2Se+D0LJDsCMvLX0NoI0= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230214141322epcas5p13ea90f4b1263742a2a17cae6d28a6a18~Dtl5k3Wnt1812318123epcas5p1i; Tue, 14 Feb 2023 14:13:22 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.174]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4PGNTs4fwLz4x9Pv; Tue, 14 Feb 2023 14:13:21 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id DA.80.55678.1079BE36; Tue, 14 Feb 2023 23:13:21 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230214121507epcas5p1590024fc32dfcf562efce93cf5f07221~Dr_pcnVvC1679116791epcas5p1E; Tue, 14 Feb 2023 12:15:07 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121507epsmtrp2fb579a6b53f403af3992c4ac7054a4fa~Dr_pbzxoG1865118651epsmtrp2R; Tue, 14 Feb 2023 12:15:07 +0000 (GMT) X-AuditID: b6c32a4a-909fc7000000d97e-cd-63eb97019e9e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 9A.9E.05839.B4B7BE36; Tue, 14 Feb 2023 21:15:07 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121504epsmtip1bb62400f5fae28e9e805f82dd632a8ef~Dr_mvjZl72484124841epsmtip1V; Tue, 14 Feb 2023 12:15:04 +0000 (GMT) From: Shradha Todi To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co, pankaj.dubey@samsung.com Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Shradha Todi Subject: [PATCH 16/16] PCI: samsung: Make handling of regulators generic Date: Tue, 14 Feb 2023 17:43:33 +0530 Message-Id: <20230214121333.1837-17-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230214121333.1837-1-shradha.t@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTf0wTZxjH896114OsywW67QUGNqcbQgK0QOvBYE7nzG3zD5I595PBpZyU UK61105cooIrIzBAWUb4IWOIzSgs/LBlhCIgAhVHZvkDx48NFaZmgBuxFCURZSs92P77Ps/z ed7nx/u+OBo0jIXiOZyJNXKMjsQCRd3DUbtjQPUDjcLdGkHNNXRjlPWMlvp+xC2m6rq/A5Rn 3S2ibKu1EqpiYR6lCsrWxZT97qSYmuitx6gbDaMYVTM+gFCWpxYRZXEVi6i2kVsSqumnVQn1 T1+PhHpa/VBElQ+fpBz2KvQNGf2XfU1CO+tuSehGu5m2t5Zg9OxkH0Yvu90S+t7NaoR2WE/T l5Z7ELqpwIPRFV2tgPbaI9Ke+zg3RcsyWaxRznIafVYOl51KvvtexpsZKrVCGaNMovaQco7J Y1PJA4fSYg7m6HxjkvLPGZ3Z50pjeJ6Mez3FqDebWLlWz5tSSdaQpTMkGmJ5Jo83c9mxHGtK VioU8SofmJmrXXz0LWLoi8y3jQ+hBeCqvBQE4JBIhFNXasSlIBAPIi4D6J0p3TJWADzfVYUI xmMAp6+fQbZTVi43i4RAP4DtHUsSwShC4MSGBWxSGBENCx+VopsBGfEbAhe9834KJcYAHFzo l2xSwQQN/3QW+jNExCvw178voptaSiTDot9HRUK9HfDHzkG/P8DntxTZ/adCYhqHzvUpIEAH YFPjGiroYLg02iURdCj0Lvdjgs6GLY6aLUYHHzusWwPthYM3633FcF93UbCjN05wh8OqsXY/ ghLPw/L1e1u4FPY0bOudcPVZ31afIbDh2oRY0DT0VJWgwlrKAVybuwbOgYi6/0s0AtAKQlgD n5fN8ipDPMce/+/iNPo8O/C/5uh3esD83MPYIYDgYAhAHCVl0uD7C5ogaRZz4gvWqM8wmnUs PwRUvgVWoqEvaPS+78CZMpSJSYpEtVqdmJSgVpIvSSNTf9YEEdmMic1lWQNr3M5D8IDQAoT8 N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igg6/32 nj7LBO07gkbfCmXmslkev/VNxfXoDC/nHq87ehn6N2YKbtS4oBkeufTejYef7F3W+fy9w/0v dOKyZ0zSyV3KC8/bSG7Jnn2j9/1GVzN75oYnLP3XOCat4T186aHJ7Y+T3j3nCuQvvNAe2/fg d8+EE2GrY5m49CVjJmeE+U536uP4oXPRacXnFWsZAyJ4PSvPenPIv93IzThl4rfbLkdt1Eol fSecMvbcZ3C8+Hfh1FmXbrpHTbfif756Rmus+HMvN4VHfPtkXpvVF1+ccer4beNCwdiWX+pf ouJ+LI73mrlSiaU4I9FQi7moOBEAjZev5QsDAAA= X-CMS-MailID: 20230214121507epcas5p1590024fc32dfcf562efce93cf5f07221 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121507epcas5p1590024fc32dfcf562efce93cf5f07221 References: <20230214121333.1837-1-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use pointers instead of fixed size array to store regulator related information. Add common regulator initialization and de-initialization functions. For platform specific init, add a res_ops function pointer. Suggested-by: Pankaj Dubey Signed-off-by: Shradha Todi --- drivers/pci/controller/dwc/pci-samsung.c | 79 +++++++++++++++++++----- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-samsung.c b/drivers/pci/controller/dwc/pci-samsung.c index 01882f2d06c7..bf18020c14da 100644 --- a/drivers/pci/controller/dwc/pci-samsung.c +++ b/drivers/pci/controller/dwc/pci-samsung.c @@ -66,7 +66,8 @@ struct samsung_pcie_pdata { * @clks: list of clocks required for the controller * @clk_cnt: count of clocks required for the controller * @phy: PHY device associated with the controller - * @supplies: array of regulators required for the controller + * @supplies: list of regulators required for the controller + * @supplies_cnt: count of regulators required for the controller */ struct samsung_pcie { struct dw_pcie pci; @@ -75,10 +76,12 @@ struct samsung_pcie { struct clk_bulk_data *clks; int clk_cnt; struct phy *phy; - struct regulator_bulk_data supplies[2]; + struct regulator_bulk_data *supplies; + int supplies_cnt; }; struct samsung_res_ops { + int (*init_regulator)(struct samsung_pcie *sp); int (*irq_init)(struct samsung_pcie *sp, struct platform_device *pdev); }; @@ -111,6 +114,34 @@ static unsigned int samsung_pcie_appl_readl(struct samsung_pcie *sp, u32 reg) return readl(sp->appl_base + reg); } +static int samsung_regulator_enable(struct samsung_pcie *sp) +{ + struct device *dev = sp->pci.dev; + int ret; + + if (sp->supplies_cnt == 0) + return 0; + + ret = devm_regulator_bulk_get(dev, sp->supplies_cnt, + sp->supplies); + if (ret) + return ret; + + ret = regulator_bulk_enable(sp->supplies_cnt, sp->supplies); + if (ret) + return ret; + + return 0; +} + +static void samsung_regulator_disable(struct samsung_pcie *sp) +{ + if (sp->supplies_cnt == 0) + return; + + regulator_bulk_disable(sp->supplies_cnt, sp->supplies); +} + static void exynos_pcie_sideband_dbi_w_mode(struct samsung_pcie *sp, bool on) { u32 val; @@ -281,6 +312,24 @@ static const struct dw_pcie_host_ops exynos_pcie_host_ops = { .host_init = exynos_pcie_host_init, }; +static int exynos_init_regulator(struct samsung_pcie *sp) +{ + struct device *dev = sp->pci.dev; + + sp->supplies_cnt = 2; + + sp->supplies = devm_kcalloc(dev, sp->supplies_cnt, + sizeof(*sp->supplies), + GFP_KERNEL); + if (!sp->supplies) + return -ENOMEM; + + sp->supplies[0].supply = "vdd18"; + sp->supplies[1].supply = "vdd10"; + + return 0; +} + static int exynos_irq_init(struct samsung_pcie *sp, struct platform_device *pdev) { @@ -313,6 +362,7 @@ static const struct dw_pcie_ops exynos_dw_pcie_ops = { }; static const struct samsung_res_ops exynos_res_ops_data = { + .init_regulator = exynos_init_regulator, .irq_init = exynos_irq_init, }; @@ -346,16 +396,15 @@ static int samsung_pcie_probe(struct platform_device *pdev) if (ret < 0) return ret; - sp->supplies[0].supply = "vdd18"; - sp->supplies[1].supply = "vdd10"; - ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(sp->supplies), - sp->supplies); - if (ret) - return ret; + if (pdata->res_ops && pdata->res_ops->init_regulator) { + ret = sp->pdata->res_ops->init_regulator(sp); + if (ret) + goto fail_regulator; + } - ret = regulator_bulk_enable(ARRAY_SIZE(sp->supplies), sp->supplies); + ret = samsung_regulator_enable(sp); if (ret) - return ret; + goto fail_regulator; platform_set_drvdata(pdev, sp); @@ -372,7 +421,8 @@ static int samsung_pcie_probe(struct platform_device *pdev) fail_probe: phy_exit(sp->phy); - regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); + samsung_regulator_disable(sp); +fail_regulator: samsung_pcie_deinit_clk_resources(sp); return ret; @@ -387,8 +437,7 @@ static int __exit samsung_pcie_remove(struct platform_device *pdev) phy_power_off(sp->phy); phy_exit(sp->phy); samsung_pcie_deinit_clk_resources(sp); - regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); - + samsung_regulator_disable(sp); return 0; } @@ -399,7 +448,7 @@ static int samsung_pcie_suspend_noirq(struct device *dev) exynos_pcie_assert_core_reset(sp); phy_power_off(sp->phy); phy_exit(sp->phy); - regulator_bulk_disable(ARRAY_SIZE(sp->supplies), sp->supplies); + samsung_regulator_disable(sp); return 0; } @@ -411,7 +460,7 @@ static int samsung_pcie_resume_noirq(struct device *dev) struct dw_pcie_rp *pp = &pci->pp; int ret; - ret = regulator_bulk_enable(ARRAY_SIZE(sp->supplies), sp->supplies); + ret = samsung_regulator_enable(sp); if (ret) return ret;