mbox series

[v6,0/3] Visconti: Add Toshiba Visconti PCIe host controller driver

Message ID 20210811083830.784065-1-nobuhiro1.iwamatsu@toshiba.co.jp
Headers show
Series Visconti: Add Toshiba Visconti PCIe host controller driver | expand

Message

Nobuhiro Iwamatsu Aug. 11, 2021, 8:38 a.m. UTC
Hi,

This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].
This provides DT binding documentation, device driver, MAINTAINER files.

Best regards,
  Nobuhiro

[0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

  dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller
    v5 -> v6:
      - No update.
    v4 -> v5:
      - No update.
    v3 -> v4:
     - Changed the redundant clock name.
    v2 -> v3:
      - No update.
    v1 -> v2:
      - Remove white space.
      - Drop num-viewport and bus-range from required.
      - Drop status line from example.
      - Drop bus-range from required.
      - Removed lines defined in pci-bus.yaml from required.

  PCI: visconti: Add Toshiba Visconti PCIe host controller driver
    v5 -> v6:                                                                                                                                                                                                                                                                                                                         - Remove unnecessary commit log.                                                                                                                                                                                                                                                                                                - Fix split line of visconti_add_pcie_port() 
    v4 -> v5:
      - Remove PCIE_BUS_OFFSET
      - Change link_up confirmation function of visconti_pcie_link_up().
      - Move setting event mask before dw_pcie_link_up().
      - Move the contents of visconti_pcie_power_on() to visconti_pcie_host_init().
      - Remove code for link_gen.
    v3 -> v4:
      - Change variable from pci_addr to cpu_addr in visconti_pcie_cpu_addr_fixup().
      - Change the calculation method of CPU addres from subtraction to mask, and
        add comment.
      - Drop dma_set_mask_and_coherent().
      - Drop set MAX_MSI_IRQS.
      - Drop dev_dbg for Link speed.
      - Use use the dev_err_probe() to handle the devm_clk_get() failed.
      - Changed the redundant clock name.
    v2 -> v3:
      - Update subject.
      - Wrap description in 75 columns.
      - Change config name to PCIE_VISCONTI_HOST.
      - Update Kconfig text.
      - Drop empty lines.
      - Adjusted to 80 columns.
      - Drop inline from functions for register access.
      - Changed function name from visconti_pcie_check_link_status to
        visconti_pcie_link_up.
      - Update to using dw_pcie_host_init().
      - Reorder these in the order of use in visconti_pcie_establish_link().
      - Rewrite visconti_pcie_host_init() without dw_pcie_setup_rc().
      - Change function name from  visconti_device_turnon() to
        visconti_pcie_power_on().
      - Unify formats such as dev_err().
      - Drop error label in visconti_add_pcie_port(). 
    v1 -> v2:
      - Fix typo in commit message.
      - Drop "depends on OF && HAS_IOMEM" from Kconfig.
      - Stop using the pointer of struct dw_pcie.
      - Use _relaxed variant.
      - Drop dw_pcie_wait_for_link.
      - Drop dbi resource processing.
      - Drop MSI IRQ initialization processing.
  
  MAINTAINERS: Add entries for Toshiba Visconti PCIe controller
    v5 -> v6:
      - No update.
    v4 -> v5:
      - No update.
    v3 -> v4:
      - No update.
    v2 -> v3:
      - No update.
    v1 -> v2:
      - No update.

Nobuhiro Iwamatsu (3):
  dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller
  PCI: visconti: Add Toshiba Visconti PCIe host controller driver
  MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

 .../bindings/pci/toshiba,visconti-pcie.yaml   | 110 ++++++
 MAINTAINERS                                   |   2 +
 drivers/pci/controller/dwc/Kconfig            |   9 +
 drivers/pci/controller/dwc/Makefile           |   1 +
 drivers/pci/controller/dwc/pcie-visconti.c    | 333 ++++++++++++++++++
 5 files changed, 455 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml
 create mode 100644 drivers/pci/controller/dwc/pcie-visconti.c

Comments

Rob Herring Aug. 11, 2021, 5:50 p.m. UTC | #1
On Wed, Aug 11, 2021 at 05:38:28PM +0900, Nobuhiro Iwamatsu wrote:
> This commit adds the Device Tree binding documentation that allows
> to describe the PCIe controller found in Toshiba Visconti SoCs.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> 
> v3 -> v4:
>  - Changed the redundant clock name.
> 
> v2 -> v3:
>  - No update.
> 
> v1 -> v2:
>  - Remove white space.
>  - Drop num-viewport and bus-range from required.
>  - Drop status line from example.
>  - Drop bus-range from required.
>  - Removed lines defined in pci-bus.yaml from required.
> ---
>  .../bindings/pci/toshiba,visconti-pcie.yaml   | 110 ++++++++++++++++++
>  1 file changed, 110 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml

I already applied this, why are you sending it again?

Rob
Nobuhiro Iwamatsu Aug. 26, 2021, 4:25 a.m. UTC | #2
Hi,

Do you have any comments on this patch series?
If there is no problem, please apply it into the pci tree.

Best regards,
  Nobuhiro

> -----Original Message-----

> From: Nobuhiro Iwamatsu [mailto:nobuhiro1.iwamatsu@toshiba.co.jp]

> Sent: Wednesday, August 11, 2021 5:38 PM

> To: Bjorn Helgaas <bhelgaas@google.com>; Rob Herring <robh+dt@kernel.org>; Lorenzo Pieralisi

> <lorenzo.pieralisi@arm.com>

> Cc: linux-pci@vger.kernel.org; Krzysztof Wilczyński <kw@linux.com>; Kishon Vijay Abraham I <kishon@ti.com>;

> devicetree@vger.kernel.org; agrawal punit(アグラワル プニト □SWC◯ACT) <punit1.agrawal@toshiba.co.jp>;

> ishikawa yuji(石川 悠司 ○RDC□AITC○EA開) <yuji2.ishikawa@toshiba.co.jp>;

> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT)

