All of lore.kernel.org
 help / color / mirror / Atom feed
* [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
@ 2015-11-25 15:30 ` Phil Edworthy
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, Phil Edworthy

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.

Tested on arm Koelsch board, all ok.

Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7 from
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with PCI
next merged. 
Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")

Resent with whole series marked 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 +-
 drivers/pci/host/Kconfig                           |   3 +-
 drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
 3 files changed, 77 insertions(+), 46 deletions(-)

-- 
2.5.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
@ 2015-11-25 15:30 ` Phil Edworthy
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, Phil Edworthy

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.

Tested on arm Koelsch board, all ok.

Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7 from
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with PCI
next merged. 
Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")

Resent with whole series marked 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 +-
 drivers/pci/host/Kconfig                           |   3 +-
 drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
 3 files changed, 77 insertions(+), 46 deletions(-)

-- 
2.5.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/3] PCI: rcar: Convert to DT resource parsing API
  2015-11-25 15:30 ` Phil Edworthy
@ 2015-11-25 15:30   ` Phil Edworthy
  -1 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, Phil Edworthy

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
in this driver we can utilise of_pci_get_host_bridge_resources().

This is similar to changes made to the generic PCI host driver in commit
dbf9826d "PCI: generic: Convert to DT resource parsing API".

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
---
v2:
 - Remove incorrect res_valid check
---
 drivers/pci/host/pcie-rcar.c | 116 +++++++++++++++++++++++++++----------------
 1 file changed, 73 insertions(+), 43 deletions(-)

diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index f4fa6c5..d12faf4 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -108,8 +108,6 @@
 #define RCAR_PCI_MAX_RESOURCES 4
 #define MAX_NR_INBOUND_MAPS 6
 
