Re: [PATCH 1/3] PCI: dwc: Handle host_init failures

2017-07-17 Thread Joao Pinto
gt; goto err; > > - return; > + return 0; > err: > qcom_ep_reset_assert(pcie); > phy_power_off(pcie->phy); > err_deinit: > pcie->ops->deinit(pcie); > + > + return ret; > } > > static int qcom_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, > diff --git a/drivers/pci/dwc/pcie-spear13xx.c > b/drivers/pci/dwc/pcie-spear13xx.c > index 80897291e0fb..52000bc34600 100644 > --- a/drivers/pci/dwc/pcie-spear13xx.c > +++ b/drivers/pci/dwc/pcie-spear13xx.c > @@ -177,13 +177,15 @@ static int spear13xx_pcie_link_up(struct dw_pcie *pci) > return 0; > } > > -static void spear13xx_pcie_host_init(struct pcie_port *pp) > +static int spear13xx_pcie_host_init(struct pcie_port *pp) > { > struct dw_pcie *pci = to_dw_pcie_from_pp(pp); > struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); > > spear13xx_pcie_establish_link(spear13xx_pcie); > spear13xx_pcie_enable_interrupts(spear13xx_pcie); > + > + return 0; > } > > static const struct dw_pcie_host_ops spear13xx_pcie_host_ops = { > A step in the right direction :). In the future we should add host init validation in the specific SoC drivers, like Layerscape and Qcom have, to assure that any problem is treated properly in the core driver. Acked-by: Joao Pinto

Re: [PATCH 11/37] PCI: dwc: Split pcie-designware.c into host and core files

2017-01-16 Thread Joao Pinto
Às 11:30 AM de 1/16/2017, Kishon Vijay Abraham I escreveu: > Hi Joao, > > On Monday 16 January 2017 03:57 PM, Joao Pinto wrote: >> >> Hi, >> >> Às 5:21 AM de 1/16/2017, Kishon Vijay Abraham I escreveu: >>> Hi Joao, >>> >>> On Friday 13

Re: [PATCH 11/37] PCI: dwc: Split pcie-designware.c into host and core files

2017-01-16 Thread Joao Pinto
Hi, Às 5:21 AM de 1/16/2017, Kishon Vijay Abraham I escreveu: > Hi Joao, > > On Friday 13 January 2017 10:19 PM, Joao Pinto wrote: >> Às 10:26 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: >>> Split pcie-designware.c into pcie-designware-host.c that contains >&g

Re: [PATCH 09/37] PCI: dwc: designware: Parse *num-lanes* property in dw_pcie_setup_rc

2017-01-16 Thread Joao Pinto
Hi, Às 5:19 AM de 1/16/2017, Kishon Vijay Abraham I escreveu: > Hi, > > On Friday 13 January 2017 10:43 PM, Joao Pinto wrote: >> Hi, >> >> Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: >>> *num-lanes* dt property is parsed in dw_pcie_host_init.

Re: [PATCH 12/37] PCI: dwc: Create a new config symbol to enable pci dwc host

2017-01-13 Thread Joao Pinto
Hi Kishon, Às 10:26 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > Now that pci designware host has a separate file, create a new > config symbol to select the host only driver. This is in preparation > to enable endpoint support to designware driver. > > Signed-off-by: Kishon Vijay Abraham

Re: [PATCH 07/37] PCI: dwc: designware: Get device pointer at the start of dw_pcie_host_init