> <nobuhiro1.iwamatsu@toshiba.co.jp>

> Subject: [PATCH v6 0/3] Visconti: Add Toshiba Visconti PCIe host controller driver

> 

> Hi,

> 

> This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].

> This provides DT binding documentation, device driver, MAINTAINER files.

> 

> Best regards,

>   Nobuhiro

> 

> [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

> 

>   dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller

>     v5 -> v6:

>       - No update.

>     v4 -> v5:

>       - No update.

>     v3 -> v4:

>      - Changed the redundant clock name.

>     v2 -> v3:

>       - No update.

>     v1 -> v2:

>       - Remove white space.

>       - Drop num-viewport and bus-range from required.

>       - Drop status line from example.

>       - Drop bus-range from required.

>       - Removed lines defined in pci-bus.yaml from required.

> 

>   PCI: visconti: Add Toshiba Visconti PCIe host controller driver

>     v5 -> v6:

> - Remove unnecessary commit log.

> - Fix split line of visconti_add_pcie_port()

>     v4 -> v5:

>       - Remove PCIE_BUS_OFFSET

>       - Change link_up confirmation function of visconti_pcie_link_up().

>       - Move setting event mask before dw_pcie_link_up().

>       - Move the contents of visconti_pcie_power_on() to visconti_pcie_host_init().

>       - Remove code for link_gen.

>     v3 -> v4:

>       - Change variable from pci_addr to cpu_addr in visconti_pcie_cpu_addr_fixup().

>       - Change the calculation method of CPU addres from subtraction to mask, and

>         add comment.

>       - Drop dma_set_mask_and_coherent().

>       - Drop set MAX_MSI_IRQS.

>       - Drop dev_dbg for Link speed.

>       - Use use the dev_err_probe() to handle the devm_clk_get() failed.

>       - Changed the redundant clock name.

>     v2 -> v3:

>       - Update subject.

>       - Wrap description in 75 columns.

>       - Change config name to PCIE_VISCONTI_HOST.

>       - Update Kconfig text.

>       - Drop empty lines.

>       - Adjusted to 80 columns.

>       - Drop inline from functions for register access.

>       - Changed function name from visconti_pcie_check_link_status to

>         visconti_pcie_link_up.

>       - Update to using dw_pcie_host_init().

>       - Reorder these in the order of use in visconti_pcie_establish_link().

>       - Rewrite visconti_pcie_host_init() without dw_pcie_setup_rc().

>       - Change function name from  visconti_device_turnon() to

>         visconti_pcie_power_on().

>       - Unify formats such as dev_err().

>       - Drop error label in visconti_add_pcie_port().

>     v1 -> v2:

>       - Fix typo in commit message.

>       - Drop "depends on OF && HAS_IOMEM" from Kconfig.

>       - Stop using the pointer of struct dw_pcie.

>       - Use _relaxed variant.

>       - Drop dw_pcie_wait_for_link.

>       - Drop dbi resource processing.

>       - Drop MSI IRQ initialization processing.

> 

>   MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

>     v5 -> v6:

>       - No update.

>     v4 -> v5:

>       - No update.

>     v3 -> v4:

>       - No update.

>     v2 -> v3:

>       - No update.

>     v1 -> v2:

>       - No update.

> 

> Nobuhiro Iwamatsu (3):

>   dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller

>   PCI: visconti: Add Toshiba Visconti PCIe host controller driver

>   MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

> 

>  .../bindings/pci/toshiba,visconti-pcie.yaml   | 110 ++++++

>  MAINTAINERS                                   |   2 +

>  drivers/pci/controller/dwc/Kconfig            |   9 +

>  drivers/pci/controller/dwc/Makefile           |   1 +

>  drivers/pci/controller/dwc/pcie-visconti.c    | 333 ++++++++++++++++++

>  5 files changed, 455 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml

>  create mode 100644 drivers/pci/controller/dwc/pcie-visconti.c

> 

> --

> 2.32.0
Rob Herring Aug. 26, 2021, 12:11 p.m. UTC | #3
On Wed, Aug 11, 2021 at 3:38 AM Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@toshiba.co.jp> wrote:
>

> Add support to PCIe RC controller on Toshiba Visconti ARM SoCs. PCIe

> controller is based of Synopsys DesignWare PCIe core.

>

> Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>

> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>

>

> v5 -> v6:

>   - Remove unnecessary commit log.

>   - Fix split line of visconti_add_pcie_port()

>

> v4 -> v5:

>   - Remove PCIE_BUS_OFFSET

>   - Change link_up confirmation function of visconti_pcie_link_up().

>   - Move setting event mask before dw_pcie_link_up().

>   - Move the contents of visconti_pcie_power_on() to visconti_pcie_host_init().

>   - Remove code for link_gen.

>

> v3 -> v4:

>   - Change variable from pci_addr to cpu_addr in visconti_pcie_cpu_addr_fixup().

>   - Change the calculation method of CPU addres from subtraction to mask, and

>     add comment.

>   - Drop dma_set_mask_and_coherent().

>   - Drop set MAX_MSI_IRQS.

>   - Drop dev_dbg for Link speed.

>   - Use use the dev_err_probe() to handle the devm_clk_get() failed.

>   - Changed the redundant clock name.

>

> v2 -> v3:

>   - Update subject.

>   - Wrap description in 75 columns.

>   - Change config name to PCIE_VISCONTI_HOST.

>   - Update Kconfig text.

>   - Drop blank lines.

>   - Adjusted to 80 columns.

>   - Drop inline from functions for register access.

>   - Changed function name from visconti_pcie_check_link_status to

>     visconti_pcie_link_up.

>   - Update to using dw_pcie_host_init().

>   - Reorder these in the order of use in visconti_pcie_establish_link.

>   - Rewrite visconti_pcie_host_init() without dw_pcie_setup_rc().

>   - Change function name from  visconti_device_turnon() to

>     visconti_pcie_power_on().

>   - Unify formats such as dev_err().

>   - Drop error label in visconti_add_pcie_port().

>

> v1 -> v2:

>   - Fix typo in commit message.

>   - Drop "depends on OF && HAS_IOMEM" from Kconfig.

>   - Stop using the pointer of struct dw_pcie.

>   - Use _relaxed variant.

>   - Drop dw_pcie_wait_for_link.

>   - Drop dbi resource processing.

>   - Drop MSI IRQ initialization processing.

> ---

>  drivers/pci/controller/dwc/Kconfig         |   9 +

>  drivers/pci/controller/dwc/Makefile        |   1 +

>  drivers/pci/controller/dwc/pcie-visconti.c | 333 +++++++++++++++++++++

>  3 files changed, 343 insertions(+)

>  create mode 100644 drivers/pci/controller/dwc/pcie-visconti.c


Reviewed-by: Rob Herring <robh@kernel.org>
Lorenzo Pieralisi Aug. 26, 2021, 1:01 p.m. UTC | #4
On Wed, 11 Aug 2021 17:38:27 +0900, Nobuhiro Iwamatsu wrote:
> This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].