-static unsigned long global_io_offset;
-
 struct rcar_msi {
 	DECLARE_BITMAP(used, INT_PCI_MSI_NR);
 	struct irq_domain *domain;
@@ -138,8 +136,7 @@ struct rcar_pcie {
 #endif
 	struct device		*dev;
 	void __iomem		*base;
-	struct resource		res[RCAR_PCI_MAX_RESOURCES];
-	struct resource		busn;
+	struct list_head	resources;
 	int			root_bus_nr;
 	struct clk		*clk;
 	struct clk		*bus_clk;
@@ -323,10 +320,9 @@ static struct pci_ops rcar_pcie_ops = {
 	.write	= rcar_pcie_write_conf,
 };
 
-static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
+static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie,
+				   struct resource *res)
 {
-	struct resource *res = &pcie->res[win];
-
 	/* Setup PCIe address space mappings for each resource */
 	resource_size_t size;
 	resource_size_t res_start;
@@ -359,31 +355,33 @@ static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
 	rcar_pci_write_reg(pcie, mask, PCIEPTCTLR(win));
 }
 
-static int rcar_pcie_setup(struct list_head *resource, struct rcar_pcie *pcie)
+static int rcar_pcie_setup(struct list_head *resource, struct rcar_pcie *pci)
 {
-	struct resource *res;
-	int i;
-
-	pcie->root_bus_nr = pcie->busn.start;
+	struct resource_entry *win;
+	int i = 0;
 
 	/* Setup PCI resources */
-	for (i = 0; i < RCAR_PCI_MAX_RESOURCES; i++) {
+	resource_list_for_each_entry(win, &pci->resources) {
+		struct resource *res = win->res;
 
-		res = &pcie->res[i];
 		if (!res->flags)
 			continue;
 
-		rcar_pcie_setup_window(i, pcie);
-
-		if (res->flags & IORESOURCE_IO) {
-			phys_addr_t io_start = pci_pio_to_address(res->start);
-			pci_ioremap_io(global_io_offset, io_start);
-			global_io_offset += SZ_64K;
+		switch (resource_type(res)) {
+		case IORESOURCE_IO:
+		case IORESOURCE_MEM:
+			rcar_pcie_setup_window(i, pci, res);
+			i++;
+			break;
+		case IORESOURCE_BUS:
+			pci->root_bus_nr = res->start;
+			break;
+		default:
+			continue;
 		}
 
 		pci_add_resource(resource, res);
 	}
-	pci_add_resource(resource, &pcie->busn);
 
 	return 1;
 }
@@ -923,14 +921,63 @@ static const struct of_device_id rcar_pcie_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, rcar_pcie_of_match);
 
+static void rcar_pcie_release_of_pci_ranges(struct rcar_pcie *pci)
+{
+	pci_free_resource_list(&pci->resources);
+}
+
+static int rcar_pcie_parse_request_of_pci_ranges(struct rcar_pcie *pci)
+{
+	int err;
+	struct device *dev = pci->dev;
+	struct device_node *np = dev->of_node;
+	resource_size_t iobase;
+	struct resource_entry *win;
+
+	err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources, &iobase);
+	if (err)
+		return err;
+
+	resource_list_for_each_entry(win, &pci->resources) {
+		struct resource *parent, *res = win->res;
+
+		switch (resource_type(res)) {
+		case IORESOURCE_IO:
+			parent = &ioport_resource;
+			err = pci_remap_iospace(res, iobase);
+			if (err) {
+				dev_warn(dev, "error %d: failed to map resource %pR\n",
+					 err, res);
+				continue;
+			}
+			break;
+		case IORESOURCE_MEM:
+			parent = &iomem_resource;
+			break;
+
+		case IORESOURCE_BUS:
+		default:
+			continue;
+		}
+
+		err = devm_request_resource(dev, parent, res);
+		if (err)
+			goto out_release_res;
+	}
+
+	return 0;
+
+out_release_res:
+	rcar_pcie_release_of_pci_ranges(pci);
+	return err;
+}
+
 static int rcar_pcie_probe(struct platform_device *pdev)
 {
 	struct rcar_pcie *pcie;
 	unsigned int data;
-	struct of_pci_range range;
-	struct of_pci_range_parser parser;
 	const struct of_device_id *of_id;
-	int err, win = 0;
+	int err;
 	int (*hw_init_fn)(struct rcar_pcie *);
 
 	pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
@@ -940,16 +987,9 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 	pcie->dev = &pdev->dev;
 	platform_set_drvdata(pdev, pcie);
 
-	/* Get the bus range */
-	if (of_pci_parse_bus_range(pdev->dev.of_node, &pcie->busn)) {
-		dev_err(&pdev->dev, "failed to parse bus-range property\n");
-		return -EINVAL;
-	}
+	INIT_LIST_HEAD(&pcie->resources);
 
-	if (of_pci_range_parser_init(&parser, pdev->dev.of_node)) {
-		dev_err(&pdev->dev, "missing ranges property\n");
-		return -EINVAL;
-	}
+	rcar_pcie_parse_request_of_pci_ranges(pcie);
 
 	err = rcar_pcie_get_resources(pdev, pcie);
 	if (err < 0) {
@@ -957,16 +997,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 		return err;
 	}
 
-	for_each_of_pci_range(&parser, &range) {
-		err = of_pci_range_to_resource(&range, pdev->dev.of_node,
-						&pcie->res[win++]);
-		if (err < 0)
-			return err;
-
-		if (win > RCAR_PCI_MAX_RESOURCES)
-			break;
-	}
-
 	 err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
 	 if (err)
 		return err;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 1/3] PCI: rcar: Convert to DT resource parsing API
@ 2015-11-25 15:30   ` Phil Edworthy
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, Phil Edworthy

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
in this driver we can utilise of_pci_get_host_bridge_resources().

This is similar to changes made to the generic PCI host driver in commit
dbf9826d "PCI: generic: Convert to DT resource parsing API".

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
---
v2:
 - Remove incorrect res_valid check
---
 drivers/pci/host/pcie-rcar.c | 116 +++++++++++++++++++++++++++----------------
 1 file changed, 73 insertions(+), 43 deletions(-)

diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index f4fa6c5..d12faf4 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -108,8 +108,6 @@
 #define RCAR_PCI_MAX_RESOURCES 4
 #define MAX_NR_INBOUND_MAPS 6
 
-static unsigned long global_io_offset;
-
 struct rcar_msi {
 	DECLARE_BITMAP(used, INT_PCI_MSI_NR);
 	struct irq_domain *domain;
@@ -138,8 +136,7 @@ struct rcar_pcie {
 #endif
 	struct device		*dev;
 	void __iomem		*base;
-	struct resource		res[RCAR_PCI_MAX_RESOURCES];
-	struct resource		busn;
+	struct list_head	resources;
 	int			root_bus_nr;
 	struct clk		*clk;
 	struct clk		*bus_clk;
@@ -323,10 +320,9 @@ static struct pci_ops rcar_pcie_ops = {
 	.write	= rcar_pcie_write_conf,
 };
 
-static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
+static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie,
+				   struct resource *res)
 {
-	struct resource *res = &pcie->res[win];
-
 	/* Setup PCIe address space mappings for each resource */
 	resource_size_t size;
 	resource_size_t res_start;
@@ -359,31 +355,33 @@ static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
 	rcar_pci_write_reg(pcie, mask, PCIEPTCTLR(win));
 }
 
-static int rcar_pcie_setup(struct list_head *resource, struct rcar_pcie *pcie)
+static int rcar_pcie_setup(struct list_head *resource, struct rcar_pcie *pci)
 {
-	struct resource *res;
-	int i;
-
-	pcie->root_bus_nr = pcie->busn.start;
+	struct resource_entry *win;
+	int i = 0;
 
 	/* Setup PCI resources */
-	for (i = 0; i < RCAR_PCI_MAX_RESOURCES; i++) {
+	resource_list_for_each_entry(win, &pci->resources) {
+		struct resource *res = win->res;
 
-		res = &pcie->res[i];
 		if (!res->flags)
 			continue;
 
-		rcar_pcie_setup_window(i, pcie);
-
-		if (res->flags & IORESOURCE_IO) {
-			phys_addr_t io_start = pci_pio_to_address(res->start);
-			pci_ioremap_io(global_io_offset, io_start);
-			global_io_offset += SZ_64K;
+		switch (resource_type(res)) {
+		case IORESOURCE_IO:
+		case IORESOURCE_MEM:
+			rcar_pcie_setup_window(i, pci, res);
+			i++;
+			break;
+		case IORESOURCE_BUS:
+			pci->root_bus_nr = res->start;
+			break;
+		default:
+			continue;
 		}
 
 		pci_add_resource(resource, res);
 	}
-	pci_add_resource(resource, &pcie->busn);
 
 	return 1;
 }
@@ -923,14 +921,63 @@ static const struct of_device_id rcar_pcie_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, rcar_pcie_of_match);
 
+static void rcar_pcie_release_of_pci_ranges(struct rcar_pcie *pci)
+{
+	pci_free_resource_list(&pci->resources);
+}
+
+static int rcar_pcie_parse_request_of_pci_ranges(struct rcar_pcie *pci)
+{
+	int err;
+	struct device *dev = pci->dev;
+	struct device_node *np = dev->of_node;
+	resource_size_t iobase;
+	struct resource_entry *win;
+
+	err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources, &iobase);
+	if (err)
+		return err;
+
+	resource_list_for_each_entry(win, &pci->resources) {
+		struct resource *parent, *res = win->res;
+
+		switch (resource_type(res)) {
+		case IORESOURCE_IO:
+			parent = &ioport_resource;
+			err = pci_remap_iospace(res, iobase);
+			if (err) {
+				dev_warn(dev, "error %d: failed to map resource %pR\n",
+					 err, res);
+				continue;
+			}
+			break;
+		case IORESOURCE_MEM:
+			parent = &iomem_resource;
+			break;
+
+		case IORESOURCE_BUS:
+		default:
+			continue;
+		}
+
+		err = devm_request_resource(dev, parent, res);
+		if (err)
+			goto out_release_res;
+	}
+
+	return 0;
+
+out_release_res:
+	rcar_pcie_release_of_pci_ranges(pci);
+	return err;
+}
+
 static int rcar_pcie_probe(struct platform_device *pdev)
 {
 	struct rcar_pcie *pcie;
 	unsigned int data;
-	struct of_pci_range range;
-	struct of_pci_range_parser parser;
 	const struct of_device_id *of_id;
-	int err, win = 0;
+	int err;
 	int (*hw_init_fn)(struct rcar_pcie *);
 
 	pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
@@ -940,16 +987,9 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 	pcie->dev = &pdev->dev;
 	platform_set_drvdata(pdev, pcie);
 
-	/* Get the bus range */
-	if (of_pci_parse_bus_range(pdev->dev.of_node, &pcie->busn)) {
-		dev_err(&pdev->dev, "failed to parse bus-range property\n");
-		return -EINVAL;
-	}
+	INIT_LIST_HEAD(&pcie->resources);
 
-	if (of_pci_range_parser_init(&parser, pdev->dev.of_node)) {
-		dev_err(&pdev->dev, "missing ranges property\n");
-		return -EINVAL;
-	}
+	rcar_pcie_parse_request_of_pci_ranges(pcie);
 
 	err = rcar_pcie_get_resources(pdev, pcie);
 	if (err < 0) {
@@ -957,16 +997,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 		return err;
 	}
 
-	for_each_of_pci_range(&parser, &range) {
-		err = of_pci_range_to_resource(&range, pdev->dev.of_node,
-						&pcie->res[win++]);
-		if (err < 0)
-			return err;
-
-		if (win > RCAR_PCI_MAX_RESOURCES)
-			break;
-	}
-
 	 err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
 	 if (err)
 		return err;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/3] Revert "PCI: rcar: Build pcie-rcar.c only on ARM"
  2015-11-25 15:30 ` Phil Edworthy
@ 2015-11-25 15:30   ` Phil Edworthy
  -1 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, 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.edworthy@renesas.com>
---
v2: No changes
---
 drivers/pci/host/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index 7a31ebbc..e673d56 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -48,8 +48,7 @@ config PCI_RCAR_GEN2
 
 config PCI_RCAR_GEN2_PCIE
 	bool "Renesas R-Car PCIe controller"
-	depends on ARM
-	depends on ARCH_SHMOBILE || COMPILE_TEST
+	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
 	help
 	  Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/3] Revert "PCI: rcar: Build pcie-rcar.c only on ARM"
@ 2015-11-25 15:30   ` Phil Edworthy
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, 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.edworthy@renesas.com>
---
v2: No changes
---
 drivers/pci/host/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index 7a31ebbc..e673d56 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -48,8 +48,7 @@ config PCI_RCAR_GEN2
 
 config PCI_RCAR_GEN2_PCIE
 	bool "Renesas R-Car PCIe controller"
-	depends on ARM
-	depends on ARCH_SHMOBILE || COMPILE_TEST
+	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
 	help
 	  Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] PCI: pcie-rcar: Add support for R-Car H3.
  2015-11-25 15:30 ` Phil Edworthy
@ 2015-11-25 15:30   ` Phil Edworthy
  -1 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, Harunobu Kurokawa

