mbox series

[RFT,0/4] pci: add common Designware PCIe functions and support Amlogic Meson PCIe controller

Message ID 20210322091812.2511462-1-narmstrong@baylibre.com
Headers show
Series pci: add common Designware PCIe functions and support Amlogic Meson PCIe controller | expand

Message

Neil Armstrong March 22, 2021, 9:18 a.m. UTC
With the introduction of pcie_dw_rockchip, and need to support the DW PCIe in the
Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated.

This introduce a "common" DW PCIe helpers file with common code merged from the
dw_ti and dw_rockchip drivers and adapted to fit with the upcoming dw_meson.

The following changes will switch the dw_ti and dw_rockchip, and introduce a new
driver to support the Amlogic AXG & G12 SoCs using these new common helpers.

The dw_meson has been validated, but the dw_ti and dw_rockchip would need testing
on hardware to validate nothing has been broken.

Neil Armstrong (4):
  pci: add common Designware PCIe functions
  pci: pcie_dw_ti: migrate to common Designware PCIe functions
  pci: pcie_dw_rockchip: migrate to common Designware PCIe functions
  pci: add Amlogic Meson Designware PCIe controller

 drivers/pci/Kconfig            |  15 +-
 drivers/pci/Makefile           |   2 +
 drivers/pci/pcie_dw_common.c   | 352 ++++++++++++++++++++++++
 drivers/pci/pcie_dw_common.h   | 153 +++++++++++
 drivers/pci/pcie_dw_meson.c    | 459 ++++++++++++++++++++++++++++++++
 drivers/pci/pcie_dw_rockchip.c | 472 ++-------------------------------
 drivers/pci/pcie_dw_ti.c       | 444 +++----------------------------
 7 files changed, 1046 insertions(+), 851 deletions(-)
 create mode 100644 drivers/pci/pcie_dw_common.c
 create mode 100644 drivers/pci/pcie_dw_common.h
 create mode 100644 drivers/pci/pcie_dw_meson.c

Comments

Shawn Lin March 22, 2021, 9:27 a.m. UTC | #1
Hi Neil,

On 2021/3/22 17:18, Neil Armstrong wrote:
> With the introduction of pcie_dw_rockchip, and need to support the DW PCIe in the
> Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated.
> 
> This introduce a "common" DW PCIe helpers file with common code merged from the
> dw_ti and dw_rockchip drivers and adapted to fit with the upcoming dw_meson.

That's a good idea.

BTW, pcie_dw_mvebu.c and  pcie_imx.c also should need a migration.

> 
> The following changes will switch the dw_ti and dw_rockchip, and introduce a new
> driver to support the Amlogic AXG & G12 SoCs using these new common helpers.
> 
> The dw_meson has been validated, but the dw_ti and dw_rockchip would need testing
> on hardware to validate nothing has been broken.
> 
> Neil Armstrong (4):
>    pci: add common Designware PCIe functions
>    pci: pcie_dw_ti: migrate to common Designware PCIe functions
>    pci: pcie_dw_rockchip: migrate to common Designware PCIe functions
>    pci: add Amlogic Meson Designware PCIe controller
> 
>   drivers/pci/Kconfig            |  15 +-
>   drivers/pci/Makefile           |   2 +
>   drivers/pci/pcie_dw_common.c   | 352 ++++++++++++++++++++++++
>   drivers/pci/pcie_dw_common.h   | 153 +++++++++++
>   drivers/pci/pcie_dw_meson.c    | 459 ++++++++++++++++++++++++++++++++
>   drivers/pci/pcie_dw_rockchip.c | 472 ++-------------------------------
>   drivers/pci/pcie_dw_ti.c       | 444 +++----------------------------
>   7 files changed, 1046 insertions(+), 851 deletions(-)
>   create mode 100644 drivers/pci/pcie_dw_common.c
>   create mode 100644 drivers/pci/pcie_dw_common.h
>   create mode 100644 drivers/pci/pcie_dw_meson.c
>
Neil Armstrong March 22, 2021, 9:30 a.m. UTC | #2
On 22/03/2021 10:27, Shawn Lin wrote:
> Hi Neil,
> 
> On 2021/3/22 17:18, Neil Armstrong wrote:
>> With the introduction of pcie_dw_rockchip, and need to support the DW PCIe in the
>> Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated.
>>
>> This introduce a "common" DW PCIe helpers file with common code merged from the
>> dw_ti and dw_rockchip drivers and adapted to fit with the upcoming dw_meson.
> 
> That's a good idea.
> 
> BTW, pcie_dw_mvebu.c and  pcie_imx.c also should need a migration.

Exact, same for the recently submitted pci_sifive, they should probably wait for a second round

Neil

> 
>>
>> The following changes will switch the dw_ti and dw_rockchip, and introduce a new
>> driver to support the Amlogic AXG & G12 SoCs using these new common helpers.
>>
>> The dw_meson has been validated, but the dw_ti and dw_rockchip would need testing
>> on hardware to validate nothing has been broken.
>>
>> Neil Armstrong (4):
>>    pci: add common Designware PCIe functions
>>    pci: pcie_dw_ti: migrate to common Designware PCIe functions
>>    pci: pcie_dw_rockchip: migrate to common Designware PCIe functions
>>    pci: add Amlogic Meson Designware PCIe controller
>>
>>   drivers/pci/Kconfig            |  15 +-
>>   drivers/pci/Makefile           |   2 +
>>   drivers/pci/pcie_dw_common.c   | 352 ++++++++++++++++++++++++
>>   drivers/pci/pcie_dw_common.h   | 153 +++++++++++
>>   drivers/pci/pcie_dw_meson.c    | 459 ++++++++++++++++++++++++++++++++
>>   drivers/pci/pcie_dw_rockchip.c | 472 ++-------------------------------
>>   drivers/pci/pcie_dw_ti.c       | 444 +++----------------------------
>>   7 files changed, 1046 insertions(+), 851 deletions(-)
>>   create mode 100644 drivers/pci/pcie_dw_common.c
>>   create mode 100644 drivers/pci/pcie_dw_common.h
>>   create mode 100644 drivers/pci/pcie_dw_meson.c
>>
> 
>