> This provides DT binding documentation, device driver, MAINTAINER files.

> 

> Best regards,

>   Nobuhiro

> 

> [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

> 

> [...]


Applied to pci/dwc, thanks!

[1/3] dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller
      https://git.kernel.org/lpieralisi/pci/c/a655ce4000
[2/3] PCI: visconti: Add Toshiba Visconti PCIe host controller driver
      https://git.kernel.org/lpieralisi/pci/c/09436f819c
[3/3] MAINTAINERS: Add entries for Toshiba Visconti PCIe controller
      https://git.kernel.org/lpieralisi/pci/c/34af7aace1

Thanks,
Lorenzo
Nobuhiro Iwamatsu Aug. 26, 2021, 11:49 p.m. UTC | #5
Hi,

> -----Original Message-----

> From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]

> Sent: Thursday, August 26, 2021 10:01 PM

> To: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) <nobuhiro1.iwamatsu@toshiba.co.jp>; Rob Herring

> <robh+dt@kernel.org>; Bjorn Helgaas <bhelgaas@google.com>

> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>; Kishon Vijay Abraham I <kishon@ti.com>; ishikawa yuji(石川 悠司

> ○RDC□AITC○EA開) <yuji2.ishikawa@toshiba.co.jp>; linux-arm-kernel@lists.infradead.org;

