Message ID | 20230214121333.1837-1-shradha.t@samsung.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2994105wrn; Tue, 14 Feb 2023 06:09:59 -0800 (PST) X-Google-Smtp-Source: AK7set/Xak6Tv6LZQedRUvKJfoF+oIpMfS7vVv+Jnwj7GTxvpcaJCCFFq2sVzLUAE7CWfbrQfzrV X-Received: by 2002:a05:6a20:9388:b0:bc:3537:34a4 with SMTP id x8-20020a056a20938800b000bc353734a4mr2443855pzh.39.1676383799658; Tue, 14 Feb 2023 06:09:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676383799; cv=none; d=google.com; s=arc-20160816; b=bBl67THXB2GNEwHBToJR1iZYCZDXQAubik+RrcHpWqs4kByuBrRk7zW0pVNuSiHx4G gcyxqS8TMzcKotkDGkArQZ1X7BT1tSjWG/WKZIXv/wq3d/v1z+cfLI1yCEpoP3u+LtV1 SU5Ha6nrv/ilTeHdCCPg2F8FHoC8dew/AJgrR1kpA9QaKykYjkG1usmd72TmFj10kgNi 9JEPKELNMRkCEE1miWKVPVDqkLSvgCbY6oIhLlbRhlCNGMdWf2dxVskQbXJf8VP34zL5 hVjZExa4YDnOnAiMQlyAEF7jynq1M+ndUqK9bNmARO6v3xV5B2ZmFRhoAGmmbyTmFlHy q2uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=SdNM4Tz3fLK6Ln86MZGGxK52Puw9N/dkEq+z+0rNYYs=; b=eYetpnhY5uNjV1SAF/UfNsv9PPomXjbPCWt95io+z9bRdeIZG8evWiK0zZXgjmv8Yz dRpcme+vEO7UrR7pIh/16IvrLCaikpfjeo7Bs3KwLScy6VYd2ytxu/6nG939ir73d5F8 5/dEEotPdxw/zaqISNYPt0EGndpATRd4zcVEIXUNosRiON9s5DNU2ra0xDYP1GlZacB+ IoXzFRoi/ItI6YZd9mAMkGd3d273r3woa2YcE1oaeoqI+zQrfMi15BRbxowwsJzRlFMm 9iKWXYpG5szzLl7V2k5xgj7OGIrHi7ujCozDp58jAunjCamnh0LEnNV6Fi5mf+pDgc6l utzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rVpQ4dCy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i193-20020a639dca000000b004fb3c246af5si13790766pgd.274.2023.02.14.06.09.47; Tue, 14 Feb 2023 06:09:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rVpQ4dCy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233232AbjBNOHM (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 09:07:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233218AbjBNOHD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 09:07:03 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F212298DC for <linux-kernel@vger.kernel.org>; Tue, 14 Feb 2023 06:06:27 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230214140623epoutp032cd01c45b12ec5922c8e46feeb4308ed~DtfymZoSY1709717097epoutp03Y for <linux-kernel@vger.kernel.org>; Tue, 14 Feb 2023 14:06:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230214140623epoutp032cd01c45b12ec5922c8e46feeb4308ed~DtfymZoSY1709717097epoutp03Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1676383583; bh=SdNM4Tz3fLK6Ln86MZGGxK52Puw9N/dkEq+z+0rNYYs=; h=From:To:Cc:Subject:Date:References:From; b=rVpQ4dCyVQpQ1VGxOQ2VRgfvyfdjz/aMTYhbFv6XEHClKh0tVOFPEagnQASzkXQlN CooupJPKCAtkeq1pRAQntceFH2J/7pMyyB/Pofzq+lmkaXKXyIiWeahodfvguEbeR5 BZ3SqJ+TP94pzBDMEU0Qwf7iY02eEKbnnnp9cg+c= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230214140622epcas5p4f151af96adc5d416d4f57d74b9082c83~DtfyAKCzc3228232282epcas5p4B; Tue, 14 Feb 2023 14:06:22 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.182]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4PGNKn1xpWz4x9Pp; Tue, 14 Feb 2023 14:06:21 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 39.EF.55678.D559BE36; Tue, 14 Feb 2023 23:06:21 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20230214121348epcas5p48a3b2b225f616d748cc20622d01edb97~Dr9gG5u4l0767707677epcas5p4b; Tue, 14 Feb 2023 12:13:48 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230214121348epsmtrp2dc813dcaf173070dfd350293e1cd2916~Dr9gF-WY01865118651epsmtrp2J; Tue, 14 Feb 2023 12:13:48 +0000 (GMT) X-AuditID: b6c32a4a-909fc7000000d97e-d3-63eb955d2f17 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 2A.EA.17995.CFA7BE36; Tue, 14 Feb 2023 21:13:48 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230214121345epsmtip126bd4d57eb7bd902e5958cb92e11db8d~Dr9dRniJT2436024360epsmtip1d; Tue, 14 Feb 2023 12:13:45 +0000 (GMT) From: Shradha Todi <shradha.t@samsung.com> 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 <shradha.t@samsung.com> Subject: [PATCH 00/16] Refactor Exynos PCIe driver to make it generic Date: Tue, 14 Feb 2023 17:43:17 +0530 Message-Id: <20230214121333.1837-1-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEJsWRmVeSWpSXmKPExsWy7bCmpm7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2WtTjdfubo2hM+r1dYv/P18ey6dzgt+GqqnpLHo+RHx5/P UL6X/TLwsLpP3i3228E61+9Hp2UqzU+c7LXgzYXmWyXKJ5yLmzprpb/v2FokJH5ndYZFbq+1 99+dUh/EN/29JcyVJ/hAuD0g4ZTVv1/SLnlXEvMfvzimmH3br/fuI/WzSizFGYmGWsxFxYkA kfOhw/ECAAA= X-CMS-MailID: 20230214121348epcas5p48a3b2b225f616d748cc20622d01edb97 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230214121348epcas5p48a3b2b225f616d748cc20622d01edb97 References: <CGME20230214121348epcas5p48a3b2b225f616d748cc20622d01edb97@epcas5p4.samsung.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757815818834934257?= X-GMAIL-MSGID: =?utf-8?q?1757815818834934257?= |
Series |
Refactor Exynos PCIe driver to make it generic
|
|
Message
Shradha Todi
Feb. 14, 2023, 12:13 p.m. UTC
Currently pci-exynos is being used as a PCIe driver for Exynos5433 only. This patch set refactors the driver to make it extensible to other Samsung manufactured SoCs having DWC PCIe controllers. The major change points are: - Renaming all common functions/structures to use "samsung" instead of "exynos". Make common probe/remove/suspend/resume - Making clock/regulator get/enable/disable generic - Adding private struct to hold platform specific function ops Shradha Todi (16): dt-bindings: PCI: Rename Exynos PCIe binding to Samsung PCIe PCI: exynos: Rename Exynos PCIe driver to Samsung PCIe PCI: samsung: Change macro names to exynos specific PCI: samsung: Use clock bulk API to get clocks dt-bindings: PCI: Rename the term elbi to appl arm64: dts: exynos: Rename the term elbi to appl PCI: samsung: Rename the term elbi to appl PCI: samsung: Rename exynos_pcie to samsung_pcie PCI: samsung: Make common appl readl/writel functions dt-bindings: PCI: Add phy-names as required property arm64: dts: exynos: Add phy-names as DT property PCI: samsung: Get PHY using non-DT version PCI: samsung: Rename common functions to samsung PCI: samsung: Add platform device private data PCI: samsung: Add structure to hold resource operations PCI: samsung: Make handling of regulators generic ...ung,exynos-pcie.yaml => samsung,pcie.yaml} | 15 +- MAINTAINERS | 4 +- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 3 +- drivers/pci/controller/dwc/Kconfig | 6 +- drivers/pci/controller/dwc/Makefile | 2 +- drivers/pci/controller/dwc/pci-samsung.c | 508 ++++++++++++++++++ 6 files changed, 526 insertions(+), 12 deletions(-) rename Documentation/devicetree/bindings/pci/{samsung,exynos-pcie.yaml => samsung,pcie.yaml} (89%) create mode 100644 drivers/pci/controller/dwc/pci-samsung.c
Comments
On 14/02/2023 13:13, Shradha Todi wrote: > Currently pci-exynos is being used as a PCIe driver for Exynos5433 > only. This patch set refactors the driver to make it extensible to > other Samsung manufactured SoCs having DWC PCIe controllers. > The major change points are: > - Renaming all common functions/structures to use "samsung" instead > of "exynos". Make common probe/remove/suspend/resume > - Making clock/regulator get/enable/disable generic > - Adding private struct to hold platform specific function ops Thanks for the work. I appreciate it. Some comments in individual patches. Best regards, Krzysztof
Hi Shradha On Tue, Feb 14, 2023 at 05:43:17PM +0530, Shradha Todi wrote: > Currently pci-exynos is being used as a PCIe driver for Exynos5433 > only. This patch set refactors the driver to make it extensible to > other Samsung manufactured SoCs having DWC PCIe controllers. > The major change points are: > - Renaming all common functions/structures to use "samsung" instead > of "exynos". Make common probe/remove/suspend/resume > - Making clock/regulator get/enable/disable generic > - Adding private struct to hold platform specific function ops Just a general note regarding the DT-bindings. If you're willing to fix some names or most importantly add new ones please follow as much as possible to the generic interface defined in the common part of the DW PCIe bindings schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml for instance the generic "reg-names" are "elbi" or "app" defined for the application-dependent registers map (normally implemented via the ELBI interface in hardware), the "appl" name is marked as vendor-specific and should be avoided. -Serge(y) > > Shradha Todi (16): > dt-bindings: PCI: Rename Exynos PCIe binding to Samsung PCIe > PCI: exynos: Rename Exynos PCIe driver to Samsung PCIe > PCI: samsung: Change macro names to exynos specific > PCI: samsung: Use clock bulk API to get clocks > dt-bindings: PCI: Rename the term elbi to appl > arm64: dts: exynos: Rename the term elbi to appl > PCI: samsung: Rename the term elbi to appl > PCI: samsung: Rename exynos_pcie to samsung_pcie > PCI: samsung: Make common appl readl/writel functions > dt-bindings: PCI: Add phy-names as required property > arm64: dts: exynos: Add phy-names as DT property > PCI: samsung: Get PHY using non-DT version > PCI: samsung: Rename common functions to samsung > PCI: samsung: Add platform device private data > PCI: samsung: Add structure to hold resource operations > PCI: samsung: Make handling of regulators generic > > ...ung,exynos-pcie.yaml => samsung,pcie.yaml} | 15 +- > MAINTAINERS | 4 +- > arch/arm64/boot/dts/exynos/exynos5433.dtsi | 3 +- > drivers/pci/controller/dwc/Kconfig | 6 +- > drivers/pci/controller/dwc/Makefile | 2 +- > drivers/pci/controller/dwc/pci-samsung.c | 508 ++++++++++++++++++ > 6 files changed, 526 insertions(+), 12 deletions(-) > rename Documentation/devicetree/bindings/pci/{samsung,exynos-pcie.yaml => samsung,pcie.yaml} (89%) > create mode 100644 drivers/pci/controller/dwc/pci-samsung.c > > -- > 2.17.1 > >