From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>

R-Car H3 device is r8a7795

Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
v2: No changes
---
 Documentation/devicetree/bindings/pci/rcar-pci.txt | 3 ++-
 drivers/pci/host/pcie-rcar.c                       | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt
index 29d3b98..ab2e75f 100644
--- a/Documentation/devicetree/bindings/pci/rcar-pci.txt
+++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt
@@ -2,7 +2,8 @@
 
 Required properties:
 - compatible: should contain one of the following
-	"renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791"
+	"renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791",
+	"renesas,pcie-r8a7795"
 - reg: base address and length of the pcie controller registers.
 - #address-cells: set to <3>
 - #size-cells: set to <2>
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index d12faf4..0c819a00 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -917,6 +917,7 @@ static const struct of_device_id rcar_pcie_of_match[] = {
 	{ .compatible = "renesas,pcie-r8a7779", .data = rcar_pcie_hw_init_h1 },
 	{ .compatible = "renesas,pcie-r8a7790", .data = rcar_pcie_hw_init },
 	{ .compatible = "renesas,pcie-r8a7791", .data = rcar_pcie_hw_init },
+	{ .compatible = "renesas,pcie-r8a7795", .data = rcar_pcie_hw_init },
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_pcie_of_match);
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] PCI: pcie-rcar: Add support for R-Car H3.
@ 2015-11-25 15:30   ` Phil Edworthy
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-11-25 15:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Wolfram Sang, Geert Uytterhoeven, Simon Horman, linux-pci,
	linux-sh, linux-kernel, Harunobu Kurokawa

From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>

R-Car H3 device is r8a7795

Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
v2: No changes
---
 Documentation/devicetree/bindings/pci/rcar-pci.txt | 3 ++-
 drivers/pci/host/pcie-rcar.c                       | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt
index 29d3b98..ab2e75f 100644
--- a/Documentation/devicetree/bindings/pci/rcar-pci.txt
+++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt
@@ -2,7 +2,8 @@
 
 Required properties:
 - compatible: should contain one of the following
-	"renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791"
+	"renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791",
+	"renesas,pcie-r8a7795"
 - reg: base address and length of the pcie controller registers.
 - #address-cells: set to <3>
 - #size-cells: set to <2>
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index d12faf4..0c819a00 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -917,6 +917,7 @@ static const struct of_device_id rcar_pcie_of_match[] = {
 	{ .compatible = "renesas,pcie-r8a7779", .data = rcar_pcie_hw_init_h1 },
 	{ .compatible = "renesas,pcie-r8a7790", .data = rcar_pcie_hw_init },
 	{ .compatible = "renesas,pcie-r8a7791", .data = rcar_pcie_hw_init },
+	{ .compatible = "renesas,pcie-r8a7795", .data = rcar_pcie_hw_init },
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_pcie_of_match);
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
  2015-11-25 15:30 ` Phil Edworthy