> linux-pci@vger.kernel.org; Krzysztof Wilczyński <kw@linux.com>; agrawal punit(アグラワル プニト □SWC◯ACT)

> <punit1.agrawal@toshiba.co.jp>; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org

> Subject: Re: [PATCH v6 0/3] Visconti: Add Toshiba Visconti PCIe host controller driver

> 

> On Wed, 11 Aug 2021 17:38:27 +0900, Nobuhiro Iwamatsu wrote:

> > This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].

> > This provides DT binding documentation, device driver, MAINTAINER files.

> >

> > Best regards,

> >   Nobuhiro

> >

> > [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

> >

> > [...]

> 

> Applied to pci/dwc, thanks!


Thanks! But...
> 

> [1/3] dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller

>       https://git.kernel.org/lpieralisi/pci/c/a655ce4000

> [2/3] PCI: visconti: Add Toshiba Visconti PCIe host controller driver

>       https://git.kernel.org/lpieralisi/pci/c/09436f819c


Only drivers/pci/controller/dwc/Makefile is applied. Could you check this?	

> [3/3] MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

>       https://git.kernel.org/lpieralisi/pci/c/34af7aace1

> 

> Thanks,

> Lorenzo


Best regards,
  Nobuhiro
Lorenzo Pieralisi Aug. 27, 2021, 9:48 a.m. UTC | #6
On Thu, Aug 26, 2021 at 11:49:04PM +0000, nobuhiro1.iwamatsu@toshiba.co.jp wrote:
> Hi,

> 

> > -----Original Message-----

> > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]

> > Sent: Thursday, August 26, 2021 10:01 PM

> > To: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) <nobuhiro1.iwamatsu@toshiba.co.jp>; Rob Herring

> > <robh+dt@kernel.org>; Bjorn Helgaas <bhelgaas@google.com>

> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>; Kishon Vijay Abraham I <kishon@ti.com>; ishikawa yuji(石川 悠司

> > ○RDC□AITC○EA開) <yuji2.ishikawa@toshiba.co.jp>; linux-arm-kernel@lists.infradead.org;

> > linux-pci@vger.kernel.org; Krzysztof Wilczyński <kw@linux.com>; agrawal punit(アグラワル プニト □SWC◯ACT)

> > <punit1.agrawal@toshiba.co.jp>; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org

> > Subject: Re: [PATCH v6 0/3] Visconti: Add Toshiba Visconti PCIe host controller driver

> > 

> > On Wed, 11 Aug 2021 17:38:27 +0900, Nobuhiro Iwamatsu wrote:

> > > This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].

> > > This provides DT binding documentation, device driver, MAINTAINER files.

> > >

> > > Best regards,

> > >   Nobuhiro

> > >

