This patch series does modifications to pcie-xilinx.c, to support common
driver on both Zynq and Microblaze architectures.
Microblaze pci-common.c has been modified to support generic driver.
Bharat Kumar Gogada (5):
PCI: xilinx: Removing xilinx_pcie_parse_and_add_res function
PCI: xilinx: Removing struct hw_pci structure.
PCI: xilinx: Modifying AXI PCIe Host Bridge driver to work on both
Zynq and Microblaze
PCI: xilinx: Updating Zynq PCI binding documentation with
Microblaze node.
Microblaze: Modifying microblaze PCI subsytem to support generic
Xilinx AXI PCIe Host Bridge IP driver
.../devicetree/bindings/pci/xilinx-pcie.txt | 32 +++-
arch/microblaze/Kconfig | 3 +
arch/microblaze/pci/pci-common.c | 56 ++----
drivers/pci/host/Kconfig | 2 +-
drivers/pci/host/pcie-xilinx.c | 191 +++------------------
5 files changed, 66 insertions(+), 218 deletions(-)
--
2.1.1
Removing xilinx_pcie_parse_and_add_res function replacing with
of_pci_get_host_bridge_resources API.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
Changes:
Removing xilinx_pcie_parse_and_add_res function and replacing it
with of_pci_get_host_bridge_resources kernel API which does the same.
---
drivers/pci/host/pcie-xilinx.c | 107 ++---------------------------------------
1 file changed, 5 insertions(+), 102 deletions(-)
@@ -94,9 +94,6 @@/* Number of MSI IRQs */#define XILINX_NUM_MSI_IRQS 128-/* Number of Memory Resources */-#define XILINX_MAX_NUM_RESOURCES 3-/***structxilinx_pcie_port-PCIeportinformation*@reg_base:IOMappedRegisterBase
@@ -659,97 +655,6 @@ static struct pci_bus *xilinx_pcie_scan_bus(int nr, struct pci_sys_data *sys)}/**-*xilinx_pcie_parse_and_add_res-Addresourcesbyparsingranges-*@port:PCIeportinformation-*-*Return:'0'onsuccessanderrorvalueonfailure-*/-staticintxilinx_pcie_parse_and_add_res(structxilinx_pcie_port*port)-{-structdevice*dev=port->dev;-structdevice_node*node=dev->of_node;-structresource*mem;-resource_size_toffset;-structof_pci_range_parserparser;-structof_pci_rangerange;-structresource_entry*win;-interr=0,mem_resno=0;--/* Get the ranges */-if(of_pci_range_parser_init(&parser,node)){-dev_err(dev,"missing \"ranges\" property\n");-return-EINVAL;-}--/* Parse the ranges and add the resources found to the list */-for_each_of_pci_range(&parser,&range){--if(mem_resno>=XILINX_MAX_NUM_RESOURCES){-dev_err(dev,"Maximum memory resources exceeded\n");-return-EINVAL;-}--mem=devm_kmalloc(dev,sizeof(*mem),GFP_KERNEL);-if(!mem){-err=-ENOMEM;-gotofree_resources;-}--of_pci_range_to_resource(&range,node,mem);--switch(mem->flags&IORESOURCE_TYPE_BITS){-caseIORESOURCE_MEM:-offset=range.cpu_addr-range.pci_addr;-mem_resno++;-break;-default:-err=-EINVAL;-break;-}--if(err<0){-dev_warn(dev,"Invalid resource found %pR\n",mem);-continue;-}--err=request_resource(&iomem_resource,mem);-if(err)-gotofree_resources;--pci_add_resource_offset(&port->resources,mem,offset);-}--/* Get the bus range */-if(of_pci_parse_bus_range(node,&port->bus_range)){-u32val=pcie_read(port,XILINX_PCIE_REG_BIR);-u8last;--last=(val&XILINX_PCIE_BIR_ECAM_SZ_MASK)>>-XILINX_PCIE_BIR_ECAM_SZ_SHIFT;--port->bus_range=(structresource){-.name=node->name,-.start=0,-.end=last,-.flags=IORESOURCE_BUS,-};-}--/* Register bus resource */-pci_add_resource(&port->resources,&port->bus_range);--return0;--free_resources:-release_child_resources(&iomem_resource);-resource_list_for_each_entry(win,&port->resources)-devm_kfree(dev,win->res);-pci_free_resource_list(&port->resources);--returnerr;-}--/***xilinx_pcie_parse_dt-ParseDevicetree*@port:PCIeportinformation*
@@ -802,6 +707,8 @@ static int xilinx_pcie_probe(struct platform_device *pdev)structhw_pcihw;structdevice*dev=&pdev->dev;interr;+resource_size_tiobase=0;+LIST_HEAD(res);if(!dev->of_node)return-ENODEV;
@@ -17,7 +17,7 @@ Required properties: Please refer to the standard PCI bus binding document for a more detailed explanation-Optional properties:+Optional properties for Zynq/Microblaze: - bus-range: PCI bus numbers covered Interrupt controller child node
@@ -38,13 +38,13 @@ the four INTx interrupts in ISR and route them to this domain. Example: ++++++++-+Zynq: pci_express: axi-pcie at 50000000 { #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; compatible = "xlnx,axi-pcie-host-1.00.a";- reg = < 0x50000000 0x10000000 >;+ reg = < 0x50000000 0x1000000 >; device_type = "pci"; interrupts = < 0 52 4 >; interrupt-map-mask = <0 0 0 7>;
Removing struct hw_pci and adding generic PCI core API's.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
Changes:
Removing architecure dependecy structure struct hw_pci which is ARM 32-bit
specific structure, and adding generic PCI core API's to register to
PCI subsytem.
Removing funtions which are not being used with generic API's.
---
drivers/pci/host/pcie-xilinx.c | 82 +++++++++---------------------------------
1 file changed, 16 insertions(+), 66 deletions(-)
@@ -163,7 +157,7 @@ static void xilinx_pcie_clear_err_interrupts(struct xilinx_pcie_port *port)*/staticboolxilinx_pcie_valid_device(structpci_bus*bus,unsignedintdevfn){-structxilinx_pcie_port*port=sys_to_pcie(bus->sysdata);+structxilinx_pcie_port*port=bus->sysdata;/* Check if link is up when trying to access downstream ports */if(bus->number!=port->root_busno)
Modifying Xilinx AXI PCIe Host Bridge Soft IP driver to work on both
Zynq and Microblaze Architectures.
With these modifications drivers/pci/host/pcie-xilinx.c, will
work on both Zynq and Microblaze Architectures.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
Changes:
Added #ifdef to pci_fixup_irqs which is ARM specific API.
---
drivers/pci/host/pcie-xilinx.c | 2 ++
1 file changed, 2 insertions(+)
This patch does required modifications to microblaze PCI subsystem, to
work with generic driver (drivers/pci/host/pcie-xilinx.c) on Microblaze
and Zynq.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
---
Changes:
Removed pcibios_get_phb_of_node in pci-common.c, using generic version
instead.
Modified pcibios_fixup_bus in pci-common.c, as per generic architecuture.
Modified pcibios_align_resource in pci-common.c, as per generic
architecuture, removed temporary variable.
Removed pci_domain_nr in pci-common.c, instead using generic code.
Added pcibios_add_device in pci-common.c, as per generic architecuture.
Adding Kernel configuration in arch/microblaze as required for generic PCI
domains.
Added kernel configuration for driver to support Microblaze.
---
arch/microblaze/Kconfig | 3 +++
arch/microblaze/pci/pci-common.c | 56 +++++++---------------------------------
drivers/pci/host/Kconfig | 2 +-
3 files changed, 14 insertions(+), 47 deletions(-)
@@ -123,17 +123,6 @@ unsigned long pci_address_to_pio(phys_addr_t address)}EXPORT_SYMBOL_GPL(pci_address_to_pio);-/*-*Returnthedomainnumberforthisbus.-*/-intpci_domain_nr(structpci_bus*bus)-{-structpci_controller*hose=pci_bus_to_host(bus);--returnhose->global_number;-}-EXPORT_SYMBOL(pci_domain_nr);-/* This routine is meant to be used early during boot, when the*PCIbusnumbershavenotyetbeenassigned,andyouneedto*issuePCIconfigcyclestoanOFdevice.
@@ -863,26 +852,10 @@ void pcibios_setup_bus_devices(struct pci_bus *bus)voidpcibios_fixup_bus(structpci_bus*bus){-/* When called from the generic PCI probe, read PCI<->PCI bridge-*bases.Thisis-not-calledwhengeneratingthePCItreefrom-*theOFdevice-tree.-*/-if(bus->self!=NULL)-pci_read_bridge_bases(bus);--/* Now fixup the bus bus */-pcibios_setup_bus_self(bus);--/* Now fixup devices on that bus */-pcibios_setup_bus_devices(bus);+/* nothing to do */}EXPORT_SYMBOL(pcibios_fixup_bus);-staticintskip_isa_ioresource_align(structpci_dev*dev)-{-return0;-}-/**Weneedtoavoidcollisionswith`mirrored'VGAports*andotherstrangeISAhardware,sowealwayswantthe
@@ -899,20 +872,18 @@ static int skip_isa_ioresource_align(struct pci_dev *dev)resource_size_tpcibios_align_resource(void*data,conststructresource*res,resource_size_tsize,resource_size_talign){-structpci_dev*dev=data;-resource_size_tstart=res->start;--if(res->flags&IORESOURCE_IO){-if(skip_isa_ioresource_align(dev))-returnstart;-if(start&0x300)-start=(start+0x3ff)&~0x3ff;-}--returnstart;+returnres->start;}EXPORT_SYMBOL(pcibios_align_resource);+intpcibios_add_device(structpci_dev*dev)+{+dev->irq=of_irq_parse_and_map_pci(dev,0,0);++return0;+}+EXPORT_SYMBOL(pcibios_add_device);+/**Reparentresourcechildrenofprthatconflictwithres*underres,andmakeresreplacethosechildren.
Subject: [PATCH V4 5/5] Microblaze: Modifying microblaze PCI subsytem to
support generic Xilinx AXI PCIe Host Bridge IP driver
This patch does required modifications to microblaze PCI subsystem, to work
with generic driver (drivers/pci/host/pcie-xilinx.c) on Microblaze and Zynq.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
---
Changes:
Removed pcibios_get_phb_of_node in pci-common.c, using generic version
instead.
Modified pcibios_fixup_bus in pci-common.c, as per generic architecuture.
Modified pcibios_align_resource in pci-common.c, as per generic
architecuture, removed temporary variable.
Removed pci_domain_nr in pci-common.c, instead using generic code.
Added pcibios_add_device in pci-common.c, as per generic architecuture.
Adding Kernel configuration in arch/microblaze as required for generic PCI
domains.
Added kernel configuration for driver to support Microblaze.
---
arch/microblaze/Kconfig | 3 +++
arch/microblaze/pci/pci-common.c | 56 +++++++---------------------------------
drivers/pci/host/Kconfig | 2 +-
3 files changed, 14 insertions(+), 47 deletions(-)
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index
@@ -123,17 +123,6 @@ unsigned long pci_address_to_pio(phys_addr_t
address) } EXPORT_SYMBOL_GPL(pci_address_to_pio);
-/*
- * Return the domain number for this bus.
- */
-int pci_domain_nr(struct pci_bus *bus)
-{
- struct pci_controller *hose = pci_bus_to_host(bus);
-
- return hose->global_number;
-}
-EXPORT_SYMBOL(pci_domain_nr);
-
/* This routine is meant to be used early during boot, when the
* PCI bus numbers have not yet been assigned, and you need to
* issue PCI config cycles to an OF device.
*bus)
void pcibios_fixup_bus(struct pci_bus *bus) {
- /* When called from the generic PCI probe, read PCI<->PCI bridge
- * bases. This is -not- called when generating the PCI tree from
- * the OF device-tree.
- */
- if (bus->self != NULL)
- pci_read_bridge_bases(bus);
-
- /* Now fixup the bus bus */
- pcibios_setup_bus_self(bus);
-
- /* Now fixup devices on that bus */
- pcibios_setup_bus_devices(bus);
+ /* nothing to do */
}
EXPORT_SYMBOL(pcibios_fixup_bus);
-static int skip_isa_ioresource_align(struct pci_dev *dev) -{
- return 0;
-}
-
/*
* We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the @@ -899,20
+872,18 @@ static int skip_isa_ioresource_align(struct pci_dev *dev)
resource_size_t pcibios_align_resource(void *data, const struct resource
*res,
resource_size_t size, resource_size_t align) {
- struct pci_dev *dev = data;
- resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO) {
- if (skip_isa_ioresource_align(dev))
- return start;
- if (start & 0x300)
- start = (start + 0x3ff) & ~0x3ff;
- }
-
- return start;
+ return res->start;
}
EXPORT_SYMBOL(pcibios_align_resource);
+int pcibios_add_device(struct pci_dev *dev) {
+ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+
+ return 0;
+}
+EXPORT_SYMBOL(pcibios_add_device);
+
/*
* Reparent resource children of pr that conflict with res
* under res, and make res replace those children.
From: Mark Rutland <mark.rutland@arm.com> Date: 2016-02-22 16:17:55
On Mon, Feb 22, 2016 at 04:01:15PM +0000, Bharat Kumar Gogada wrote:
Ping
Please trim your To line, and state who you're pinging, and specifically
what you are pinging for. You'll have much better luck with targetted
replies.
Given the number of people in the To line, no-one knows if they're being
poked, or if someone else is. Given the lack of any question/statement
with your ping, it's not clear what you're asking for.
The DT parts of this series already appear to have been reviewed, so
there's no reason to keep myself and other DT maintainers on the To
line for this patch.
Mark.
quoted
Subject: [PATCH V4 5/5] Microblaze: Modifying microblaze PCI subsytem to
support generic Xilinx AXI PCIe Host Bridge IP driver
This patch does required modifications to microblaze PCI subsystem, to work
with generic driver (drivers/pci/host/pcie-xilinx.c) on Microblaze and Zynq.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
---
Changes:
Removed pcibios_get_phb_of_node in pci-common.c, using generic version
instead.
Modified pcibios_fixup_bus in pci-common.c, as per generic architecuture.
Modified pcibios_align_resource in pci-common.c, as per generic
architecuture, removed temporary variable.
Removed pci_domain_nr in pci-common.c, instead using generic code.
Added pcibios_add_device in pci-common.c, as per generic architecuture.
Adding Kernel configuration in arch/microblaze as required for generic PCI
domains.
Added kernel configuration for driver to support Microblaze.
---
arch/microblaze/Kconfig | 3 +++
arch/microblaze/pci/pci-common.c | 56 +++++++---------------------------------
drivers/pci/host/Kconfig | 2 +-
3 files changed, 14 insertions(+), 47 deletions(-)
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index
@@ -123,17 +123,6 @@ unsigned long pci_address_to_pio(phys_addr_t
address) } EXPORT_SYMBOL_GPL(pci_address_to_pio);
-/*
- * Return the domain number for this bus.
- */
-int pci_domain_nr(struct pci_bus *bus)
-{
- struct pci_controller *hose = pci_bus_to_host(bus);
-
- return hose->global_number;
-}
-EXPORT_SYMBOL(pci_domain_nr);
-
/* This routine is meant to be used early during boot, when the
* PCI bus numbers have not yet been assigned, and you need to
* issue PCI config cycles to an OF device.
*bus)
void pcibios_fixup_bus(struct pci_bus *bus) {
- /* When called from the generic PCI probe, read PCI<->PCI bridge
- * bases. This is -not- called when generating the PCI tree from
- * the OF device-tree.
- */
- if (bus->self != NULL)
- pci_read_bridge_bases(bus);
-
- /* Now fixup the bus bus */
- pcibios_setup_bus_self(bus);
-
- /* Now fixup devices on that bus */
- pcibios_setup_bus_devices(bus);
+ /* nothing to do */
}
EXPORT_SYMBOL(pcibios_fixup_bus);
-static int skip_isa_ioresource_align(struct pci_dev *dev) -{
- return 0;
-}
-
/*
* We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the @@ -899,20
+872,18 @@ static int skip_isa_ioresource_align(struct pci_dev *dev)
resource_size_t pcibios_align_resource(void *data, const struct resource
*res,
resource_size_t size, resource_size_t align) {
- struct pci_dev *dev = data;
- resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO) {
- if (skip_isa_ioresource_align(dev))
- return start;
- if (start & 0x300)
- start = (start + 0x3ff) & ~0x3ff;
- }
-
- return start;
+ return res->start;
}
EXPORT_SYMBOL(pcibios_align_resource);
+int pcibios_add_device(struct pci_dev *dev) {
+ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+
+ return 0;
+}
+EXPORT_SYMBOL(pcibios_add_device);
+
/*
* Reparent resource children of pr that conflict with res
* under res, and make res replace those children.
From: Michal Simek <hidden> Date: 2016-02-23 11:08:55
On 11.2.2016 17:28, Bharat Kumar Gogada wrote:
quoted hunk
This patch does required modifications to microblaze PCI subsystem, to
work with generic driver (drivers/pci/host/pcie-xilinx.c) on Microblaze
and Zynq.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
---
Changes:
Removed pcibios_get_phb_of_node in pci-common.c, using generic version
instead.
Modified pcibios_fixup_bus in pci-common.c, as per generic architecuture.
Modified pcibios_align_resource in pci-common.c, as per generic
architecuture, removed temporary variable.
Removed pci_domain_nr in pci-common.c, instead using generic code.
Added pcibios_add_device in pci-common.c, as per generic architecuture.
Adding Kernel configuration in arch/microblaze as required for generic PCI
domains.
Added kernel configuration for driver to support Microblaze.
---
arch/microblaze/Kconfig | 3 +++
arch/microblaze/pci/pci-common.c | 56 +++++++---------------------------------
drivers/pci/host/Kconfig | 2 +-
3 files changed, 14 insertions(+), 47 deletions(-)
@@ -123,17 +123,6 @@ unsigned long pci_address_to_pio(phys_addr_t address)}EXPORT_SYMBOL_GPL(pci_address_to_pio);-/*-*Returnthedomainnumberforthisbus.-*/-intpci_domain_nr(structpci_bus*bus)-{-structpci_controller*hose=pci_bus_to_host(bus);--returnhose->global_number;-}-EXPORT_SYMBOL(pci_domain_nr);-/* This routine is meant to be used early during boot, when the*PCIbusnumbershavenotyetbeenassigned,andyouneedto*issuePCIconfigcyclestoanOFdevice.
@@ -863,26 +852,10 @@ void pcibios_setup_bus_devices(struct pci_bus *bus)voidpcibios_fixup_bus(structpci_bus*bus){-/* When called from the generic PCI probe, read PCI<->PCI bridge-*bases.Thisis-not-calledwhengeneratingthePCItreefrom-*theOFdevice-tree.-*/-if(bus->self!=NULL)-pci_read_bridge_bases(bus);--/* Now fixup the bus bus */-pcibios_setup_bus_self(bus);--/* Now fixup devices on that bus */-pcibios_setup_bus_devices(bus);+/* nothing to do */}EXPORT_SYMBOL(pcibios_fixup_bus);-staticintskip_isa_ioresource_align(structpci_dev*dev)-{-return0;-}-/**Weneedtoavoidcollisionswith`mirrored'VGAports*andotherstrangeISAhardware,sowealwayswantthe
@@ -899,20 +872,18 @@ static int skip_isa_ioresource_align(struct pci_dev *dev)resource_size_tpcibios_align_resource(void*data,conststructresource*res,resource_size_tsize,resource_size_talign){-structpci_dev*dev=data;-resource_size_tstart=res->start;--if(res->flags&IORESOURCE_IO){-if(skip_isa_ioresource_align(dev))-returnstart;-if(start&0x300)-start=(start+0x3ff)&~0x3ff;-}--returnstart;+returnres->start;}EXPORT_SYMBOL(pcibios_align_resource);+intpcibios_add_device(structpci_dev*dev)+{+dev->irq=of_irq_parse_and_map_pci(dev,0,0);++return0;+}+EXPORT_SYMBOL(pcibios_add_device);+/**Reparentresourcechildrenofprthatconflictwithres*underres,andmakeresreplacethosechildren.
Hi Bjorn,
Can you please take this in to your tree.
Thanks,
Bharat
On 11.2.2016 17:28, Bharat Kumar Gogada wrote:
quoted
This patch does required modifications to microblaze PCI subsystem, to
work with generic driver (drivers/pci/host/pcie-xilinx.c) on
Microblaze and Zynq.
Signed-off-by: Bharat Kumar Gogada <redacted>
Signed-off-by: Ravi Kiran Gummaluri <redacted>
---
Changes:
Removed pcibios_get_phb_of_node in pci-common.c, using generic
version
quoted
instead.
Modified pcibios_fixup_bus in pci-common.c, as per generic architecuture.
Modified pcibios_align_resource in pci-common.c, as per generic
architecuture, removed temporary variable.
Removed pci_domain_nr in pci-common.c, instead using generic code.
Added pcibios_add_device in pci-common.c, as per generic architecuture.
Adding Kernel configuration in arch/microblaze as required for generic
PCI domains.
Added kernel configuration for driver to support Microblaze.
---
arch/microblaze/Kconfig | 3 +++
arch/microblaze/pci/pci-common.c | 56 +++++++-------------------------------
@@ -123,17 +123,6 @@ unsigned long pci_address_to_pio(phys_addr_t
address) } EXPORT_SYMBOL_GPL(pci_address_to_pio);
-/*
- * Return the domain number for this bus.
- */
-int pci_domain_nr(struct pci_bus *bus) -{
- struct pci_controller *hose = pci_bus_to_host(bus);
-
- return hose->global_number;
-}
-EXPORT_SYMBOL(pci_domain_nr);
-
/* This routine is meant to be used early during boot, when the
* PCI bus numbers have not yet been assigned, and you need to
* issue PCI config cycles to an OF device.
*bus)
void pcibios_fixup_bus(struct pci_bus *bus) {
- /* When called from the generic PCI probe, read PCI<->PCI bridge
- * bases. This is -not- called when generating the PCI tree from
- * the OF device-tree.
- */
- if (bus->self != NULL)
- pci_read_bridge_bases(bus);
-
- /* Now fixup the bus bus */
- pcibios_setup_bus_self(bus);
-
- /* Now fixup devices on that bus */
- pcibios_setup_bus_devices(bus);
+ /* nothing to do */
}
EXPORT_SYMBOL(pcibios_fixup_bus);
-static int skip_isa_ioresource_align(struct pci_dev *dev) -{
- return 0;
-}
-
/*
* We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the @@ -899,20
+872,18 @@ static int skip_isa_ioresource_align(struct pci_dev *dev)
resource_size_t pcibios_align_resource(void *data, const struct resource
*res,
quoted
resource_size_t size, resource_size_t align) {
- struct pci_dev *dev = data;
- resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO) {
- if (skip_isa_ioresource_align(dev))
- return start;
- if (start & 0x300)
- start = (start + 0x3ff) & ~0x3ff;
- }
-
- return start;
+ return res->start;
}
EXPORT_SYMBOL(pcibios_align_resource);
+int pcibios_add_device(struct pci_dev *dev) {
+ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+
+ return 0;
+}
+EXPORT_SYMBOL(pcibios_add_device);
+
/*
* Reparent resource children of pr that conflict with res
* under res, and make res replace those children.
On Thu, Feb 11, 2016 at 09:58:06PM +0530, Bharat Kumar Gogada wrote:
This patch series does modifications to pcie-xilinx.c, to support common
driver on both Zynq and Microblaze architectures.
Microblaze pci-common.c has been modified to support generic driver.
Bharat Kumar Gogada (5):
PCI: xilinx: Removing xilinx_pcie_parse_and_add_res function
PCI: xilinx: Removing struct hw_pci structure.
PCI: xilinx: Modifying AXI PCIe Host Bridge driver to work on both
Zynq and Microblaze
PCI: xilinx: Updating Zynq PCI binding documentation with
Microblaze node.
Microblaze: Modifying microblaze PCI subsytem to support generic
Xilinx AXI PCIe Host Bridge IP driver
.../devicetree/bindings/pci/xilinx-pcie.txt | 32 +++-
arch/microblaze/Kconfig | 3 +
arch/microblaze/pci/pci-common.c | 56 ++----
drivers/pci/host/Kconfig | 2 +-
drivers/pci/host/pcie-xilinx.c | 191 +++------------------
5 files changed, 66 insertions(+), 218 deletions(-)
I applied this series to my pci/host-xilinx branch for v4.6.
Michal, you only explicitly acked the last patch, but that only makes
sense if I apply the whole series, so I applied your ack to all the
patches.
Someday somebody should rework pci_fixup_irqs() so that doesn't have
to be arch-dependent.
I reworked the changelogs as below.
Bjorn
commit 01cf9d524ff0
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:11 2016 +0530
microblaze/PCI: Support generic Xilinx AXI PCIe Host Bridge IP driver
Modify the Microblaze PCI subsystem to work with the generic
drivers/pci/host/pcie-xilinx.c driver on Microblaze and Zynq.
[bhelgaas: changelog]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit e5d4b2006c97
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:10 2016 +0530
PCI: xilinx: Update Zynq binding with Microblaze node
Update Zynq PCI binding documentation with Microblaze node.
[bhelgaas: fix "microbalze_0_intc" typo]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Acked-by: Rob Herring [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit 2c51391d2559
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:09 2016 +0530
PCI: xilinx: Don't call pci_fixup_irqs() on Microblaze
The Xilinx AXI PCIe Host Bridge Soft IP driver was previously only
supported on ARM (in particular, on ARCH_ZYNC), and pci_fixup_irqs() is
available there. But Microblaze will do IRQ fixup in pcibios_add_device(),
so pci_fixup_irqs() is not available on Microblaze.
Don't call pci_fixup_irqs() on Microblaze, so the driver can work on both
Zynq and Microblaze Architectures.
[bhelgaas: revise changelog to show similarity to bdb8a1844f31 ("PCI: iproc: Call pci_fixup_irqs() for ARM64 as well as ARM")]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Reviewed-by: Arnd Bergmann [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit 4c01f3b089a0
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:08 2016 +0530
PCI: xilinx: Remove dependency on ARM-specific struct hw_pci
The Xilinx PCIe host controller driver uses pci_common_init_dev(), which
is ARM-specific and requires the ARM struct hw_pci. The part of
pci_common_init_dev() that is needed is limited and can be done here
without using hw_pci.
Create and scan the root bus directly without using the ARM
pci_common_init_dev() interface.
[bhelgaas: revise changelog to show similarity to 79953dd22c1d ("PCI: rcar: Remove dependency on ARM-specific struct hw_pci")]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Reviewed-by: Arnd Bergmann [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit 0259882e342e
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:07 2016 +0530
PCI: xilinx: Use of_pci_get_host_bridge_resources() to parse DT
Use the new of_pci_get_host_bridge_resources() API in place of the PCI OF
DT parser.
[bhelgaas: revise changelog to show similarity to 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT")]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Reviewed-by: Arnd Bergmann [off-list ref]
Acked-by: Michal Simek [off-list ref]
Thanks Bjorn.
Thanks to Bjorn Helgaas and Arnd Bergmann for your review and suggestions.
Bharat
On Thu, Feb 11, 2016 at 09:58:06PM +0530, Bharat Kumar Gogada wrote:
quoted
This patch series does modifications to pcie-xilinx.c, to support common
driver on both Zynq and Microblaze architectures.
Microblaze pci-common.c has been modified to support generic driver.
Bharat Kumar Gogada (5):
PCI: xilinx: Removing xilinx_pcie_parse_and_add_res function
PCI: xilinx: Removing struct hw_pci structure.
PCI: xilinx: Modifying AXI PCIe Host Bridge driver to work on both
Zynq and Microblaze
PCI: xilinx: Updating Zynq PCI binding documentation with
Microblaze node.
Microblaze: Modifying microblaze PCI subsytem to support generic
Xilinx AXI PCIe Host Bridge IP driver
.../devicetree/bindings/pci/xilinx-pcie.txt | 32 +++-
arch/microblaze/Kconfig | 3 +
arch/microblaze/pci/pci-common.c | 56 ++----
drivers/pci/host/Kconfig | 2 +-
drivers/pci/host/pcie-xilinx.c | 191 +++------------------
5 files changed, 66 insertions(+), 218 deletions(-)
I applied this series to my pci/host-xilinx branch for v4.6.
Michal, you only explicitly acked the last patch, but that only makes
sense if I apply the whole series, so I applied your ack to all the
patches.
Someday somebody should rework pci_fixup_irqs() so that doesn't have
to be arch-dependent.
I reworked the changelogs as below.
Bjorn
commit 01cf9d524ff0
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:11 2016 +0530
microblaze/PCI: Support generic Xilinx AXI PCIe Host Bridge IP driver
Modify the Microblaze PCI subsystem to work with the generic
drivers/pci/host/pcie-xilinx.c driver on Microblaze and Zynq.
[bhelgaas: changelog]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit e5d4b2006c97
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:10 2016 +0530
PCI: xilinx: Update Zynq binding with Microblaze node
Update Zynq PCI binding documentation with Microblaze node.
[bhelgaas: fix "microbalze_0_intc" typo]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Acked-by: Rob Herring [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit 2c51391d2559
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:09 2016 +0530
PCI: xilinx: Don't call pci_fixup_irqs() on Microblaze
The Xilinx AXI PCIe Host Bridge Soft IP driver was previously only
supported on ARM (in particular, on ARCH_ZYNC), and pci_fixup_irqs() is
available there. But Microblaze will do IRQ fixup in pcibios_add_device(),
so pci_fixup_irqs() is not available on Microblaze.
Don't call pci_fixup_irqs() on Microblaze, so the driver can work on both
Zynq and Microblaze Architectures.
[bhelgaas: revise changelog to show similarity to bdb8a1844f31 ("PCI: iproc:
Call pci_fixup_irqs() for ARM64 as well as ARM")]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Reviewed-by: Arnd Bergmann [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit 4c01f3b089a0
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:08 2016 +0530
PCI: xilinx: Remove dependency on ARM-specific struct hw_pci
The Xilinx PCIe host controller driver uses pci_common_init_dev(), which
is ARM-specific and requires the ARM struct hw_pci. The part of
pci_common_init_dev() that is needed is limited and can be done here
without using hw_pci.
Create and scan the root bus directly without using the ARM
pci_common_init_dev() interface.
[bhelgaas: revise changelog to show similarity to 79953dd22c1d ("PCI: rcar:
Remove dependency on ARM-specific struct hw_pci")]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Reviewed-by: Arnd Bergmann [off-list ref]
Acked-by: Michal Simek [off-list ref]
commit 0259882e342e
Author: Bharat Kumar Gogada [off-list ref]
Date: Thu Feb 11 21:58:07 2016 +0530
PCI: xilinx: Use of_pci_get_host_bridge_resources() to parse DT
Use the new of_pci_get_host_bridge_resources() API in place of the PCI
OF
DT parser.
[bhelgaas: revise changelog to show similarity to 0021d22b73d6 ("PCI:
designware: Use of_pci_get_host_bridge_resources() to parse DT")]
Signed-off-by: Bharat Kumar Gogada [off-list ref]
Signed-off-by: Ravi Kiran Gummaluri [off-list ref]
Signed-off-by: Bjorn Helgaas [off-list ref]
Reviewed-by: Arnd Bergmann [off-list ref]
Acked-by: Michal Simek [off-list ref]
From: Michal Simek <hidden> Date: 2016-03-09 17:14:55
On 8.3.2016 21:34, Bjorn Helgaas wrote:
On Thu, Feb 11, 2016 at 09:58:06PM +0530, Bharat Kumar Gogada wrote:
quoted
This patch series does modifications to pcie-xilinx.c, to support common
driver on both Zynq and Microblaze architectures.
Microblaze pci-common.c has been modified to support generic driver.
Bharat Kumar Gogada (5):
PCI: xilinx: Removing xilinx_pcie_parse_and_add_res function
PCI: xilinx: Removing struct hw_pci structure.
PCI: xilinx: Modifying AXI PCIe Host Bridge driver to work on both
Zynq and Microblaze
PCI: xilinx: Updating Zynq PCI binding documentation with
Microblaze node.
Microblaze: Modifying microblaze PCI subsytem to support generic
Xilinx AXI PCIe Host Bridge IP driver
.../devicetree/bindings/pci/xilinx-pcie.txt | 32 +++-
arch/microblaze/Kconfig | 3 +
arch/microblaze/pci/pci-common.c | 56 ++----
drivers/pci/host/Kconfig | 2 +-
drivers/pci/host/pcie-xilinx.c | 191 +++------------------
5 files changed, 66 insertions(+), 218 deletions(-)
I applied this series to my pci/host-xilinx branch for v4.6.
Michal, you only explicitly acked the last patch, but that only makes
sense if I apply the whole series, so I applied your ack to all the
patches.