From: Serge Semin <fancer.lancer@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Serge Semin" <Sergey.Semin@baikalelectronics.ru>,
"Rob Herring" <robh+dt@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"Cai Huoqing" <cai.huoqing@linux.dev>,
"Robin Murphy" <robin.murphy@arm.com>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Alexey Malahov" <Alexey.Malahov@baikalelectronics.ru>,
"Pavel Parkhomenko" <Pavel.Parkhomenko@baikalelectronics.ru>,
"Frank Li" <Frank.Li@nxp.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
caihuoqing <caihuoqing@baidu.com>,
"Vinod Koul" <vkoul@kernel.org>,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 17/20] PCI: dwc: Introduce generic resources getter
Date: Sun, 27 Nov 2022 04:10:05 +0300 [thread overview]
Message-ID: <20221127011005.cjzcd6slb6ezy7ix@mobilestation> (raw)
In-Reply-To: <20221123194436.GA277209@bhelgaas>
Hi Bjorn,
On Wed, Nov 23, 2022 at 01:44:36PM -0600, Bjorn Helgaas wrote:
> Hi Serge,
>
> On Sun, Nov 13, 2022 at 10:12:58PM +0300, Serge Semin wrote:
> > Currently the DW PCIe Root Port and Endpoint CSR spaces are retrieved in
> > the separate parts of the DW PCIe core driver. It doesn't really make
> > sense since the both controller types have identical set of the core CSR
> > regions: DBI, DBI CS2 and iATU/eDMA. Thus we can simplify the DW PCIe Host
> > and EP initialization methods by moving the platform-specific registers
> > space getting and mapping into a common method. It gets to be even more
> > justified seeing the CSRs base address pointers are preserved in the
> > common DW PCIe descriptor. Note all the OF-based common DW PCIe settings
> > initialization will be moved to the new method too in order to have a
> > single function for all the generic platform properties handling in single
> > place.
> >
> > A nice side-effect of this change is that the pcie-designware-host.c and
> > pcie-designware-ep.c drivers are cleaned up from all the direct dw_pcie
> > storage modification, which makes the DW PCIe core, Root Port and Endpoint
> > modules more coherent.
>
> Thanks for these new generic interfaces in the DWC core! And thanks
> for the changes in this patch to take advantage of them in the
> pcie-designware drivers.
>
> Do you plan similar changes to other drivers to take advantage of
> these DWC-generic data and interfaces? If you add generic things to
> the DWC core but only take advantage of them in your driver, I don't
> think they are really usefully generic.
Could you be more specific what generic things you are referring to? I
am asking because the only part of the changes which is used in my
low-level driver only is introduced in another patch of this series.
It's
< [PATCH v7 19/20] PCI: dwc: Introduce generic platform clocks and resets
The new clock/reset request interface has been implemented the way it
is due to reasons I in details described to Rob here:
Link: https://lore.kernel.org/linux-pci/20220520160246.guczq52v2ycfgc6c@mobilestation
To cut it short it can't be used by the most of the already available
low-level drivers since they already have their own versions of the
names for the clock and reset resources (or don't have any name
defined at all). The only driver for which the interface could be
utilized is Toshiba Visconti PCIe host controller driver. The device
DT-bindings defines the clock names matching the generic names
introduced in the patches of this series. If you find it appropriate
enough I can provide a patch for that driver.
Note the main goal of the patch
[PATCH v7 19/20] PCI: dwc: Introduce generic platform clocks and resets
was to create some interface to stop the developers of the new drivers
from creating the platform-specific DT-bindings to the same clock and
reset resources. Since the already defined DT-bindings can't be
changed anyway I don't think it would worth risking to catch
regressions on an attempt to provide a more complicated interface
utilized in the old drivers too.
-Serge(y)
>
> Bjorn
next prev parent reply other threads:[~2022-11-27 1:10 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 19:12 [PATCH v7 00/20] PCI: dwc: Add generic resources and Baikal-T1 support Serge Semin
2022-11-13 19:12 ` [PATCH v7 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Serge Semin
2022-11-14 0:06 ` Rob Herring
2022-11-14 11:51 ` Serge Semin
2022-11-16 20:38 ` Rob Herring
2022-11-17 7:43 ` Serge Semin
2022-11-17 7:59 ` Serge Semin
2022-11-13 19:12 ` [PATCH v7 02/20] dt-bindings: visconti-pcie: Fix interrupts array max constraints Serge Semin
2022-11-13 19:12 ` [PATCH v7 03/20] dt-bindings: PCI: dwc: Detach common RP/EP DT bindings Serge Semin
2022-11-13 19:12 ` [PATCH v7 04/20] dt-bindings: PCI: dwc: Remove bus node from the examples Serge Semin
2022-11-13 19:12 ` [PATCH v7 05/20] dt-bindings: PCI: dwc: Add phys/phy-names common properties Serge Semin
2022-11-13 19:12 ` [PATCH v7 06/20] dt-bindings: PCI: dwc: Add max-link-speed common property Serge Semin
2022-11-13 19:12 ` [PATCH v7 07/20] dt-bindings: PCI: dwc: Apply generic schema for generic device only Serge Semin
2022-11-13 19:12 ` [PATCH v7 08/20] dt-bindings: PCI: dwc: Add max-functions EP property Serge Semin
2022-11-13 19:12 ` [PATCH v7 09/20] dt-bindings: PCI: dwc: Add interrupts/interrupt-names common properties Serge Semin
2022-11-13 19:12 ` [PATCH v7 10/20] dt-bindings: PCI: dwc: Add reg/reg-names " Serge Semin
2022-11-13 19:12 ` [PATCH v7 11/20] dt-bindings: PCI: dwc: Add clocks/resets " Serge Semin
2022-11-13 19:12 ` [PATCH v7 12/20] dt-bindings: PCI: dwc: Add dma-coherent property Serge Semin
2022-11-13 19:12 ` [PATCH v7 13/20] dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes Serge Semin
2022-11-13 19:12 ` [PATCH v7 14/20] dt-bindings: PCI: dwc: Add Baikal-T1 PCIe Root Port bindings Serge Semin
2022-11-13 19:12 ` [PATCH v7 15/20] PCI: dwc: Introduce dma-ranges property support for RC-host Serge Semin
2022-11-14 6:39 ` Manivannan Sadhasivam
2022-11-14 8:32 ` Serge Semin
2022-11-14 17:57 ` Manivannan Sadhasivam
2022-11-15 14:17 ` Serge Semin
2022-11-13 19:12 ` [PATCH v7 16/20] PCI: dwc: Introduce generic controller capabilities interface Serge Semin
2022-11-14 6:42 ` Manivannan Sadhasivam
2022-11-13 19:12 ` [PATCH v7 17/20] PCI: dwc: Introduce generic resources getter Serge Semin
2022-11-14 6:46 ` Manivannan Sadhasivam
2022-11-14 8:39 ` Serge Semin
2022-11-14 17:59 ` Manivannan Sadhasivam
2022-11-23 19:44 ` Bjorn Helgaas
2022-11-27 1:10 ` Serge Semin [this message]
2022-11-29 18:35 ` Bjorn Helgaas
2022-11-30 0:07 ` Serge Semin
2022-11-13 19:12 ` [PATCH v7 18/20] PCI: dwc: Combine iATU detection procedures Serge Semin
2022-11-14 6:49 ` Manivannan Sadhasivam
2022-11-13 19:13 ` [PATCH v7 19/20] PCI: dwc: Introduce generic platform clocks and resets Serge Semin
2022-11-14 7:01 ` Manivannan Sadhasivam
2022-11-14 9:37 ` Serge Semin
2022-11-14 18:01 ` Manivannan Sadhasivam
2022-11-13 19:13 ` [PATCH v7 20/20] PCI: dwc: Add Baikal-T1 PCIe controller support Serge Semin
2022-11-14 7:31 ` Manivannan Sadhasivam
2022-11-14 11:20 ` Serge Semin
2022-11-14 18:11 ` Manivannan Sadhasivam
2022-11-15 16:26 ` Serge Semin
2022-11-23 15:09 ` [PATCH v7 00/20] PCI: dwc: Add generic resources and Baikal-T1 support Lorenzo Pieralisi
2022-11-25 12:58 ` Serge Semin
2022-11-25 20:22 ` Serge Semin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221127011005.cjzcd6slb6ezy7ix@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=Alexey.Malahov@baikalelectronics.ru \
--cc=Frank.Li@nxp.com \
--cc=Pavel.Parkhomenko@baikalelectronics.ru \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=bhelgaas@google.com \
--cc=cai.huoqing@linux.dev \
--cc=caihuoqing@baidu.com \
--cc=devicetree@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=helgaas@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).