Re: [PATCH 1/2] OF/PCI: Export inbound memory interface to PCI RC drivers.

2019-10-01 Thread Bjorn Helgaas
[-cc Oza, bounced] On Mon, Sep 30, 2019 at 11:46:18PM +0200, Marek Vasut wrote: > On 9/30/19 11:40 PM, Bjorn Helgaas wrote: > > This would follow the convention for subject lines: > > > > PCI: OF: Add of_pci_get_dma_ranges() for inbound DMA restrictions > > > &

Re: [PATCH 2/2] PCI/of fix of_dma_get_range; get PCI specific dma-ranges

2019-09-30 Thread Bjorn Helgaas
On Fri, Aug 09, 2019 at 07:34:49PM +0200, marek.va...@gmail.com wrote: > From: Oza Pawandeep > > current device framework and OF framework integration assumes > dma-ranges in a way where memory-mapped devices define their > dma-ranges. (child-bus-address, parent-bus-address, length). "Memory-map

Re: [PATCH 1/2] OF/PCI: Export inbound memory interface to PCI RC drivers.

2019-09-30 Thread Bjorn Helgaas
This would follow the convention for subject lines: PCI: OF: Add of_pci_get_dma_ranges() for inbound DMA restrictions On Fri, Aug 09, 2019 at 07:34:48PM +0200, marek.va...@gmail.com wrote: > From: Oza Pawandeep > > The patch exports interface to PCIe RC drivers so that, > Drivers can get thei

Re: [PATCH] [RFC] PCI: sysfs: Ignore lockdep for remove attribute

2019-06-21 Thread Bjorn Helgaas
On Mon, May 27, 2019 at 12:51:51AM +0200, marek.va...@gmail.com wrote: > From: Marek Vasut > > On ARM64 R-Car Gen3 R8A7795 system with Intel NVMe SSD inserted into the > PCIe slot, with CONFIG_PROVE_LOCKING=y enabled in the kernel config, the > following lockdep warning can be triggered: > > $

Re: [PATCH V3] PCI: rcar: Add the initialization of PCIe link in resume_noirq()

2019-03-28 Thread Bjorn Helgaas
On Thu, Mar 28, 2019 at 03:59:11PM +0100, Geert Uytterhoeven wrote: > On Thu, Mar 28, 2019 at 3:18 PM Bjorn Helgaas wrote: > > On Mon, Mar 25, 2019 at 08:43:19PM +0100, marek.va...@gmail.com wrote: > > > From: Kazufumi Ikeda > > > > > > Reestablish the PCIe l

Re: [PATCH V3] PCI: rcar: Add the initialization of PCIe link in resume_noirq()

2019-03-28 Thread Bjorn Helgaas
On Mon, Mar 25, 2019 at 08:43:19PM +0100, marek.va...@gmail.com wrote: > From: Kazufumi Ikeda > > Reestablish the PCIe link very early in the resume process in case it > went down to prevent PCI accesses from hanging the bus. Such accesses > can happen early in the PCI resume process, as early as

Re: [PATCH V2] PCI: rcar: Add the initialization of PCIe link in resume_noirq

2019-03-08 Thread Bjorn Helgaas
[+cc linux-pm, Rafael for SET_NOIRQ_SYSTEM_SLEEP_PM_OPS question at the end] On Thu, Mar 07, 2019 at 11:49:34PM +0100, Marek Vasut wrote: > On 3/7/19 9:50 PM, Bjorn Helgaas wrote: > > On Sun, Feb 17, 2019 at 02:24:41PM +0100, marek.va...@gmail.com wrote: > >> Fr

Re: [PATCH V2] PCI: rcar: Add the initialization of PCIe link in resume_noirq

2019-03-07 Thread Bjorn Helgaas
On Sun, Feb 17, 2019 at 02:24:41PM +0100, marek.va...@gmail.com wrote: > From: Kazufumi Ikeda > > Reestablish the PCIe link very early in the resume process in case it > went down to prevent PCI accesses from hanging the bus. Such accesses > can happen early in the PCI resume process, in the resu

Re: [RFC][PATCH] PCI: Avoid PCI device removing/rescanning through sysfs triggers a deadlock

2018-11-27 Thread Bjorn Helgaas
[+cc Bart, Tejun] On Tue, Nov 06, 2018 at 12:25:00AM +0100, Marek Vasut wrote: > From: Tho Vu > > This patch fixes deadlock warning in removing/rescanning through sysfs > when CONFIG_PROVE_LOCKING is enabled. > > The issue can be reproduced by these steps: > 1. Enable CONFIG_PROVE_LOCKING via d

Re: [PATCH] pci: fix I/O space page leak

