Re: [PATCH v5 1/4] pci: APM X-Gene PCIe controller driver

2014-03-25 Thread Phil . Edworthy
Hi Tanmay, On: 19/03/2014 23:15, Tanmay wrote: Subject: [PATCH v5 1/4] pci: APM X-Gene PCIe controller driver Sent by: linux-pci-ow...@vger.kernel.org This patch adds the AppliedMicro X-Gene SOC PCIe controller driver. X-Gene PCIe controller supports maximum up to 8 lanes and GEN3 speed.

[PATCH] sh-pfc: r8a7790: Fix definition of IPSR5

2014-04-22 Thread Phil Edworthy
From: Guido Piasenza gpiase...@soft-in.com The extra entry in the table makes SCIFA0_B, and all peripherals after it, fail. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] sh-pfc: r8a7791: Fix definition of MOD_SEL3

2014-04-22 Thread Phil Edworthy
There is a missing 0 entry from the MOD_SEL3 table. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c

Re: [PATCH] dma: add driver for R-Car HPB-DMAC

2013-07-01 Thread phil . edworthy
Hi Max, Sergei, Thanks for your work on this. Add support for HPB-DMAC found in Renesas R-Car SoCs, using 'shdma-base' DMA driver framework. Based on the original patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Max Filippov max.filip...@cogentembedded.com [Sergei

RE: [PATCH v10 07/10] OF: Introduce helper function for getting PCI domain_nr

2014-09-11 Thread Phil Edworthy
Hi, On 10 September 2014 19:20, Arnd wrote: On Tuesday 09 September 2014 12:20:54 Catalin Marinas wrote: We can assume that if a domain is not specified and there is a single top level PCIe node, the domain defaults to 0. Are there any arm32 platforms that require multiple domains (and

RE: [PATCH] PCI: rcar: fix error handling of irq_of_parse_and_map

2014-11-18 Thread Phil Edworthy
Hi Dmitry, On 14 November 2014 22:22, Dmitry wrote: Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: Dmitry Torokhov d...@chromium.org Acked-by: Phil Edworthy phil.edwor...@renesas.com Thanks

[PATCH 1/3] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-06-22 Thread Phil Edworthy
These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- drivers/usb/renesas_usbhs/common.h | 2 ++ drivers/usb/renesas_usbhs/mod.c| 3 +++ drivers/usb/renesas_usbhs/mod_gadget.c | 38

[PATCH 2/3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-06-22 Thread Phil Edworthy
. Note: the R-Car USB PHY only allows this Host/Function switching on channel 0. This has been tested on a r8a7791 based Koelsch board, which uses a MAX3355 device to supply vbus power when needed. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- drivers/phy/phy-rcar-gen2.c | 269

[PATCH 3/3] arm: koelsch: make USB0 perform Host/Function switching

2015-06-22 Thread Phil Edworthy
Both USB Host (pci0) and Function (USBHS) drivers are enabled. The USB PHY driver determines which IP block should be connected based on vbus and id signals read via gpios. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 --- 1 file

[PATCH 0/3] R-Car Gen2 USB0 Host/Function switching

2015-06-22 Thread Phil Edworthy
This patch set adds support for USB Host/Function switching using external gpios to get the vbus and id signals. I am aware that the dt binding for the USB phy will need updating, but wanted to get this patch set out first to see whether this is the best way to implement this. Phil Phil

RE: [PATCH 3/3] arm: koelsch: make USB0 perform Host/Function switching

2015-07-01 Thread Phil Edworthy
-off-by: Phil Edworthy phil.edwor...@renesas.com --- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index cffe33f..8f394be 100644

[PATCH v2] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-02 Thread Phil Edworthy
. Note: the R-Car USB PHY only allows this Host/Function switching on channel 0. This has been tested on a r8a7791 based Koelsch board, which uses a MAX3355 device to supply vbus power when needed. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- Tested with patch usb: renesas_usbhs: Allow

[PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-02 Thread Phil Edworthy
These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- v2: - vbus variables changed from int to bool. - dev_info() changed to dev_err() --- drivers/usb/renesas_usbhs/common.h | 2

[PATCH v2] arm: koelsch: make USB0 perform Host/Function switching

2015-07-02 Thread Phil Edworthy
Both USB Host (pci0) and Function (USBHS) drivers are enabled. The USB PHY driver determines which IP block should be connected based on vbus and id signals read via gpios. Note that switch SW5 and SW6 on Koelsch board needs to be set to position 3 for this to work. --- Not for upstream until

RE: [PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-02 Thread Phil Edworthy
Hi Laurent, On 02 July 2015 09:15, Laurent wrote: Hi Phil, (CC'ing Morimoto-san) Thank you for the patch. On Thursday 02 July 2015 08:36:42 Phil Edworthy wrote: These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil

[PATCH v3] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-02 Thread Phil Edworthy
These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- v3: - Changed how indirect vbus is plumbed in. - Removed unnecessary (void) on call to otg_set_peripheral. - Moved code that connects

RE: [PATCH v2] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-02 Thread Phil Edworthy
Hi Sergei, On 02 July 2015 12:17, Sergei wrote: To: Phil Edworthy; Yoshihiro Shimoda Hello. On 7/2/2015 10:36 AM, Phil Edworthy wrote: These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor

RE: [PATCH v2] arm: koelsch: make USB0 perform Host/Function switching

2015-07-02 Thread Phil Edworthy
Hi Sergei. On 02 July 2015 12:32, Sergei wrote: Hello. On 7/2/2015 11:14 AM, Phil Edworthy wrote: Both USB Host (pci0) and Function (USBHS) drivers are enabled. The USB PHY driver determines which IP block should be connected based on vbus and id signals read via gpios. Note

RE: [PATCH 2/3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-02 Thread Phil Edworthy
Hi Kishon, On 02 July 2015 09:22, Kishon wrote: Hi, On Monday 22 June 2015 08:12 PM, Phil Edworthy wrote: Instead of statically selecting the PHY connection to either the USBHS (Function) or PCI0 (Host) IP blocks, this change allows the dts to specifiy gpio pins for the vbus and id

RE: [PATCH v3] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-07 Thread Phil Edworthy
Hi Laurent, On 06 July 2015 09:20, Laurent wrote: Hi Phil, Thank you for the patch. Thanks for your review! On Thursday 02 July 2015 11:26:33 Phil Edworthy wrote: These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil

RE: [PATCH v3] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-07 Thread Phil Edworthy
Hi Shimoda-san, On 06 July 2015 08:28, Shimoda-san wrote: Hi Phil-san, Sent: Thursday, July 02, 2015 7:27 PM These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com Thank you

RE: [PATCH v2] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-07 Thread Phil Edworthy
Hi Shimoda-san, On 06 July 2015 08:18, Shimoda-san wrote: Hi Phil-san, Thank you very much for the patch! Sent: Thursday, July 02, 2015 5:06 PM snip +/* VBUS change IRQ handler */ +static irqreturn_t gpio_vbus_irq(int irq, void *data) +{ + struct rcar_gen2_channel *channel =

RE: [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM

2015-08-17 Thread Phil Edworthy
Hi Geert, On 11 August 2015 13:43, Geert wrote: On arm64/shmobile: drivers/pci/host/pci-rcar-gen2.c: In function 'rcar_pci_cfg_base': drivers/pci/host/pci-rcar-gen2.c:112:34: error: dereferencing pointer to incomplete type struct rcar_pci_priv *priv = sys-private_data;

RE: [PATCH v3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-13 Thread Phil Edworthy
Hi Sergei, On 10 July 2015 17:36, Sergei wrote: Hello. On 07/07/2015 02:55 PM, Phil Edworthy wrote: Instead of statically selecting the PHY connection to either the USBHS (Function) or PCI0 (Host) IP blocks, this change allows the dts to specifiy gpio pins for the vbus and id signals

RE: [PATCH v3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-13 Thread Phil Edworthy
Hi Sergei, On 13 July 2015 11:17, Sergei wrote: Hello. On 7/13/2015 12:04 PM, Phil Edworthy wrote: Instead of statically selecting the PHY connection to either the USBHS (Function) or PCI0 (Host) IP blocks, this change allows the dts to specifiy gpio pins for the vbus and id signals

RE: [PATCH v3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-13 Thread Phil Edworthy
Hi Sergei, On 13 July 2015 18:10, Sergei wrote: On 07/13/2015 07:55 PM, Phil Edworthy wrote: Instead of statically selecting the PHY connection to either the USBHS (Function) or PCI0 (Host) IP blocks, this change allows the dts to specifiy gpio pins for the vbus and id signals

[PATCH v6] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-13 Thread Phil Edworthy
These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- v6: - Rename vbus_indirect_value to vbus_active v5: - Avoid race when vbus_is_indirect may or may not be read before the phy has

RE: [PATCH v6] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-13 Thread Phil Edworthy
Hi Laurent, On 13 July 2015 16:51, Laurent wrote: Hi Phil, Thank you for the patch. On Monday 13 July 2015 16:30:18 Phil Edworthy wrote: These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor

RE: [PATCH v5] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-13 Thread Phil Edworthy
Hi Laurent, On 09 July 2015 02:03, Laurent wrote: Hi Phil, On Wednesday 08 July 2015 08:08:27 Phil Edworthy wrote: On 08 July 2015 00:08, Laurent wrote: On Tuesday 07 July 2015 12:52:43 Phil Edworthy wrote: These changes allow a PHY driver to trigger a VBUS interrupt

RE: [PATCH v3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-13 Thread Phil Edworthy
Hi Sergei, On 13 July 2015 17:37, Sergei wrote: On 07/13/2015 06:02 PM, Phil Edworthy wrote: Instead of statically selecting the PHY connection to either the USBHS (Function) or PCI0 (Host) IP blocks, this change allows the dts to specifiy gpio pins for the vbus and id signals

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-29 Thread Phil Edworthy
Hi Wolfram, On 29 October 2015 12:38, Wolfram wrote: > > Fixes and changes to get PCIe working on ARM64 with mulitple instances. > > > I've tested these on ARM (Koelsch board), and it works fine. > > I've also tested on ARM64 (Salvator-X board), but I currently have an issue > > I wanted to

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-29 Thread Phil Edworthy
Hi Wolfram, On 29 October 2015 16:40, Wolfram wrote: > > Ouch, my bad. I have been working with our out-of-tree BSP for the > > Salvator-X > board on > > http://git.kernel.org/cgit/linux/kernel/git/horms/renesas-bsp.git, > > rcar-3.0.2 > tag along > > with some patches from colleagues. I

RE: PCIe host controller behind IOMMU on ARM

2015-11-09 Thread Phil Edworthy
Hi Liviu, Will, On 04 November 2015 15:19, Phil wrote: > On 04 November 2015 15:02, Liviu wrote: > > On Wed, Nov 04, 2015 at 02:48:38PM +0000, Phil Edworthy wrote: > > > Hi Liviu, > > > > > > On 04 November 2015 14:24, Liviu wrote: > > > > On Wed,

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-09 Thread Phil Edworthy
Hi Thierry, On 09 November 2015 16:11, Thierry wrote: > On Mon, Nov 09, 2015 at 03:20:24PM +0000, Phil Edworthy wrote: > > cc'ing others (Tegra, Altera, Designware) who may have the same bug > > > > On 03 November 2015 09:28, Phil Edworthy wrote: > > > The OF node p

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-09 Thread Phil Edworthy
Hi Thierry, On 09 November 2015 17:24, Phil wrote: > On 09 November 2015 16:11, Thierry wrote: > > On Mon, Nov 09, 2015 at 03:20:24PM +0000, Phil Edworthy wrote: > > > cc'ing others (Tegra, Altera, Designware) who may have the same bug > > > > > > On 03 Nove

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-09 Thread Phil Edworthy
cc'ing others (Tegra, Altera, Designware) who may have the same bug On 03 November 2015 09:28, Phil Edworthy wrote: > The OF node passed to irq_domain_add_linear() should be a > pointer to interrupt controller's device tree node, or NULL, > but not the PCI controller's node. >

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-12 Thread Phil Edworthy
Hi Marc, On 11 November 2015 16:38, Marc Zyngier wrote: > On Tue, 10 Nov 2015 16:52:33 +0100 > Thierry Reding <tred...@nvidia.com> wrote: > > > On Mon, Nov 09, 2015 at 06:01:49PM +, Phil Edworthy wrote: > > > Hi Thierry, > > > > > > On 0

RE: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread Phil Edworthy
Hi Liviu, Arnd, On 11 November 2015 18:25, LIviu wrote: > On Mon, Nov 09, 2015 at 12:32:13PM +0000, Phil Edworthy wrote: > > Hi Liviu, Will, > > > > On 04 November 2015 15:19, Phil wrote: > > > On 04 November 2015 15:02, Liviu wrote: > > > > On Wed, Nov 0

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-13 Thread Phil Edworthy
Hi Marc, On 12 November 2015 20:31, Marc Zyngier wrote: > Phil Edworthy <phil.edwor...@renesas.com> wrote: > > On 11 November 2015 16:38, Marc Zyngier wrote: > > > On Tue, 10 Nov 2015 16:52:33 +0100 > > > Thierry Reding <tred...@nvidia.com> wrote: > >

RE: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread Phil Edworthy
Hi Arnd, On 12 November 2015 09:49, Arnd Bergmann wrote: > On Thursday 12 November 2015 09:26:33 Phil Edworthy wrote: > > On 11 November 2015 18:25, LIviu wrote: > > > On Mon, Nov 09, 2015 at 12:32:13PM +0000, Phil Edworthy wrote: > > > > I think you're mixing thing

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-09 Thread Phil Edworthy
Hi Wolfram, On 07 November 2015 14:00, Wolfram wrote: > On Tue, Nov 03, 2015 at 09:28:19AM +0000, Phil Edworthy wrote: > > The OF node passed to irq_domain_add_linear() should be a > > pointer to interrupt controller's device tree node, or NULL, > > but not the

[PATCH 1/3 v2] PCI: pcie-rcar: Convert to DT resource parsing API

2015-11-09 Thread Phil Edworthy
"PCI: generic: Convert to DT resource parsing API". Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- v2: - Remove incorrect res_valid check --- drivers/pci/host/pcie-rcar.c | 116 +++ 1 file changed, 73 insertions(+), 43 deletion

RE: [PATCH 1/3] PCI: pcie-rcar: Convert to DT resource parsing API

2015-11-09 Thread Phil Edworthy
Hi Wolfram, On 07 November 2015 13:29, Wolfram wrote: > On Mon, Nov 02, 2015 at 04:36:13PM +0000, Phil Edworthy wrote: > > The main purpose of this change is to avoid calling pci_ioremap_io() as > > this is not available on arm64. However, instead of doing the range passing > &

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-30 Thread Phil Edworthy
Hi Bjorn, On 29 October 2015 23:03, Bjorn wrote: > On Thu, Oct 29, 2015 at 07:48:00PM +0100, Wolfram Sang wrote: > > On Thu, Oct 29, 2015 at 04:44:06PM +0000, Phil Edworthy wrote: > > > Hi Wolfram, > > > > > > On 29 October 2015 16:40, Wolfram wrote: > &g

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-30 Thread Phil Edworthy
Hi Bjorn, On 30 October 2015 07:24, Phil wrote: > On 30 October 2015 07:19, Phil wrote > > On 29 October 2015 23:03, Bjorn wrote: > > > On Thu, Oct 29, 2015 at 07:48:00PM +0100, Wolfram Sang wrote: > > > > On Thu, Oct 29, 2015 at 04:44:06PM +, Phil Edwort

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-30 Thread Phil Edworthy
Hi Bjorn, On 30 October 2015 07:19, Phil wrote > On 29 October 2015 23:03, Bjorn wrote: > > On Thu, Oct 29, 2015 at 07:48:00PM +0100, Wolfram Sang wrote: > > > On Thu, Oct 29, 2015 at 04:44:06PM +0000, Phil Edworthy wrote: > > > > Hi Wolfram, > > > >

[PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-03 Thread Phil Edworthy
The OF node passed to irq_domain_add_linear() should be a pointer to interrupt controller's device tree node, or NULL, but not the PCI controller's node. This fixes an oops in msi_domain_alloc_irqs() when it tries to call msi_check(). Signed-off-by: Phil Edworthy <phil.edwor...@renesas.

RE: [PATCH 0/3] Fix rcar-pcie for arm64

2015-11-03 Thread Phil Edworthy
Hi Wolfram, On 02 November 2015 21:33, Wolfram wrote: > > The first patches fixes the build problem, and the second patch reverts the > > patch that removed the driver from arm64 builds. The final patch add a > > compat > > string for the r8a7795 (arm64) device. > > Thanks. I will test them

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-30 Thread Phil Edworthy
Hi Wolfram, On 29 October 2015 18:48, Wolfram wrote: > On Thu, Oct 29, 2015 at 04:44:06PM +0000, Phil Edworthy wrote: > > Hi Wolfram, > > > > On 29 October 2015 16:40, Wolfram wrote: > > > > Ouch, my bad. I have been working with our out-of-tree BSP

RE: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi Liviu, On 04 November 2015 14:24, Liviu wrote: > On Wed, Nov 04, 2015 at 01:57:48PM +0000, Phil Edworthy wrote: > > Hi, > > > > I am trying to hook up a PCIe host controller that sits behind an IOMMU, > > but having some problems. > > > > I'm u

RE: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi Liviu, On 04 November 2015 15:02, Liviu wrote: > On Wed, Nov 04, 2015 at 02:48:38PM +0000, Phil Edworthy wrote: > > Hi Liviu, > > > > On 04 November 2015 14:24, Liviu wrote: > > > On Wed, Nov 04, 2015 at 01:57:48PM +, Phil Edworthy wrote: > > > >

PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi, I am trying to hook up a PCIe host controller that sits behind an IOMMU, but having some problems. I'm using the pcie-rcar PCIe host controller and it works fine without the IOMMU, and I can attach the IOMMU to the controller such that any calls to dma_alloc_coherent made by the controller

RE: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi Will, On 04 November 2015 15:30, Will wrote: > On Wed, Nov 04, 2015 at 03:19:13PM +0000, Phil Edworthy wrote: > > On 04 November 2015 15:02, Liviu wrote: > > > On Wed, Nov 04, 2015 at 02:48:38PM +0000, Phil Edworthy wrote: > > > > Sure, though since this is bo

[PATCH 0/3] Fix rcar-pcie for arm64

2015-11-02 Thread Phil Edworthy
a1cb757550 ("PCI/MSI: Let pci_msi_get_domain use struct device::msi_domain") I'll look into this, but it doesn't stop us from applying these patches. Harunobu Kurokawa (1): PCI: pcie-rcar: Add support for R-Car H3. Phil Edworthy (2): PCI: pcie-rcar: Convert to DT resource parsing API

[PATCH 2/3] Revert "PCI: rcar: Build pcie-rcar.c only on ARM"

2015-11-02 Thread Phil Edworthy
Now that we can build on arm64, revert commit 7c537c67d2e4 ("PCI: rcar: Build pcie-rcar.c only on ARM"). Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/host/K

[PATCH 1/3] PCI: pcie-rcar: Convert to DT resource parsing API

2015-11-02 Thread Phil Edworthy
"PCI: generic: Convert to DT resource parsing API". Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 117 +++ 1 file changed, 74 insertions(+), 43 deletions(-) diff --git a/drivers/pci/host/pcie-rcar

[PATCH 3/3] PCI: pcie-rcar: Add support for R-Car H3.

2015-11-02 Thread Phil Edworthy
From: Harunobu Kurokawa R-Car H3 device is r8a7795 Signed-off-by: Harunobu Kurokawa --- Documentation/devicetree/bindings/pci/rcar-pci.txt | 3 ++- drivers/pci/host/pcie-rcar.c | 1 + 2 files changed, 3

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-11-02 Thread Phil Edworthy
Hi Bjorn, On 30 October 2015 13:32, Bjorn wrote: > On Fri, Oct 30, 2015 at 09:00:20AM +0000, Phil Edworthy wrote: > > Hi Bjorn, > > > > On 30 October 2015 07:24, Phil wrote: > > > On 30 October 2015 07:19, Phil wrote > > > > On 29 October 2015 23:03, B

[PATCH] PCI: rcar (usb): DT can override default window settings

2015-11-03 Thread Phil Edworthy
If the dtb specifies dma-ranges, we use those values. Otherwise, we default to the values that were previously hardcoded into the driver. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- .../devicetree/bindings/pci/pci-rcar-gen2.txt | 6 ++ drivers/pci/host/pci-rcar-

RE: [PATCH 2/4] PCI: rcar-pcie: Remove dependency on ARM-specific struct hw_pci

2015-10-19 Thread Phil Edworthy
Hi Bjorn, Thanks for the review. On 16 October 2015 22:34, Bjorn wrote: > On Fri, Oct 02, 2015 at 11:25:05AM +0100, Phil Edworthy wrote: > > The R-Car PCIe host controller driver uses pci_common_init_dev(), > > which is ARM-specific and requires the ARM struct h

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-20 Thread Phil Edworthy
Hi Geert, On 20 October 2015 08:37, Geert wrote: > On Tue, Oct 20, 2015 at 3:36 AM, Simon Horman <ho...@verge.net.au> wrote: > > On Mon, Oct 19, 2015 at 06:16:34PM -0500, Bjorn Helgaas wrote: > >> [+cc Geert] > >> > >> On Fri, Oct 02, 2015 at 11:25:03A

RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-20 Thread Phil Edworthy
Hi Bjorn, On 20 October 2015 13:50, Bjorn wrote: > On Tue, Oct 20, 2015 at 08:00:10AM +0000, Phil Edworthy wrote: > > Hi Geert, > > > > On 20 October 2015 08:37, Geert wrote: > > > On Tue, Oct 20, 2015 at 3:36 AM, Simon Horman <ho...@verge.net.au> > wrote

RE: [PATCH v5] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-08 Thread Phil Edworthy
Hi Laurent, On 08 July 2015 00:08, Laurent wrote: Hi Phil, Thank you for the patch. On Tuesday 07 July 2015 12:52:43 Phil Edworthy wrote: These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor

[PATCH v3] phy: rcar-gen2 usb: Add Host/Function switching for USB0

2015-07-07 Thread Phil Edworthy
. Note: the R-Car USB PHY only allows this Host/Function switching on channel 0. This has been tested on a r8a7791 based Koelsch board, which uses a MAX3355 device to supply vbus power when needed. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- v3: - Do not call

[PATCH v4] ARM: shmobile: koelsch: make USB0 perform Host/Function switching

2015-07-07 Thread Phil Edworthy
Both USB Host (pci0) and Function (USBHS) drivers are enabled. The USB PHY driver determines which IP block should be connected based on vbus and id signals read via gpios. Note that switch SW5 and SW6 on Koelsch board needs to be set to position 3 for this to work. Signed-off-by: Phil Edworthy

[PATCH v5] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-07 Thread Phil Edworthy
These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- v5: - Avoid race when vbus_is_indirect may or may not be read before the phy has called vbus_session. In doing so, the changes have

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-18 Thread Phil Edworthy
Hi Marc, On 16 November 2015 18:31, Marc Zyngier wrote: > On 13/11/15 09:36, Phil Edworthy wrote: > > Since the stack trace doesn't help that much I added some tracing: > > pci_msi_setup_msi_irqs() > > calls pci_msi_get_domain() > > calls dev_get_msi_domai

RE: PCIe host controller behind IOMMU on ARM

2015-11-13 Thread Phil Edworthy
Hi Arnd, On 12 November 2015 16:17, Arnd Bergmann wrote: > On Thursday 12 November 2015 15:33:41 Phil Edworthy wrote: > > On 12 November 2015 09:49, Arnd Bergmann wrote: > > > On Thursday 12 November 2015 09:26:33 Phil Edworthy wrote: > > > > On 11 No

RE: PCIe host controller behind IOMMU on ARM

2015-11-13 Thread Phil Edworthy
On 13 November 2015 14:00, Arnd Bergmann wrote: > On Friday 13 November 2015 13:03:11 Phil Edworthy wrote: > > > > > > Then pci_device_add() sets the devices coherent_dma_mask to 4GiB > before > > > > calling of_pci_dma_configure()

[PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances

2015-10-02 Thread Phil Edworthy
. Phil Edworthy (4): PCI: rcar-pcie: Make PCI aware of the IO resources PCI: rcar-pcie: Remove dependency on ARM-specific struct hw_pci PCI: rcar-pcie: Set root bus nr to that provided in DT PCI: rcar-pcie: Fix IO offset for multiple instances drivers/pci/host/pcie-rcar.c | 86

[PATCH 1/4] PCI: rcar-pcie: Make PCI aware of the IO resources

2015-10-02 Thread Phil Edworthy
Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 7678fe0..27e2c20 100644 --- a/drivers/pci/host/pcie-rcar.c

[PATCH 2/4] PCI: rcar-pcie: Remove dependency on ARM-specific struct hw_pci

2015-10-02 Thread Phil Edworthy
is based on commit <499733e0cc1a00523c5056a690f65dea7b9da140> "PCI: generic: Remove dependency on ARM-specific struct hw_pci". Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 76 1 file

[PATCH 3/4] PCI: rcar-pcie: Set root bus nr to that provided in DT

2015-10-02 Thread Phil Edworthy
On ARM64, setting the root bus number to -1 causes probe failure. Moreover, we should use the bus number specified in the DT as we could have multiple PCIe controllers with different bus ranges. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 2

[PATCH 4/4] PCI: rcar-pcie: Fix IO offset for multiple instances

2015-10-02 Thread Phil Edworthy
Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 8e583c2..f4fa6c5 100644 --- a/drivers/pci/host/pcie-rcar.c

[PATCH 0/4] Various R-Car PCIe patches

2015-12-17 Thread Phil Edworthy
The first patch removes code that is no longer used. The next two allow us to use runtim PM. The last patch is for PHY setup in order to get PCIe compliance apparently. For that last patch, I've been told that this is what I must set. Phil Edworthy (4): PCI: rcar: remove unused pci_sys_data

[PATCH 1/4] PCI: rcar: remove unused pci_sys_data structure in pcie-rcar

2015-12-17 Thread Phil Edworthy
Commit b3a72384fe29 ("ARM/PCI: Replace pci_sys_data->align_resource with global function pointer") removed the struct pci_sys_data dependency from the ARM pcibios functions, so remove it from this driver. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/p

[PATCH 3/4] PCI: rcar: Add runtime PM support to pcie-rcar

2015-12-17 Thread Phil Edworthy
If runtime PM is enabled in the kernel config, simply enable the clocks once during probe. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 44 1 file changed, 32 insertions(+), 12 deletions(-) diff

[PATCH 4/4] PCI: rcar: Add Gen2 PHY setup to pcie-rcar

2015-12-17 Thread Phil Edworthy
For PCIe compliance, the PHY registers need setting as per the manual. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- drivers/pci/host/pcie-rcar.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/d

[PATCH 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2015-12-17 Thread Phil Edworthy
as it has also been transitioned to L1 link state. So, when attempting a config access, check to see if the card has gone into L1, and if so, do the same for the host controller. This is based on a patch by Hien Dang <hien.dang...@rvc.renesas.com> Signed-off-by: Phil Edworthy <p

RE: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64

2015-12-10 Thread Phil Edworthy
Hi Bjorn, On 09 December 2015 17:00, Bjorn Helgaas wrote: > On Thu, Nov 26, 2015 at 08:32:43AM +0000, Phil Edworthy wrote: > > HI Bjorn, > > > > On 25 November 2015 16:41, Bjorn Helgaas wrote: > > > Hi Phil, > > > > > > On Wed, Nov 2

RE: [PATCH 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2016-01-04 Thread Phil Edworthy
Hi Geert, On 21 December 2015 13:17, Geert Uytterhoeven wrote: > On Mon, Dec 21, 2015 at 11:52 AM, Phil Edworthy > <phil.edwor...@renesas.com> wrote: > > On 18 December 2015 14:04, Wolfram Sang wrote: > >> > Since the hardware doesn't support hot plug, I believe thi

[PATCH v2 0/4] Various R-Car PCIe patches

2016-01-05 Thread Phil Edworthy
until we are in L1. PATCh 4/4 - Added comment about where the PHY settings come from. Phil Edworthy (4): PCI: rcar: remove unused pci_sys_data structure in pcie-rcar PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar PCI: rcar: Add runtime PM support to pcie-rcar PCI: rcar

[PATCH v2 1/4] PCI: rcar: remove unused pci_sys_data structure in pcie-rcar

2016-01-05 Thread Phil Edworthy
Commit b3a72384fe29 ("ARM/PCI: Replace pci_sys_data->align_resource with global function pointer") removed the struct pci_sys_data dependency from the ARM pcibios functions, so remove it from this driver. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> ---

[PATCH v2 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2016-01-05 Thread Phil Edworthy
as it has also been transitioned to L1 link state. So, when attempting a config access, check to see if the card has gone into L1, and if so, do the same for the host controller. This is based on a patch by Hien Dang <hien.dang...@rvc.renesas.com> Signed-off-by: Phil Edworthy <p

[PATCH v2 3/4] PCI: rcar: Add runtime PM support to pcie-rcar

2016-01-05 Thread Phil Edworthy
If runtime PM is enabled in the kernel config, simply enable the clocks once during probe. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- v2: - No changes. --- drivers/pci/host/pcie-rcar.c | 44 1 file changed, 32 insertions(

[PATCH v2 4/4] PCI: rcar: Add Gen2 PHY setup to pcie-rcar

2016-01-05 Thread Phil Edworthy
For PCIe compliance, the PHY registers need setting as per the manual. Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- v2: - Added comment about where the PHY settings come from. --- drivers/pci/host/pcie-rcar.c | 31 --- 1 file changed, 28 inse

RE: [PATCH 4/4] PCI: rcar: Add Gen2 PHY setup to pcie-rcar

2015-12-18 Thread Phil Edworthy
Hi Wolfram, On 17 December 2015 13:33, Wolfram Sang wrote: > > + rcar_pci_write_reg(pcie, 0x000f0030, GEN2_PCIEPHYADDR); > > + rcar_pci_write_reg(pcie, 0x00381203, GEN2_PCIEPHYDATA); > > + rcar_pci_write_reg(pcie, 0x0001, GEN2_PCIEPHYCTRL); > > + rcar_pci_write_reg(pcie, 0x0006,

RE: [PATCH 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2015-12-18 Thread Phil Edworthy
On 17 December 2015 13:41, Geert Uytterhoeven wrote: > On Thu, Dec 17, 2015 at 2:30 PM, Wolfram Sang wrote: > >> + /* Wait until we are in L1 */ > >> + while (!(val & L1FAEG)) > >> + val = rcar_pci_read_reg(pcie, PMSR); > > > > No

RE: [PATCH 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2015-12-18 Thread Phil Edworthy
Hi Wolfram, On 18 December 2015 14:04, Wolfram Sang wrote: > > Since the hardware doesn't support hot plug, I believe this loop will > > always exit very quickly. Unless someone has taken a hammer to the HW > > of course. > > I know what you mean. But since readl_poll_timeout() makes it easy, we

RE: [PATCH 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2015-12-18 Thread Phil Edworthy
Hi Wolfram, On 17 December 2015 13:31, Wolfram Sang wrote: > Hi Phil, > > > + /* Wait until we are in L1 */ > > + while (!(val & L1FAEG)) > > + val = rcar_pci_read_reg(pcie, PMSR); > > No timeout? Since the hardware doesn't support hot plug, I believe this

RE: [PATCH 2/4] PCI: rcar: Support runtime PM link state L1 handling in pcie-rcar

2015-12-21 Thread Phil Edworthy
Hi Wolfram, On 18 December 2015 14:04, Wolfram Sang wrote: > > Since the hardware doesn't support hot plug, I believe this loop will > > always exit very quickly. Unless someone has taken a hammer to the HW > > of course. > > I know what you mean. But since readl_poll_timeout() makes it easy, we

RE: [PATCH 07/10] drivers/pci: make host/pcie-rcar.c explicitly non-modular

2015-12-17 Thread Phil Edworthy
ow) contained at the top of the file in the comments. > > > > Cc: Simon Horman <ho...@verge.net.au> > > Cc: Bjorn Helgaas <bhelg...@google.com> > > Cc: linux-...@vger.kernel.org > > Cc: linux...@vger.kernel.org > > Signed-off-by: Paul Gortmaker <

[PATCH v2 2/3] Revert "PCI: rcar: Build pcie-rcar.c only on ARM"

2015-11-25 Thread Phil Edworthy
Now that we can build on arm64, revert commit 7c537c67d2e4 ("PCI: rcar: Build pcie-rcar.c only on ARM"). Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> --- v2: No changes --- drivers/pci/host/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/

[PATCH v2 1/3] PCI: rcar: Convert to DT resource parsing API

2015-11-25 Thread Phil Edworthy
"PCI: generic: Convert to DT resource parsing API". Signed-off-by: Phil Edworthy <phil.edwor...@renesas.com> Reported-by: Wolfram Sang <wsa+rene...@sang-engineering.com> Tested-by: Wolfram Sang <wsa+rene...@sang-engineering.com> Acked-by: Simon Horman <horms+rene...@

[Resend: PATCH v2 0/3] Fix rcar-pcie for arm64

2015-11-25 Thread Phil Edworthy
rked as v2 and acks, etc added. Harunobu Kurokawa (1): PCI: pcie-rcar: Add support for R-Car H3. Phil Edworthy (2): PCI: rcar: Convert to DT resource parsing API Revert "PCI: rcar: Build pcie-rcar.c only on ARM" Documentation/devicetree/bindings/pci/rcar-pci.txt | 3 +- driv

[PATCH v2 3/3] PCI: pcie-rcar: Add support for R-Car H3.

2015-11-25 Thread Phil Edworthy
From: Harunobu Kurokawa R-Car H3 device is r8a7795 Signed-off-by: Harunobu Kurokawa Acked-by: Wolfram Sang Tested-by: Wolfram Sang --- v2: No changes ---

[PATCH] PCI: MSI: Only use the generic MSI layer when domain is hierarchical

2015-11-30 Thread Phil Edworthy
Not pretty, but reliable. Another insentive to rework those drivers and phase out this API. Reported-by: Phil Edworthy <phil.edwor...@renesas.com> Tested-by: Phil Edworthy <phil.edwor...@renesas.com> Signed-off-by: Marc Zyngier <marc.zyng...@arm.com> --- drivers/pci/msi.c | 4 ++-- 1 file

RE: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64

2015-11-26 Thread Phil Edworthy
HI Bjorn, On 25 November 2015 16:41, Bjorn Helgaas wrote: > Hi Phil, > > On Wed, Nov 25, 2015 at 03:30:36PM +0000, Phil Edworthy wrote: > > The first patches fixes the build problem > > I'm trying to figure out if v4.4 has a build problem we need to fix. > If I understa

RE: [PATCH] PCI: pcie-rcar: Fix OF node passed to MSI irq domain

2015-11-23 Thread Phil Edworthy
Hi Marc, On 20 November 2015 09:49, Marc Zyngier wrote: > On 18/11/15 18:01, Phil Edworthy wrote: > > Hi Marc, > > > > On 16 November 2015 18:31, Marc Zyngier wrote: > >> On 13/11/15 09:36, Phil Edworthy wrote: > > > >>> Since the stack t

RE: [PATCH] ARM: dts: r8a7791: Don't disable referenced optional clocks

2016-04-08 Thread Phil Edworthy
>>> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts > >>> @@ -660,6 +660,7 @@ > >>>}; > >>> > >>>_bus_clk { > >>> + clock-frequency = <1>; > > >> Hmmm, looking at the Koelsch schematics, I don't see t

  1   2   >