> > > [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

> > >

> > > [...]

> > 

> > Applied to pci/dwc, thanks!

> 

> Thanks! But...

> > 

> > [1/3] dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller

> >       https://git.kernel.org/lpieralisi/pci/c/a655ce4000

> > [2/3] PCI: visconti: Add Toshiba Visconti PCIe host controller driver

> >       https://git.kernel.org/lpieralisi/pci/c/09436f819c

> 

> Only drivers/pci/controller/dwc/Makefile is applied. Could you check this?	


I fixed this. Please don't write patch versions changes in the commit
log - I had to delete those myself, I did not notice while applying
them.

Please let me know if the branch looks OK now.

Lorenzo

> > [3/3] MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

> >       https://git.kernel.org/lpieralisi/pci/c/34af7aace1

> > 

> > Thanks,

> > Lorenzo

> 

> Best regards,

>   Nobuhiro
Nobuhiro Iwamatsu Aug. 28, 2021, 1:14 a.m. UTC | #7
Hi,

On Fri, Aug 27, 2021 at 10:48:15AM +0100, Lorenzo Pieralisi wrote:
> On Thu, Aug 26, 2021 at 11:49:04PM +0000, nobuhiro1.iwamatsu@toshiba.co.jp wrote:

> > Hi,

> > 

> > > -----Original Message-----

> > > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]

> > > Sent: Thursday, August 26, 2021 10:01 PM

> > > To: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) <nobuhiro1.iwamatsu@toshiba.co.jp>; Rob Herring

> > > <robh+dt@kernel.org>; Bjorn Helgaas <bhelgaas@google.com>

> > > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>; Kishon Vijay Abraham I <kishon@ti.com>; ishikawa yuji(石川 悠司

> > > ○RDC□AITC○EA開) <yuji2.ishikawa@toshiba.co.jp>; linux-arm-kernel@lists.infradead.org;

> > > linux-pci@vger.kernel.org; Krzysztof Wilczyński <kw@linux.com>; agrawal punit(アグラワル プニト □SWC◯ACT)

> > > <punit1.agrawal@toshiba.co.jp>; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org

> > > Subject: Re: [PATCH v6 0/3] Visconti: Add Toshiba Visconti PCIe host controller driver

> > > 

> > > On Wed, 11 Aug 2021 17:38:27 +0900, Nobuhiro Iwamatsu wrote:

> > > > This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].

> > > > This provides DT binding documentation, device driver, MAINTAINER files.

> > > >

> > > > Best regards,

> > > >   Nobuhiro

> > > >

> > > > [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

> > > >

> > > > [...]

> > > 

> > > Applied to pci/dwc, thanks!

> > 

> > Thanks! But...

> > > 

> > > [1/3] dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller

> > >       https://git.kernel.org/lpieralisi/pci/c/a655ce4000

> > > [2/3] PCI: visconti: Add Toshiba Visconti PCIe host controller driver

> > >       https://git.kernel.org/lpieralisi/pci/c/09436f819c

> > 

> > Only drivers/pci/controller/dwc/Makefile is applied. Could you check this?	

> 

> I fixed this. Please don't write patch versions changes in the commit

> log - I had to delete those myself, I did not notice while applying

> them.


Sorry about this.

> 

> Please let me know if the branch looks OK now.

> 


Looks good to me.
Thanks for your work.

> Lorenzo

> 

> > > [3/3] MAINTAINERS: Add entries for Toshiba Visconti PCIe controller

> > >       https://git.kernel.org/lpieralisi/pci/c/34af7aace1

> > > 

> > > Thanks,

> > > Lorenzo

> > 


Best regards,
  Nobuhiro
Rob Herring Aug. 30, 2021, 4 p.m. UTC | #8
On Thu, Aug 26, 2021 at 8:01 AM Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
>

> On Wed, 11 Aug 2021 17:38:27 +0900, Nobuhiro Iwamatsu wrote:

> > This series is the PCIe driver for Toshiba's ARM SoC, Visconti[0].

> > This provides DT binding documentation, device driver, MAINTAINER files.

> >

> > Best regards,

> >   Nobuhiro

> >

> > [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html

> >

> > [...]

>

> Applied to pci/dwc, thanks!

>

> [1/3] dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller

>       https://git.kernel.org/lpieralisi/pci/c/a655ce4000


This is already in my tree due to the DW schema conversion.

Rob