2020-11-20 11:20:10

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH dwc-next v2 0/2] PCI: dwc: remove useless dw_pcie_ops

Some designware based device driver especially host only driver may
work well with the default read_dbi/write_dbi/link_up implementation
in pcie-designware.c, thus remove the assumption to simplify those
drivers.

Since v1:
- rebase to the latest dwc-next

Jisheng Zhang (2):
PCI: dwc: Don't assume the ops in dw_pcie always exists
PCI: dwc: al: Remove useless dw_pcie_ops

drivers/pci/controller/dwc/pcie-al.c | 4 ----
drivers/pci/controller/dwc/pcie-designware-ep.c | 8 +++-----
drivers/pci/controller/dwc/pcie-designware-host.c | 2 +-
drivers/pci/controller/dwc/pcie-designware.c | 14 +++++++-------
4 files changed, 11 insertions(+), 17 deletions(-)

--
2.29.2


2020-11-20 11:22:39

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH dwc-next v2 2/2] PCI: dwc: al: Remove useless dw_pcie_ops

We have removed the dw_pcie_ops always exists assumption in dwc
core driver, we can remove the useless dw_pcie_ops now.

Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/pci/controller/dwc/pcie-al.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-al.c b/drivers/pci/controller/dwc/pcie-al.c
index 7ac8a37d9ce0..36977c48a7ae 100644
--- a/drivers/pci/controller/dwc/pcie-al.c
+++ b/drivers/pci/controller/dwc/pcie-al.c
@@ -322,9 +322,6 @@ static const struct dw_pcie_host_ops al_pcie_host_ops = {
.host_init = al_pcie_host_init,
};

-static const struct dw_pcie_ops dw_pcie_ops = {
-};
-
static int al_pcie_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -342,7 +339,6 @@ static int al_pcie_probe(struct platform_device *pdev)
return -ENOMEM;

pci->dev = dev;
- pci->ops = &dw_pcie_ops;
pci->pp.ops = &al_pcie_host_ops;

al_pcie->pci = pci;
--
2.29.2

2021-01-25 21:06:13

by Chocron, Jonathan

[permalink] [raw]
Subject: Re: [PATCH dwc-next v2 2/2] PCI: dwc: al: Remove useless dw_pcie_ops

On Fri, 2020-11-20 at 19:17 +0800, Jisheng Zhang wrote:
> CAUTION: This email originated from outside of the organization. Do
> not click links or open attachments unless you can confirm the sender
> and know the content is safe.
>
>
>
> We have removed the dw_pcie_ops always exists assumption in dwc
> core driver, we can remove the useless dw_pcie_ops now.
>
> Signed-off-by: Jisheng Zhang <[email protected]>
> ---
> drivers/pci/controller/dwc/pcie-al.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-al.c
> b/drivers/pci/controller/dwc/pcie-al.c
> index 7ac8a37d9ce0..36977c48a7ae 100644
> --- a/drivers/pci/controller/dwc/pcie-al.c
> +++ b/drivers/pci/controller/dwc/pcie-al.c
> @@ -322,9 +322,6 @@ static const struct dw_pcie_host_ops
> al_pcie_host_ops = {
> .host_init = al_pcie_host_init,
> };
>
> -static const struct dw_pcie_ops dw_pcie_ops = {
> -};
> -
> static int al_pcie_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -342,7 +339,6 @@ static int al_pcie_probe(struct platform_device
> *pdev)
> return -ENOMEM;
>
> pci->dev = dev;
> - pci->ops = &dw_pcie_ops;
> pci->pp.ops = &al_pcie_host_ops;
>
> al_pcie->pci = pci;
> --
> 2.29.2
>

Acked-by: Jonathan Chocron <[email protected]>


Thanks,
Jonathan

2021-01-26 01:45:13

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: [PATCH dwc-next v2 0/2] PCI: dwc: remove useless dw_pcie_ops

On Fri, Nov 20, 2020 at 07:16:11PM +0800, Jisheng Zhang wrote:
> Some designware based device driver especially host only driver may
> work well with the default read_dbi/write_dbi/link_up implementation
> in pcie-designware.c, thus remove the assumption to simplify those
> drivers.
>
> Since v1:
> - rebase to the latest dwc-next
>
> Jisheng Zhang (2):
> PCI: dwc: Don't assume the ops in dw_pcie always exists
> PCI: dwc: al: Remove useless dw_pcie_ops
>
> drivers/pci/controller/dwc/pcie-al.c | 4 ----
> drivers/pci/controller/dwc/pcie-designware-ep.c | 8 +++-----
> drivers/pci/controller/dwc/pcie-designware-host.c | 2 +-
> drivers/pci/controller/dwc/pcie-designware.c | 14 +++++++-------
> 4 files changed, 11 insertions(+), 17 deletions(-)

Would you mind rebasing it against my current pci/dwc branch please ?

I shall apply it then.

Thanks,
Lorenzo