@ 2015-11-25 16:40   ` Bjorn Helgaas
  -1 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2015-11-25 16:40 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven, Simon Horman,
	linux-pci, linux-sh, linux-kernel

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 understand correctly, "PCI: rcar: Convert to DT resource parsing
API" doesn't fix a build problem in the current tree; rather, it
removes a dependency on ARM so that we can build it on ARM64.  

> , 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.
> 
> Tested on arm Koelsch board, all ok.
> 
> Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7 from
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with PCI
> next merged. 
> Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")

I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
(Was that posted to linux-pci?  I don't see it in patchwork or my
linux-pci archives, so I hadn't seen it yet.)

How exactly is that related to this series?  If I merge these before
Marc's change, do we have a tree that builds for arm64 but doesn't
work?

What about the PCIe clock and DT changes you mention?  Is there a
reason to keep them separate?  Would it be feasible to include the DT
changes in the same patch as the driver change that uses those
changes?

Bjorn

> Resent with whole series marked 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 +-
>  drivers/pci/host/Kconfig                           |   3 +-
>  drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
>  3 files changed, 77 insertions(+), 46 deletions(-)
> 
> -- 
> 2.5.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
@ 2015-11-25 16:40   ` Bjorn Helgaas
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2015-11-25 16:40 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven, Simon Horman,
	linux-pci, linux-sh, linux-kernel

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 understand correctly, "PCI: rcar: Convert to DT resource parsing
API" doesn't fix a build problem in the current tree; rather, it
removes a dependency on ARM so that we can build it on ARM64.  

