[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190618142821.GC9002@e121166-lin.cambridge.arm.com>
Date: Tue, 18 Jun 2019 15:28:21 +0100
From: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To: Vidya Sagar <vidyas@...dia.com>
Cc: jingoohan1@...il.com, gustavo.pimentel@...opsys.com,
bhelgaas@...gle.com, Jisheng.Zhang@...aptics.com,
thierry.reding@...il.com, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, kthota@...dia.com,
mmaddireddy@...dia.com, sagar.tv@...il.com, kishon@...com
Subject: Re: [PATCH V4 1/2] PCI: dwc: Add API support to de-initialize host
On Tue, Jun 18, 2019 at 04:21:17PM +0530, Vidya Sagar wrote:
[...]
> > 2) It is not related to this patch but I fail to see the reasoning
> > behind the __ in __dw_pci_read_dbi(), there is no no-underscore
> > equivalent so its definition is somewhat questionable, maybe
> > we should clean-it up (for dbi2 alike).
> Separate no-underscore versions are present in pcie-designware.h for
> each width (i.e. l/w/b) as inline and are calling __ versions passing
> size as argument.
I understand - the __ prologue was added in b50b2db266d8 maybe
Kishon can help us understand the __ rationale.
I am happy to merge it as is, I was just curious about the
__ annotation (not related to this patch).
Lorenzo
> > Lorenzo
> >
> > > Thanks,
> > > Vidya Sagar
> > >
> > > >
> > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Lorenzo
> > > > > > > > >
> > > > > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> > > > > > > > > > index 77db32529319..d069e4290180 100644
> > > > > > > > > > --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> > > > > > > > > > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> > > > > > > > > > @@ -496,6 +496,14 @@ int dw_pcie_host_init(struct pcie_port *pp)
> > > > > > > > > > return ret;
> > > > > > > > > > }
> > > > > > > > > > +void dw_pcie_host_deinit(struct pcie_port *pp)
> > > > > > > > > > +{
> > > > > > > > > > + pci_stop_root_bus(pp->root_bus);
> > > > > > > > > > + pci_remove_root_bus(pp->root_bus);
> > > > > > > > > > + if (pci_msi_enabled() && !pp->ops->msi_host_init)
> > > > > > > > > > + dw_pcie_free_msi(pp);
> > > > > > > > > > +}
> > > > > > > > > > +
> > > > > > > > > > static int dw_pcie_access_other_conf(struct pcie_port *pp, struct pci_bus *bus,
> > > > > > > > > > u32 devfn, int where, int size, u32 *val,
> > > > > > > > > > bool write)
> > > > > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
> > > > > > > > > > index deab426affd3..4f48ec78c7b9 100644
> > > > > > > > > > --- a/drivers/pci/controller/dwc/pcie-designware.h
> > > > > > > > > > +++ b/drivers/pci/controller/dwc/pcie-designware.h
> > > > > > > > > > @@ -348,6 +348,7 @@ void dw_pcie_msi_init(struct pcie_port *pp);
> > > > > > > > > > void dw_pcie_free_msi(struct pcie_port *pp);
> > > > > > > > > > void dw_pcie_setup_rc(struct pcie_port *pp);
> > > > > > > > > > int dw_pcie_host_init(struct pcie_port *pp);
> > > > > > > > > > +void dw_pcie_host_deinit(struct pcie_port *pp);
> > > > > > > > > > int dw_pcie_allocate_domains(struct pcie_port *pp);
> > > > > > > > > > #else
> > > > > > > > > > static inline irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
> > > > > > > > > > @@ -372,6 +373,10 @@ static inline int dw_pcie_host_init(struct pcie_port *pp)
> > > > > > > > > > return 0;
> > > > > > > > > > }
> > > > > > > > > > +static inline void dw_pcie_host_deinit(struct pcie_port *pp)
> > > > > > > > > > +{
> > > > > > > > > > +}
> > > > > > > > > > +
> > > > > > > > > > static inline int dw_pcie_allocate_domains(struct pcie_port *pp)
> > > > > > > > > > {
> > > > > > > > > > return 0;
> > > > > > > > > > --
> > > > > > > > > > 2.17.1
> > > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
>
Powered by blists - more mailing lists