2018-06-28 Thread Bjorn Helgaas
Semiconductor PCI host driver") > Fixes: b7e78170efd4 ("PCI: versatile: Add DT-based ARM Versatile PB PCIe host > driver") > Fixes: 5f6b6ccdbe1c ("PCI: xgene: Add APM X-Gene PCIe driver") > Fixes: 637cfacae96f ("PCI: mediatek: Add MediaTek PCIe host c

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-06-13 Thread Bjorn Helgaas
On Wed, Jun 13, 2018 at 04:52:52PM +0100, Lorenzo Pieralisi wrote: > On Wed, Jun 13, 2018 at 08:53:08AM -0500, Bjorn Helgaas wrote: > > On Wed, Jun 13, 2018 at 01:54:51AM +0200, Marek Vasut wrote: > > > On 06/11/2018 03:59 PM, Bjorn Helgaas wrote: > > > > On Sun, Ju

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-06-13 Thread Bjorn Helgaas
On Wed, Jun 13, 2018 at 01:54:51AM +0200, Marek Vasut wrote: > On 06/11/2018 03:59 PM, Bjorn Helgaas wrote: > > On Sun, Jun 10, 2018 at 03:57:10PM +0200, Marek Vasut wrote: > >> On 11/17/2017 06:49 PM, Lorenzo Pieralisi wrote: > >>> On Fri, Nov 10, 2017 at 10:58

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-06-11 Thread Bjorn Helgaas
On Sun, Jun 10, 2018 at 03:57:10PM +0200, Marek Vasut wrote: > On 11/17/2017 06:49 PM, Lorenzo Pieralisi wrote: > > On Fri, Nov 10, 2017 at 10:58:42PM +0100, Marek Vasut wrote: > >> From: Phil Edworthy > >> > >> Most PCIe host controllers support L0s and L1 power states via ASPM. > >> The R-Car ha

Re: [PATCH 1/4] PCI: rcar: Rename rcar_pcie_parse_request_of_pci_ranges()

2018-05-23 Thread Bjorn Helgaas
On Wed, May 23, 2018 at 07:05:06PM +0200, Marek Vasut wrote: > On 05/23/2018 06:17 PM, Lorenzo Pieralisi wrote: > > On Mon, May 21, 2018 at 03:11:20PM +0200, Marek Vasut wrote: > >> The function name is just too confusing, rename it, no functional change. > >> Rename the function to rcar_pcie_alloc

Re: [PATCH v2] dt-bindings: PCI: rcar: Add device tree support for r8a7743

2018-01-10 Thread Bjorn Helgaas
On Mon, Dec 11, 2017 at 01:30:37PM +, Biju Das wrote: > Hi Bjorn Helgaas, > > Does this patch look okay to you? It's OK by me, but Lorenzo (cc'd) would handle this now. > > -Original Message- > > From: Biju Das [mailto:biju@bp.renesas.com] > >

Re: [PATCH 1/2] PCI: rcar: Fix use-after-free in probe error path

2017-12-12 Thread Bjorn Helgaas
On Thu, Dec 07, 2017 at 11:15:19AM +0100, Geert Uytterhoeven wrote: > If CONFIG_DEBUG_SLAB=y, and no PCIe card is inserted, the kernel crashes > during probe on r8a7791/koelsch: > > rcar-pcie fe00.pcie: PCIe link down > Unable to handle kernel paging request at virtual address 6b6b6b6b

Re: [PATCH 0/2] PCI: rcar: Misc error path fixes

2017-12-12 Thread Bjorn Helgaas
On Thu, Dec 07, 2017 at 11:15:18AM +0100, Geert Uytterhoeven wrote: > Hi Simon, Lorenzo, Bjorn, > > This patch series fixes two issues in the error path for the R-Car PCIe > host bridge driver. > > The first issue is triggered easily by not having a PCIe card inserted, > and may cause a cra

Re: [PATCH] dt-bindings: PCI: rcar: Correct example to match reality

2017-10-20 Thread Bjorn Helgaas
On Wed, Oct 11, 2017 at 03:50:13PM +0200, Geert Uytterhoeven wrote: > Correct the USB subnodes in the example, cfr. commit f7d569c1e6a6fa73 > ("ARM: dts: r8a779x: Fix PCI bus dtc warnings"): > 1. Drop the bogus 'device_type = "pci"' properties, > 2. Correct the unit addresses. > > Update other

Re: [PATCH ] PCI: rcar: Add r8a7743/5 support