> , 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.
> 
> Tested on arm Koelsch board, all ok.
> 
> Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7 from
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with PCI
> next merged. 
> Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")

I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
(Was that posted to linux-pci?  I don't see it in patchwork or my
linux-pci archives, so I hadn't seen it yet.)

How exactly is that related to this series?  If I merge these before
Marc's change, do we have a tree that builds for arm64 but doesn't
work?

What about the PCIe clock and DT changes you mention?  Is there a
reason to keep them separate?  Would it be feasible to include the DT
changes in the same patch as the driver change that uses those
changes?

Bjorn

> Resent with whole series marked 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 +-
>  drivers/pci/host/Kconfig                           |   3 +-
>  drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
>  3 files changed, 77 insertions(+), 46 deletions(-)
> 
> -- 
> 2.5.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
  2015-11-25 16:40   ` Bjorn Helgaas
  (?)
@ 2015-11-26  8:32   ` Phil Edworthy
  2015-12-09 16:59       ` Bjorn Helgaas
  -1 siblings, 1 reply; 16+ messages in thread
From: Phil Edworthy @ 2015-11-26  8:32 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven, Simon Horman,
	linux-pci, linux-sh, linux-kernel

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 understand correctly, "PCI: rcar: Convert to DT resource parsing
> API" doesn't fix a build problem in the current tree; rather, it
> removes a dependency on ARM so that we can build it on ARM64.
v4.4 doesn't have a build problem because commit 7c537c67d2e4 ensures
it doesn't get built on arm64. If we revert this commit, then there is a
build failure as the pci_ioremap_io() function is not available on arm64.
That's the build failure which "PCI: rcar: Convert to DT resource parsing API"
fixes.

> > , 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.
> >
> > Tested on arm Koelsch board, all ok.
> >
> > Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7
> from
> > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with
> PCI
> > next merged.
> > Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> > ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")
> 
> I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
> (Was that posted to linux-pci?  I don't see it in patchwork or my
> linux-pci archives, so I hadn't seen it yet.)
Ok, yes that's the patch.

> How exactly is that related to this series?  If I merge these before
> Marc's change, do we have a tree that builds for arm64 but doesn't
> work?
Correct.

> What about the PCIe clock and DT changes you mention?  Is there a
> reason to keep them separate?  Would it be feasible to include the DT
> changes in the same patch as the driver change that uses those
> changes?
The approach for all other drivers has been to keep these separate. There
are no changes to the dt bindings, it's just adding the node to the new
device and board, so there is no problem with ordering of these patches.

Thanks
Phil

> Bjorn
> 
> > Resent with whole series marked 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 +-
> >  drivers/pci/host/Kconfig                           |   3 +-
> >  drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
> >  3 files changed, 77 insertions(+), 46 deletions(-)
> >
> > --
> > 2.5.0
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
  2015-11-26  8:32   ` Phil Edworthy
@ 2015-12-09 16:59       ` Bjorn Helgaas
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2015-12-09 16:59 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven, Simon Horman,
	linux-pci, linux-sh, linux-kernel

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 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 understand correctly, "PCI: rcar: Convert to DT resource parsing
> > API" doesn't fix a build problem in the current tree; rather, it
> > removes a dependency on ARM so that we can build it on ARM64.
> v4.4 doesn't have a build problem because commit 7c537c67d2e4 ensures
> it doesn't get built on arm64. If we revert this commit, then there is a
> build failure as the pci_ioremap_io() function is not available on arm64.
> That's the build failure which "PCI: rcar: Convert to DT resource parsing API"
> fixes.
> 
> > > , 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.
> > >
> > > Tested on arm Koelsch board, all ok.
> > >
> > > Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7
> > from
> > > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with
> > PCI
> > > next merged.
> > > Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> > > ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")
> > 
> > I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
> > (Was that posted to linux-pci?  I don't see it in patchwork or my
> > linux-pci archives, so I hadn't seen it yet.)
> Ok, yes that's the patch.
> 
> > How exactly is that related to this series?  If I merge these before
> > Marc's change, do we have a tree that builds for arm64 but doesn't
> > work?
> Correct.

OK, great!  I just asked Linus to pull that patch (3845d2953aac ("PCI/MSI:
Only use the generic MSI layer when domain is hierarchical")) for v4.4, so
these changes will be merged after that one.

I put all three of these on pci/host-rcar for v4.5.

Simon, I only see your explicit ack on the first one, but I assume you're
OK with all three.  Let me know if otherwise.

> > What about the PCIe clock and DT changes you mention?  Is there a
> > reason to keep them separate?  Would it be feasible to include the DT
> > changes in the same patch as the driver change that uses those
> > changes?
> The approach for all other drivers has been to keep these separate. There
> are no changes to the dt bindings, it's just adding the node to the new
> device and board, so there is no problem with ordering of these patches.
> 
> Thanks
> Phil
> 
> > Bjorn
> > 
> > > Resent with whole series marked 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 +-
> > >  drivers/pci/host/Kconfig                           |   3 +-
> > >  drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
> > >  3 files changed, 77 insertions(+), 46 deletions(-)
> > >
> > > --
> > > 2.5.0
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
@ 2015-12-09 16:59       ` Bjorn Helgaas
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2015-12-09 16:59 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven, Simon Horman,
	linux-pci, linux-sh, linux-kernel

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 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 understand correctly, "PCI: rcar: Convert to DT resource parsing
> > API" doesn't fix a build problem in the current tree; rather, it
> > removes a dependency on ARM so that we can build it on ARM64.
> v4.4 doesn't have a build problem because commit 7c537c67d2e4 ensures
> it doesn't get built on arm64. If we revert this commit, then there is a
> build failure as the pci_ioremap_io() function is not available on arm64.
> That's the build failure which "PCI: rcar: Convert to DT resource parsing API"
> fixes.
> 
> > > , 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.
> > >
> > > Tested on arm Koelsch board, all ok.
> > >
> > > Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7
> > from
> > > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with
> > PCI
> > > next merged.
> > > Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> > > ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")
> > 
> > I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
> > (Was that posted to linux-pci?  I don't see it in patchwork or my
> > linux-pci archives, so I hadn't seen it yet.)
> Ok, yes that's the patch.
> 
> > How exactly is that related to this series?  If I merge these before
> > Marc's change, do we have a tree that builds for arm64 but doesn't
> > work?
> Correct.

OK, great!  I just asked Linus to pull that patch (3845d2953aac ("PCI/MSI:
Only use the generic MSI layer when domain is hierarchical")) for v4.4, so
these changes will be merged after that one.

I put all three of these on pci/host-rcar for v4.5.

Simon, I only see your explicit ack on the first one, but I assume you're
OK with all three.  Let me know if otherwise.

> > What about the PCIe clock and DT changes you mention?  Is there a
> > reason to keep them separate?  Would it be feasible to include the DT
> > changes in the same patch as the driver change that uses those
> > changes?
> The approach for all other drivers has been to keep these separate. There
> are no changes to the dt bindings, it's just adding the node to the new
> device and board, so there is no problem with ordering of these patches.
> 
> Thanks
> Phil
> 
> > Bjorn
> > 
> > > Resent with whole series marked 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 +-
> > >  drivers/pci/host/Kconfig                           |   3 +-
> > >  drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
> > >  3 files changed, 77 insertions(+), 46 deletions(-)
> > >
> > > --
> > > 2.5.0
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
  2015-12-09 16:59       ` Bjorn Helgaas
@ 2015-12-10  4:27         ` Simon Horman
  -1 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2015-12-10  4:27 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Phil Edworthy, Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven,
	linux-pci, linux-sh, linux-kernel

On Wed, Dec 09, 2015 at 10:59:54AM -0600, 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 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 understand correctly, "PCI: rcar: Convert to DT resource parsing
> > > API" doesn't fix a build problem in the current tree; rather, it
> > > removes a dependency on ARM so that we can build it on ARM64.
> > v4.4 doesn't have a build problem because commit 7c537c67d2e4 ensures
> > it doesn't get built on arm64. If we revert this commit, then there is a
> > build failure as the pci_ioremap_io() function is not available on arm64.
> > That's the build failure which "PCI: rcar: Convert to DT resource parsing API"
> > fixes.
> > 
> > > > , 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.
> > > >
> > > > Tested on arm Koelsch board, all ok.
> > > >
> > > > Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7
> > > from
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with
> > > PCI
> > > > next merged.
> > > > Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> > > > ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")
> > > 
> > > I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
> > > (Was that posted to linux-pci?  I don't see it in patchwork or my
> > > linux-pci archives, so I hadn't seen it yet.)
> > Ok, yes that's the patch.
> > 
> > > How exactly is that related to this series?  If I merge these before
> > > Marc's change, do we have a tree that builds for arm64 but doesn't
> > > work?
> > Correct.
> 
> OK, great!  I just asked Linus to pull that patch (3845d2953aac ("PCI/MSI:
> Only use the generic MSI layer when domain is hierarchical")) for v4.4, so
> these changes will be merged after that one.
> 
> I put all three of these on pci/host-rcar for v4.5.
> 
> Simon, I only see your explicit ack on the first one, but I assume you're
> OK with all three.  Let me know if otherwise.

Sorry for not being clearer: I'm ok with these changes.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
@ 2015-12-10  4:27         ` Simon Horman
  0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2015-12-10  4:27 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Phil Edworthy, Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven,
	linux-pci, linux-sh, linux-kernel

On Wed, Dec 09, 2015 at 10:59:54AM -0600, 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 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 understand correctly, "PCI: rcar: Convert to DT resource parsing
> > > API" doesn't fix a build problem in the current tree; rather, it
> > > removes a dependency on ARM so that we can build it on ARM64.
> > v4.4 doesn't have a build problem because commit 7c537c67d2e4 ensures
> > it doesn't get built on arm64. If we revert this commit, then there is a
> > build failure as the pci_ioremap_io() function is not available on arm64.
> > That's the build failure which "PCI: rcar: Convert to DT resource parsing API"
> > fixes.
> > 
> > > > , 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.
> > > >
> > > > Tested on arm Koelsch board, all ok.
> > > >
> > > > Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7
> > > from
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with
> > > PCI
> > > > next merged.
> > > > Apart from patches to add the PCIe clock and DT nodes, it also needs this fix:
> > > > ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")
> > > 
> > > I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
> > > (Was that posted to linux-pci?  I don't see it in patchwork or my
> > > linux-pci archives, so I hadn't seen it yet.)
> > Ok, yes that's the patch.
> > 
> > > How exactly is that related to this series?  If I merge these before
> > > Marc's change, do we have a tree that builds for arm64 but doesn't
> > > work?
> > Correct.
> 
> OK, great!  I just asked Linus to pull that patch (3845d2953aac ("PCI/MSI:
> Only use the generic MSI layer when domain is hierarchical")) for v4.4, so
> these changes will be merged after that one.
> 
> I put all three of these on pci/host-rcar for v4.5.
> 
> Simon, I only see your explicit ack on the first one, but I assume you're
> OK with all three.  Let me know if otherwise.

Sorry for not being clearer: I'm ok with these changes.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64
  2015-12-09 16:59       ` Bjorn Helgaas
  (?)
  (?)
@ 2015-12-10 18:12       ` Phil Edworthy
  -1 siblings, 0 replies; 16+ messages in thread
From: Phil Edworthy @ 2015-12-10 18:12 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Bjorn Helgaas, Wolfram Sang, Geert Uytterhoeven, Simon Horman,
	linux-pci, linux-sh, linux-kernel

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 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 understand correctly, "PCI: rcar: Convert to DT resource parsing
> > > API" doesn't fix a build problem in the current tree; rather, it
> > > removes a dependency on ARM so that we can build it on ARM64.
> > v4.4 doesn't have a build problem because commit 7c537c67d2e4 ensures
> > it doesn't get built on arm64. If we revert this commit, then there is a
> > build failure as the pci_ioremap_io() function is not available on arm64.
> > That's the build failure which "PCI: rcar: Convert to DT resource parsing API"
> > fixes.
> >
> > > > , 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.
> > > >
> > > > Tested on arm Koelsch board, all ok.
> > > >
> > > > Tested on arm64 Salvator-X board using renesas-drivers-2015-10-27-v4.3-rc7
> > > from
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git with
> > > PCI
> > > > next merged.
> > > > Apart from patches to add the PCIe clock and DT nodes, it also needs this
> fix:
> > > > ("PCI: MSI: Only use the generic MSI layer when domain is hierarchical")
> > >
> > > I assume you mean this one from Marc: https://lkml.org/lkml/2015/11/23/388
> > > (Was that posted to linux-pci?  I don't see it in patchwork or my
> > > linux-pci archives, so I hadn't seen it yet.)
> > Ok, yes that's the patch.
> >
> > > How exactly is that related to this series?  If I merge these before
> > > Marc's change, do we have a tree that builds for arm64 but doesn't
> > > work?
> > Correct.
> 
> OK, great!  I just asked Linus to pull that patch (3845d2953aac ("PCI/MSI:
> Only use the generic MSI layer when domain is hierarchical")) for v4.4, so
> these changes will be merged after that one.
> 
> I put all three of these on pci/host-rcar for v4.5.
Good to hear!

Thanks
Phil

> Simon, I only see your explicit ack on the first one, but I assume you're
> OK with all three.  Let me know if otherwise.
> 
> > > What about the PCIe clock and DT changes you mention?  Is there a
> > > reason to keep them separate?  Would it be feasible to include the DT
> > > changes in the same patch as the driver change that uses those
> > > changes?
> > The approach for all other drivers has been to keep these separate. There
> > are no changes to the dt bindings, it's just adding the node to the new
> > device and board, so there is no problem with ordering of these patches.
> >
> > Thanks
> > Phil
> >
> > > Bjorn
> > >
> > > > Resent with whole series marked 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 +-
> > > >  drivers/pci/host/Kconfig                           |   3 +-
> > > >  drivers/pci/host/pcie-rcar.c                       | 117 +++++++++++++--------
> > > >  3 files changed, 77 insertions(+), 46 deletions(-)
> > > >
> > > > --
> > > > 2.5.0
> > > >
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-12-10 18:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 15:30 [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64 Phil Edworthy
2015-11-25 15:30 ` Phil Edworthy
2015-11-25 15:30 ` [PATCH v2 1/3] PCI: rcar: Convert to DT resource parsing API Phil Edworthy
2015-11-25 15:30   ` Phil Edworthy
2015-11-25 15:30 ` [PATCH v2 2/3] Revert "PCI: rcar: Build pcie-rcar.c only on ARM" Phil Edworthy
2015-11-25 15:30   ` Phil Edworthy
2015-11-25 15:30 ` [PATCH v2 3/3] PCI: pcie-rcar: Add support for R-Car H3 Phil Edworthy
2015-11-25 15:30   ` Phil Edworthy
2015-11-25 16:40 ` [Resend: PATCH v2 0/3] Fix rcar-pcie for arm64 Bjorn Helgaas
2015-11-25 16:40   ` Bjorn Helgaas
2015-11-26  8:32   ` Phil Edworthy
2015-12-09 16:59     ` Bjorn Helgaas
2015-12-09 16:59       ` Bjorn Helgaas
2015-12-10  4:27       ` Simon Horman
2015-12-10  4:27         ` Simon Horman
2015-12-10 18:12       ` Phil Edworthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.