2017-01-13 Thread Joao Pinto
Hi! Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > No functional change. Get device pointer at the beginning of > dw_pcie_host_init instead of getting it all over dw_pcie_host_init. > This is in preparation for splitting struct pcie_port into host and > core structures (Once split p

Re: [PATCH 09/37] PCI: dwc: designware: Parse *num-lanes* property in dw_pcie_setup_rc

2017-01-13 Thread Joao Pinto
Hi, Às 10:25 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > *num-lanes* dt property is parsed in dw_pcie_host_init. However > *num-lanes* property is applicable to both root complex mode and > endpoint mode. As a first step, move the parsing of this property > outside dw_pcie_host_init. This

Re: [PATCH 05/37] PCI: dwc: Add platform_set_drvdata

2017-01-13 Thread Joao Pinto
ichard Zhu > Cc: Lucas Stach > Cc: Murali Karicheri > Cc: Minghuan Lian > Cc: Mingkai Hu > Cc: Roy Zang > Cc: Thomas Petazzoni > Cc: Niklas Cassel > Cc: Jesper Nilsson > Cc: Joao Pinto > Cc: Zhou Wang > Cc: Gabriele Paoloni > Cc: Stanimir

Re: [PATCH 11/37] PCI: dwc: Split pcie-designware.c into host and core files

2017-01-13 Thread Joao Pinto
Às 10:26 AM de 1/12/2017, Kishon Vijay Abraham I escreveu: > Split pcie-designware.c into pcie-designware-host.c that contains > the host specific parts of the driver and pcie-designware.c that > contains the parts used by both host driver and endpoint driver. > > Signed-off-by: Kishon Vijay Abrah

Re: [PATCH 06/37] PCI: dwc: Rename cfg_read/cfg_write to read/write

2017-01-13 Thread Joao Pinto
. > This is in preparation for added endpoint support to linux kernel. > > Cc: Jingoo Han > Cc: Murali Karicheri > Cc: Joao Pinto > Cc: Stanimir Varbanov > Cc: Pratyush Anand > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/pci/dwc/pci-dra7xx.c |

Re: [PATCH 10/37] PCI: dwc: designware: Fix style errors in pcie-designware.c

2017-01-13 Thread Joao Pinto
u32 devfn, int where, int size, u32 val) > { > int ret, type; > u32 busdev, cfg_size; > @@ -711,7 +711,7 @@ static int dw_pcie_valid_device(struct pcie_port *pp, > struct pci_bus *bus, > } > > static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, > - int size, u32 *val) > +int size, u32 *val) > { > struct pcie_port *pp = bus->sysdata; > > @@ -727,7 +727,7 @@ static int dw_pcie_rd_conf(struct pci_bus *bus, u32 > devfn, int where, > } > > static int dw_pcie_wr_conf(struct pci_bus *bus, u32 devfn, > - int where, int size, u32 val) > +int where, int size, u32 val) > { > struct pcie_port *pp = bus->sysdata; > > Always good to make clean up! Thanks! Acked-By: Joao Pinto

Re: [PATCH 02/37] PCI: dwc: designware: Add new *ops* for cpu addr fixup

2017-01-13 Thread Joao Pinto
gt; }; > > struct pcie_host_ops { > + u64 (*cpu_addr_fixup)(u64 cpu_addr); > u32 (*readl_rc)(struct pcie_port *pp, u32 reg); > void (*writel_rc)(struct pcie_port *pp, u32 reg, u32 val); > int (*rd_own_conf)(struct pcie_port *pp, int where, int size, u32 *val); > I think this is an acceptable fixup, I am ok with it. Reviewed-By: Joao Pinto Joao

Re: [PATCH 04/37] PCI: dwc: designware: Move the register defines to designware header file

2017-01-13 Thread Joao Pinto
gt; > #include "pcie-designware.h" Make sense. Reviewed-By: Joao Pinto

Re: [PATCH v2] PCI: designware: add host_init error handling

2016-12-07 Thread Joao Pinto
Hi Srinivas! Thanks for the update! Acked-By: Joao Pinto Às 10:32 AM de 12/7/2016, Srinivas Kandagatla escreveu: > This patch add support to return value from host_init() callback from drivers, > so that the designware libary can handle or pass it to proper place. Issue > with >

Re: [RFC PATCH] PCI: designware: add host_init() error handling

2016-12-05 Thread Joao Pinto
Às 11:51 AM de 12/2/2016, Srinivas Kandagatla escreveu: > > > On 02/12/16 10:32, Joao Pinto wrote: >> >> Hi Srinivas, >> >> Às 11:51 AM de 12/1/2016, Srinivas Kandagatla escreveu: >>> drivers/pci/host/pci-dra7xx.c | 4 +++- >>

Re: [RFC PATCH] PCI: designware: add host_init() error handling

2016-12-02 Thread Joao Pinto
Hi Srinivas, Às 11:51 AM de 12/1/2016, Srinivas Kandagatla escreveu: > drivers/pci/host/pci-dra7xx.c | 4 +++- > drivers/pci/host/pci-exynos.c | 4 +++- > drivers/pci/host/pci-imx6.c | 4 +++- > drivers/pci/host/pci-keystone.c | 4 +++- > drivers/pci/h