2017-08-30 Thread Bjorn Helgaas
On Thu, Aug 24, 2017 at 10:35:44AM +0100, Biju Das wrote: > Add internal PCI bridge support for r8a7743/5 SoC. Renesas RZ/G1[ME] > (R8A7743/5) internal PCI bridge is identical to the R-Car Gen2 family. > > Signed-off-by: Biju Das Applied with Simon's ack to pci/host-rcar, thanks! > --- > This p

Re: [PATCH v2 0/2] PCI: rcar-pcie: Fix memory leak

2017-08-15 Thread Bjorn Helgaas
On Fri, Aug 04, 2017 at 12:32:53PM +0900, Harunobu Kurokawa wrote: > When no PCIe card is inserted, there is a memory leak as > pci_free_resource_list is not called before returning. > > v2: > separate the patch to two files. > > Harunobu Kurokawa (1): > PCI: rcar-pcie: Fix memory leak when no

Re: [PATCH v2 0/2] PCI: rcar-pcie: Fix memory leak

2017-08-14 Thread Bjorn Helgaas
On Fri, Aug 04, 2017 at 12:32:53PM +0900, Harunobu Kurokawa wrote: > When no PCIe card is inserted, there is a memory leak as > pci_free_resource_list is not called before returning. > > v2: > separate the patch to two files. > > Harunobu Kurokawa (1): > PCI: rcar-pcie: Fix memory leak when no

Re: [PATCH] PCI: rcar-gen2: make of_device_ids const

2017-07-02 Thread Bjorn Helgaas
On Fri, Jun 23, 2017 at 02:59:52PM +0530, Arvind Yadav wrote: > of_device_ids are not supposed to change at runtime. All functions > working with of_device_ids provided by work with const > of_device_ids. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav Applied with acks

Re: [PATCH 5/7] pci: use proper name for the R-Car SoC

2017-05-30 Thread Bjorn Helgaas
On Sun, May 28, 2017 at 11:30:48AM +0200, Wolfram Sang wrote: > It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. > > Signed-off-by: Wolfram Sang > --- > I suggest this trivial patch should be picked individually per susbsystem. > > Documentation/devicetree/bindings/

Re: [PATCH] PCI: Freeze PME scan before suspending devices

2017-04-18 Thread Bjorn Helgaas
On Tue, Apr 18, 2017 at 08:44:30PM +0200, Lukas Wunner wrote: > Laurent Pinchart reported that the Renesas R-Car H2 Lager board > (r8a7790) crashes during suspend tests. Geert Uytterhoeven managed to > reproduce the issue on an M2-W Koelsch board (r8a7791): > > It occurs when the PME scan runs, o

Re: [PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-02-03 Thread Bjorn Helgaas
On Tue, Jan 31, 2017 at 02:19:51PM -0600, Bjorn Helgaas wrote: > This turned into much ado about nothing, but Shailendra's hisi patch > prompted similar cleanups in other drivers. It's a minor simplification, > but I think worth doing consistently across drivers. > >

[PATCH 1 4/4] PCI: rcar: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
ant to return -EINVAL, which is easy to ignore. We'd rather take the NULL pointer dereference so we notice the problem and fix it. Use of_device_get_match_data() to retrieve the hw_init_fn pointer. No functional change intended. Suggested-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas ---

[PATCH 1 2/4] PCI: iproc: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
The only way to call iproc_pcie_pltfm_probe() is to match an entry in iproc_pcie_of_match_table[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the pcie->type. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Bjorn Helg

[PATCH 1 1/4] PCI: hisi: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
-suggestion-from: Geert Uytterhoeven Signed-off-by: Shailendra Verma Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-hisi.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pci/host/pcie-hisi.c b/drivers/pci/host/pcie-hisi.c index a301a7187b30

[PATCH 1 3/4] PCI: layerscape: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
The only way to call ls_pcie_probe() is to match an entry in ls_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the drvdata pointer. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas --- drivers/pci

[PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
nly as a result of matching something in , a subsequent of_match_device(, dev) call should never fail. Therefore, instead of this: struct of_device_id *match; match = of_match_device(, dev); ... = match->data; we can do this: ... = of_device_get_match_data(dev); --- Bjorn Helg

Re: [PATCH] PCI: rcar: Check for OF device match early

2017-01-31 Thread Bjorn Helgaas
On Tue, Jan 31, 2017 at 04:33:15PM +0100, Geert Uytterhoeven wrote: > Hi Bjorn, > > On Tue, Jan 31, 2017 at 4:10 PM, Bjorn Helgaas wrote: > > A match in the rcar_pcie_of_match[] table is required, so check that first, > > before we start setting up things that need to be un

[PATCH] PCI: rcar: Check for OF device match early

2017-01-31 Thread Bjorn Helgaas
A match in the rcar_pcie_of_match[] table is required, so check that first, before we start setting up things that need to be undone if it fails. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 10 +- 1 file changed, 5 insertions(+), 5

Re: [PATCH v2 pci/next] PCI: rcar: Add compatible string for r8a7796

2017-01-11 Thread Bjorn Helgaas
On Wed, Dec 21, 2016 at 03:37:06AM +0900, Yoshihiro Kaneko wrote: > From: Harunobu Kurokawa > > This patch adds support for r8a7796. > > Signed-off-by: Harunobu Kurokawa > Signed-off-by: Yoshihiro Kaneko > Reviewed-by: Geert Uytterhoeven Applied to pci/host-rcar for v4.11 with acks from Simo

Re: [PATCH pci/next] PCI: rcar: return ENODEV code when PCIe card does not insert

2017-01-11 Thread Bjorn Helgaas
obe when no card present R-Car PCIe does not support hotplug so it is appropriate to treat the absence of a PCIe card as an -ENODEV error. Signed-off-by: Harunobu Kurokawa [simon: updated changelog] Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas

Re: [PATCH pci/next v3 0/3] PCI: rcar, rcar-gen2: Bindings cleanups

2016-12-07 Thread Bjorn Helgaas
On Tue, Dec 06, 2016 at 04:51:28PM +0100, Simon Horman wrote: > Hi, > > this short series makes some bindings cleanups to the Renesas PCI drivers. > > Changes v2->v3: > * Reworded changelogs to indicate that re-ordering struct of_device_id > entries does not effect run-time behaviour > * Correc

Re: [PATCH v2 0/5] PCI: rcar: Cleanups

2016-10-12 Thread Bjorn Helgaas
On Wed, Oct 12, 2016 at 07:58:35AM -0500, Bjorn Helgaas wrote: > - Add local "dev" pointers to reduce repetition of things like > "&pdev->dev". > > - Remove platform drvdata because it appears unused (we called > platform_set_drvdata() but no

[PATCH v2 0/5] PCI: rcar: Cleanups

2016-10-12 Thread Bjorn Helgaas
reg/val arguments PCI: rcar-gen2: Name private struct pointer "rcar" consistently PCI: rcar-gen2: Add register accessors --- Bjorn Helgaas (5): PCI: rcar: Add local struct device pointers PCI: rcar: Remove unused platform data PCI: rcar: Remove unused rcar_pci

[PATCH v2 4/5] PCI: rcar: Remove DRV_NAME macro

2016-10-12 Thread Bjorn Helgaas
The DRV_NAME macro is only used once, so there's no real advantage to having the macro at all. Remove it and use the "rcar-pcie" name directly in the struct platform_driver. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman --- drivers/pci/h

[PATCH v2 1/5] PCI: rcar: Add local struct device pointers

2016-10-12 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman --- drivers/pci/host/pcie-rcar.c | 88 ++ 1 file changed, 47 inserti

[PATCH v2 5/5] PCI: rcar-gen2: Add local struct device pointers

2016-10-12 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman --- drivers/pci/host/pci-rcar-gen2.c | 46 +- 1 file changed, 25 inserti

[PATCH v2 2/5] PCI: rcar: Remove unused platform data

2016-10-12 Thread Bjorn Helgaas
The rcar driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman --- drivers/pci/host/pcie-rcar.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/host/pcie-rcar.c b/dr

[PATCH v2 3/5] PCI: rcar: Remove unused rcar_pcie_get_resources() platform_device arg

2016-10-12 Thread Bjorn Helgaas
rcar_pcie_get_resources() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman --- drivers/pci/host/pcie-rcar.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH 10/10] PCI: rcar-gen2: Add local struct device pointers

2016-10-07 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-rcar-gen2.c | 47 +- 1 file changed, 26 insertions(+), 21 deletions(-) di

[PATCH 06/10] PCI: rcar: Remove unused platform data

2016-10-07 Thread Bjorn Helgaas
The rcar driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-r

[PATCH 08/10] PCI: rcar-gen2: Name private struct pointer "rcar" consistently

2016-10-07 Thread Bjorn Helgaas
Rename struct rcar_pci_priv to rcar_pci, along the lines of other drivers. Use a device-specific name, "rcar", for struct rcar_pci pointers to hint that this is device-specific information. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-rcar-gen

[PATCH 09/10] PCI: rcar-gen2: Add register accessors

2016-10-07 Thread Bjorn Helgaas
Add device-specific register accessors for consistency across host drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-rcar-gen2.c | 61 ++ 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/drivers/pci

[PATCH 07/10] PCI: rcar: Remove DRV_NAME macro

2016-10-07 Thread Bjorn Helgaas
The DRV_NAME macro is only used once, so there's no real advantage to having the macro at all. Remove it and use the "rcar-pcie" name directly in the struct platform_driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c |

[PATCH 05/10] PCI: rcar: Remove unused rcar_pcie_get_resources() platform_device arg

2016-10-07 Thread Bjorn Helgaas
rcar_pcie_get_resources() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pcie-rca

[PATCH 03/10] PCI: rcar: Swap order of rcar_writel() reg/val arguments

2016-10-07 Thread Bjorn Helgaas
Swap order of rcar_writel() arguments to match the "dev, pos, val" order used by pci_write_config_word() and other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 90 +- 1 file c

[PATCH 04/10] PCI: rcar: Add local struct device pointers

2016-10-07 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 92 +- 1 file changed, 47 insertions(+), 45 deletions(-) di

[PATCH 02/10] PCI: rcar: Name private struct pointer "rcar" consistently

2016-10-07 Thread Bjorn Helgaas
Use a device-specific name, "rcar", for struct rcar_pcie pointers to hint that this is device-specific information. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 388 +- 1 file changed, 194

[PATCH 01/10] PCI: rcar: Rename accessors

2016-10-07 Thread Bjorn Helgaas
Rename rcar_pci_read_reg() to rcar_readl() and rcar_pci_write_reg() to rcar_writel() for consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 142 -- 1 file changed, 68 insertions

Re: [PATCH v2] pcie-rcar: try setting PCIe speed to 5 GT/s at boot

2016-10-04 Thread Bjorn Helgaas
ff-by: Sergei Shtylyov I addressed Simon's comment for you, added his ack, and applied this to pci/host-rcar for v4.9. > --- > The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo. > > Changes in version 2: > - switched from the inte

Re: [PATCH] pcie-rcar: fix some checkpatch warnings

2016-09-14 Thread Bjorn Helgaas
nts not starting on a tabstop. > > Signed-off-by: Sergei Shtylyov Applied with Simon's ack to pci/host-rcar, thanks! > --- > The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo plus > two patches posted earlier... > > dri

Re: [PATCH] pcie-rcar: MSI range allocation support

2016-09-14 Thread Bjorn Helgaas
eordered the variable declarations, reworded the summary/description.] > > Signed-off-by: Grigory Kletsko > Signed-off-by: Sergei Shtylyov Applied with Simon's ack to pci/host-rcar for v4.9, thanks! > --- > The patch is against the 'next' branch of Bjorn Helgaas' 'p

Re: [PATCH] pcie-rcar: try setting PCIe speed to 5 GT/s at boot

2016-09-14 Thread Bjorn Helgaas
_rwm32() calls done to set the bits, removed > unneeded braces, removed non-informative comment, reworded the patch > summary/description.] > > Signed-off-by: Grigory Kletsko > Signed-off-by: Sergei Shtylyov > > --- > The patch is against the 'next' branch

Re: [PATCH] PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure

2016-09-12 Thread Bjorn Helgaas
On Wed, Aug 31, 2016 at 11:28:22AM +0200, Geert Uytterhoeven wrote: > If clk_prepare_enable() fails, we must not call clk_disable_unprepare() > in the error path. > > Signed-off-by: Geert Uytterhoeven Applied to pci/host-rcar for v4.9, thanks! > --- > drivers/pci/host/pcie-rcar.c | 4 ++-- > 1

[PATCH] PCI: rcar: Consolidate register space lookup and ioremap

2016-08-22 Thread Bjorn Helgaas
Move the devm_ioremap_resource() of R-Car register space next to the of_address_to_resource() that extracts the resource. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

Re: [RFC] pci: Provide a domain limited version of pdev_fixup_irq

2016-08-08 Thread Bjorn Helgaas
i-ow...@vger.kernel.org [mailto:linux-pci- > > ow...@vger.kernel.org] On Behalf Of Lorenzo Pieralisi > > Sent: 21 July 2016 10:35 > > To: Phil Edworthy > > Cc: Bjorn Helgaas ; linux-...@vger.kernel.org; linux- > > renesas-...@vger.kernel.org > > Subject: Re: [RFC] pci: Prov

[PATCH 1/2] ARM: Make PCI I/O space optional

2016-06-21 Thread Bjorn Helgaas
, and we should not add fictitious spaces for them. If a caller sets struct hw_pci.io_optional, assume it is responsible for adding any I/O port resource it desires, and do not add any default I/O port space. Signed-off-by: Bjorn Helgaas --- arch/arm/include/asm/mach/pci.h |1 + arch/ar

[PATCH 2/2] PCI: rcar: Drop gen2 dummy I/O port region

2016-06-21 Thread Bjorn Helgaas
Drop the unused dummy I/O port region and set struct hw_pci.io_optional so the ARM PCI code doesn't add a default one for us. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-rcar-gen2.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/pci/hos

[PATCH 0/2] ARM/PCI: Make I/O port space optional

2016-06-21 Thread Bjorn Helgaas
ries at [1], where they should fix a resource conflict [2] in the R-Car driver. [1] http://lkml.kernel.org/r/20160606225630.20936.77349.st...@bhelgaas-glaptop2.roam.corp.google.com [2] http://lkml.kernel.org/r/camuhmdvglftd-bjrz+gvkgye8dkdzzq6dnytkus+jvpthjs...@mail.gmail.com --- Bjorn

Re: [PATCH v1 19/25] PCI: rcar Gen2: Request host bridge window resources

2016-06-21 Thread Bjorn Helgaas
On Tue, Jun 21, 2016 at 06:41:00PM +0300, Valentine Barshak wrote: > On Tue, Jun 21, 2016 at 09:26:23AM -0500, Bjorn Helgaas wrote: > > [+cc Valentine] > > > > Hi Bjorn, > > > Hi Geert, > > > > Thanks a lot for testing this, and sorry for the breaka

Re: [PATCH v1 00/25] PCI: Request host bridge window resources

2016-06-21 Thread Bjorn Helgaas
On Tue, Jun 21, 2016 at 07:58:08PM +0800, wangyijing wrote: > Hi Bjorn, use devm_request_resource() for host bridge resource is cool, > what about do the similar change for x86, now we request host bridge resource > in pci_acpi_root_add_resources() in x86, and we would release the host bridge > res

Re: [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-21 Thread Bjorn Helgaas
On Mon, Jun 20, 2016 at 06:22:40PM +0100, Lorenzo Pieralisi wrote: > On Mon, Jun 20, 2016 at 09:56:45AM -0700, Tyler Baker wrote: > > Hi Bjorn, > > > > On 6 June 2016 at 16:06, Bjorn Helgaas wrote: > > > Previously we allocated the PCI resource list in > > &

Re: [PATCH v1 19/25] PCI: rcar Gen2: Request host bridge window resources

2016-06-21 Thread Bjorn Helgaas
[+cc Valentine] Hi Geert, Thanks a lot for testing this, and sorry for the breakage. On Tue, Jun 21, 2016 at 12:41:31PM +0200, Geert Uytterhoeven wrote: > On Tue, Jun 7, 2016 at 1:07 AM, Bjorn Helgaas wrote: > > Request host bridge window resources so they appear in ioport_res

Re: [PATCH v1 00/25] PCI: Request host bridge window resources

2016-06-18 Thread Bjorn Helgaas
On Mon, Jun 06, 2016 at 06:04:44PM -0500, Bjorn Helgaas wrote: > Several host bridge drivers (designware and all derivatives, iproc, > xgene, xilinx, and xilinx-nwl) don't request the MMIO and I/O port > windows they forward downstream to the PCI bus. > > That means the PC

Re: [PATCH v1 00/25] PCI: Request host bridge window resources

2016-06-18 Thread Bjorn Helgaas
On Tue, Jun 07, 2016 at 08:11:05AM -0500, Bjorn Helgaas wrote: > On Tue, Jun 07, 2016 at 10:21:36AM +0200, Arnd Bergmann wrote: > > On Monday, June 6, 2016 6:04:44 PM CEST Bjorn Helgaas wrote: > > > Several host bridge drivers (designware and all derivatives, iproc, > > >

Re: [PATCH v1 00/25] PCI: Request host bridge window resources

2016-06-07 Thread Bjorn Helgaas
On Tue, Jun 07, 2016 at 03:25:46PM +0200, Arnd Bergmann wrote: > On Tuesday, June 7, 2016 8:11:05 AM CEST Bjorn Helgaas wrote: > > > > > > What do you think is the correct behavior here, should the driver only > > > request the PIO range with parent=iopo

Re: [PATCH v1 00/25] PCI: Request host bridge window resources

2016-06-07 Thread Bjorn Helgaas
On Tue, Jun 07, 2016 at 10:21:36AM +0200, Arnd Bergmann wrote: > On Monday, June 6, 2016 6:04:44 PM CEST Bjorn Helgaas wrote: > > Several host bridge drivers (designware and all derivatives, iproc, > > xgene, xilinx, and xilinx-nwl) don't request the MMIO and I/O port >

[PATCH v1 00/25] PCI: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
t into -next for a while. This is on my pci/host-request-windows branch, which you can pull or view at https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/host-request-windows --- Bjorn Helgaas (25): PCI: Add devm_request_pci_bus_resources() PCI: designwa

[PATCH v1 02/25] PCI: designware: Free bridge resource list on failure

2016-06-06 Thread Bjorn Helgaas
of_pci_get_host_bridge_resources() allocates a list of resources for host bridge windows. If we fail after allocating that list, free it before we return error. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-designware.c | 24 +--- 1 file changed, 17 insertions

[PATCH v1 05/25] PCI: iproc: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
Request host bridge window resources so they appear in ioport_resource and iomem_resource and are reflected in /proc/ioports and /proc/iomem. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-iproc.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/host/pcie-iproc.c b

[PATCH v1 01/25] PCI: Add devm_request_pci_bus_resources()

2016-06-06 Thread Bjorn Helgaas
Several host bridge drivers iterate through the list of bridge windows to request resources. Several others don't request the window resources at all. Add a devm_request_pci_bus_resources() interface to make it easier for drivers to request all the window resources. Signed-off-by: Bjorn He

[PATCH v1 04/25] PCI: designware: Simplify host bridge window iteration

2016-06-06 Thread Bjorn Helgaas
The switch is the only statement in the resource_list_for_each_entry() loop, so remove unnecessary "continue" statements in the switch. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-designware.c |6 +- 1 file changed, 1 insertion(+), 5

[PATCH v1 03/25] PCI: designware: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
Request host bridge window resources so they appear in ioport_resource and iomem_resource and are reflected in /proc/ioports and /proc/iomem. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-designware.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/host/pcie

[PATCH v1 06/25] PCI: xgene: Free bridge resource list on failure

2016-06-06 Thread Bjorn Helgaas
of_pci_get_host_bridge_resources() allocates a list of resources for host bridge windows. If we fail after allocating that list, free it before we return error. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions

[PATCH v1 10/25] PCI: xilinx-nwl: Free bridge resource list on failure

2016-06-06 Thread Bjorn Helgaas
of_pci_get_host_bridge_resources() allocates a list of resources for host bridge windows. If we fail after allocating that list, free it before we return error. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx-nwl.c | 14 ++ 1 file changed, 10 insertions(+), 4

[PATCH v1 11/25] PCI: xilinx-nwl: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
Request host bridge window resources so they appear in ioport_resource and iomem_resource and are reflected in /proc/ioports and /proc/iomem. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx-nwl.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/host/pcie

[PATCH v1 13/25] PCI: altera: Request host bridge window resources with core function

2016-06-06 Thread Bjorn Helgaas
Use devm_request_pci_bus_resources() to request host bridge window resources instead of doing it by hand in the driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-altera.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH v1 12/25] PCI: xilinx-nwl: Use dev_printk() when possible

2016-06-06 Thread Bjorn Helgaas
Use dev_printk() when possible to make messages more useful. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx-nwl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c index 3c16bbf..0b597d9

[PATCH v1 09/25] PCI: xilinx: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
Request host bridge window resources so they appear in ioport_resource and iomem_resource and are reflected in /proc/ioports and /proc/iomem. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pci/host/pcie

[PATCH v1 07/25] PCI: xgene: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
Bus :01 e18000-e181ff : :01:00.0 e18200-e1820f : :01:00.0 e18210-e1821f : :01:00.0 f0-ff : /soc/pcie@1f2b Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c |4 1 file changed, 4 insertions

[PATCH v1 16/25] PCI: generic: Request host bridge window resources with core function

2016-06-06 Thread Bjorn Helgaas
Use devm_request_pci_bus_resources() to request host bridge window resources instead of doing it by hand in the driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-host-common.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff

[PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-06 Thread Bjorn Helgaas
Previously we allocated the PCI resource list in gen_pci_parse_request_of_pci_ranges(), but if we had an error, we freed it on error in gen_pci_init(). Reorder gen_pci_init() so we can take care of error path cleanup in gen_pci_parse_request_of_pci_ranges() instead. Signed-off-by: Bjorn Helgaas

[PATCH v1 19/25] PCI: rcar Gen2: Request host bridge window resources

2016-06-06 Thread Bjorn Helgaas
Request host bridge window resources so they appear in ioport_resource and iomem_resource and are reflected in /proc/ioports and /proc/iomem. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-rcar-gen2.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/host/pci-rcar

[PATCH v1 14/25] PCI: altera: Simplify host bridge window iteration

2016-06-06 Thread Bjorn Helgaas
functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-altera.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c index b97abbc..cf20c67 100644 --- a/drivers/pci

[PATCH v1 21/25] PCI: rcar: Simplify host bridge window iteration

2016-06-06 Thread Bjorn Helgaas
The switch is the only statement in the resource_list_for_each_entry() loop, so remove unnecessary cases and "continue" statements in the switch. Inline rcar_pcie_release_of_pci_ranges(), which is only called once. No functional change intended. Signed-off-by: Bjorn Helgaas --- d

[PATCH v1 17/25] PCI: generic: Simplify host bridge window iteration

2016-06-06 Thread Bjorn Helgaas
The switch is the only statement in the resource_list_for_each_entry() loop, so remove unnecessary "continue" statements in the switch. Simplify checking for the required non-prefetchable memory aperture. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pc

[PATCH v1 22/25] PCI: tegra: Remove top-level resource from hierarchy

2016-06-06 Thread Bjorn Helgaas
pcie-controller@3000/pci@1,0 3000-37ff : /pcie-controller@3000 3000-37ff : pads 3800-39ff : /pcie-controller@3000 3800-39ff : afi 1000-1fff : /pcie-controller@00003000 1000-1fff : cs ... Signed-off

[PATCH v1 18/25] PCI: mvebu: Request host bridge window resources with core function

2016-06-06 Thread Bjorn Helgaas
Use devm_request_pci_bus_resources() to request host bridge window resources instead of doing it by hand in the driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-mvebu.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff

[PATCH v1 20/25] PCI: rcar: Request host bridge window resources with core function

2016-06-06 Thread Bjorn Helgaas
Use devm_request_pci_bus_resources() to request host bridge window resources instead of doing it by hand in the driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

[PATCH v1 25/25] PCI: versatile: Simplify host bridge window iteration

2016-06-06 Thread Bjorn Helgaas
The switch is the only statement in the resource_list_for_each_entry() loop, so remove unnecessary "continue" statements in the switch. Simplify checking for the required non-prefetchable memory aperture. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pc

[PATCH v1 23/25] PCI: tegra: Request host bridge window resources with core function

2016-06-06 Thread Bjorn Helgaas
Use devm_request_pci_bus_resources() to request host bridge window resources instead of doing it by hand in the driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-tegra.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff

[PATCH v1 24/25] PCI: versatile: Request host bridge window resources with core function

2016-06-06 Thread Bjorn Helgaas
Use devm_request_pci_bus_resources() to request host bridge window resources instead of doing it by hand in the driver. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-versatile.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff

[PATCH v1 08/25] PCI: xilinx: Free bridge resource list on failure

2016-06-06 Thread Bjorn Helgaas
of_pci_get_host_bridge_resources() allocates a list of resources for host bridge windows. If we fail after allocating that list, free it before we return error. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions

Re: [PATCH v2] PCI: rcar-pcie: Remove Gen2 designation from Kconfig

2016-04-19 Thread Bjorn Helgaas
On Tue, Apr 05, 2016 at 01:10:54PM -0500, Bjorn Helgaas wrote: > Hi Simon, > > On Thu, Mar 31, 2016 at 09:35:23AM +0900, Simon Horman wrote: > > It appears that Gen2 is a misnomer for the R-Car PCIE driver > > which also supports Gen 1 and Gen 3 SoCs. Accordingly, drop Ge

Re: [PATCH v2] PCI: rcar-pcie: Remove Gen2 designation from Kconfig

2016-04-05 Thread Bjorn Helgaas
;t have a bisection problem. If you want to include this patch and merge through another tree, Acked-by: Bjorn Helgaas > v2 > * As suggested by Geert Uytterhoeven: > - Use PCIE as prefix in Kconfig symbol > --- > drivers/pci/host/Kconfig | 4 ++-- > drivers/pci/host/Makefil

Re: [PATCH] PCI: rcar, rcar-gen2: Use ARCH_RENESAS

2016-03-11 Thread Bjorn Helgaas
On Fri, Mar 11, 2016 at 10:49:11AM +0900, Simon Horman wrote: > On Tue, Mar 08, 2016 at 12:36:50PM -0600, Bjorn Helgaas wrote: > > On Thu, Feb 25, 2016 at 09:45:56AM +0900, Simon Horman wrote: > > > Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. > > > > > >

Re: [PATCH] PCI: rcar, rcar-gen2: Use ARCH_RENESAS

2016-03-11 Thread Bjorn Helgaas
On Thu, Feb 25, 2016 at 09:45:56AM +0900, Simon Horman wrote: > Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. > > This is part of an ongoing process to migrate from ARCH_SHMOBILE to > ARCH_RENESAS the motivation for which being that RENESAS seems to be a more > appropriate name than SHMOBILE

  1   2   >