adding PCI support to AXS10x
Subsystems (5)
v3 cover adding PCI support to AXS10x
This patch set has the goal to add suppport for DesignWare PCIe RC in ARC AXS10x. It includes the necessary tweaks to the ARC architecture, necessary tweaks to the PCI subsystem and a new driver (pcie-snpsdev). This new driver will be used extensively in the PCIe RC Prototyping Kit.
The patches were produced against Bjorn Helgaas' repository. It was properly tested in an IP Prototyping Kit.
Joao Pinto (2):
PCI support added to ARC
add new platform driver for PCI RC
.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + arch/arc/Kconfig | 23 ++ arch/arc/include/asm/dma.h | 5 + arch/arc/include/asm/io.h | 10 + arch/arc/include/asm/pci.h | 43 ++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++ arch/arc/mm/ioremap.c | 10 +- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 16 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c create mode 100644 drivers/pci/host/pcie-snpsdev.c
Signature · 1 line
1.8.1.5
PATCH v3 1/2 PCI support added to ARC
This patch adds PCI support to ARC and updates drivers/pci Makefile enabling the ARC arch to use the generic PCI setup functions.
---
Change v2 -> v3 (Bjorn Helgaas):
- arch/arc/kernel/pcibios.c unused functions were removed and also the arch/arc/include/asm/mach/pci.h was removed because was no longer necessary
Change v1 -> v2:
- In arch/arc/Kconfig, the new menu entry (Bus Configuration) was moved to the slot between sourcing of drivers/Kconfig and fs/Kconfig (Vineet Gupta)
- In arch/arc/plat-axs10x/Kconfig the "select MIGHT_HAVE_PCI" option was placed in order as suggested (Vineet Gupta)
- ioport_map() and ioport_unmap() were static inlined and included in the io.h (Vineet Gupta)
- pcibios_min_io and pcibios_min_mem declaration moved topcibios.c (Vineet Gupta)
- pr_err() replaced by dev_err() in pcibios_enable_device() (Bjorn Helgaas)
- string simplified in pcibios_enable_device() (Vineet Gupta)
- pci_host_bridge_window structure was replaced by resource_entry structure, and list_for_each_entry() for resource_list_for_each_entry() in pcibios.c
arch/arc/Kconfig | 23 ++++++++++++++++++ arch/arc/include/asm/dma.h | 5 ++++ arch/arc/include/asm/io.h | 10 ++++++++ arch/arc/include/asm/pci.h | 43 ++++++++++++++++++++++++++++++++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ arch/arc/mm/ioremap.c | 10 +++++++- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + 9 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c
arch/arc/Kconfig +23 -0
@@ -19,6 +19,7 @@ config ARC select GENERIC_FIND_FIRST_BIT # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP select GENERIC_IRQ_SHOW + select GENERIC_PCI_IOMAP select GENERIC_PENDING_IRQ if SMP select GENERIC_SMP_IDLE_THREAD select HAVE_ARCH_KGDB
@@ -39,6 +40,9 @@ config ARC select PERF_USE_VMALLOC select HAVE_DEBUG_STACKOVERFLOW +config MIGHT_HAVE_PCI + bool + config TRACE_IRQFLAGS_SUPPORT def_bool y
@@ -570,6 +574,25 @@ endmenu # "ARC Architecture Configuration" source "mm/Kconfig" source "net/Kconfig" source "drivers/Kconfig" + +menu "Bus Support" + +config PCI + bool "PCI support" if MIGHT_HAVE_PCI + help + PCI is the name of a bus system, i.e. the way the CPU talks to the other stuff inside + your box.Find out if your board/platform have PCI. + Note: PCIE support for Synopsys Device will be available only when + HAPS DX is configured with PCIE RC bitmap. If you have PCI, say Y, otherwise N. + +config PCI_SYSCALL + def_bool PCI + +source "drivers/pci/Kconfig" +source "drivers/pci/pcie/Kconfig" + +endmenu + source "fs/Kconfig" source "arch/arc/Kconfig.debug" source "security/Kconfig"
arch/arc/include/asm/dma.h +5 -0
@@ -10,5 +10,10 @@#define ASM_ARC_DMA_H #define MAX_DMA_ADDRESS 0xC0000000 +#ifdef CONFIG_PCI +extern int isa_dma_bridge_buggy; +#else +#define isa_dma_bridge_buggy (0) +#endif #endif
arch/arc/include/asm/io.h +10 -0
@@ -16,7 +16,17 @@extern void __iomem *ioremap (unsigned long physaddr,unsigned long size);extern void __iomem *ioremap_prot (phys_addr_t offset,unsigned long size,unsigned long flags); +static inline void __iomem *ioport_map (unsigned long port,unsigned int nr) +{ +return (void __iomem *)port; +} + +static inline void ioport_unmap (void __iomem *addr) +{ +} +extern void iounmap (const void __iomem *addr); +extern int pci_ioremap_io (unsigned int offset,phys_addr_t phys_addr);#define ioremap_nocache (phy, sz) ioremap(phy, sz)#define ioremap_wc (phy, sz) ioremap(phy, sz)
arch/arc/include/asm/pci.h new file +43 -0
43 lines not on this page · raw message
arch/arc/kernel/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-y := arcksyms.o setup.o irq.o time.o reset.o ptrace.o process.o devtree.o obj-y += signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o clk.o obj-$(CONFIG_ISA_ARCOMPACT) += entry-compact.o intc-compact.o obj-$(CONFIG_ISA_ARCV2) += entry-arcv2.o intc-arcv2.o +obj-$(CONFIG_PCI) += pcibios.o obj-$(CONFIG_MODULES) += arcksyms.o module.o obj-$(CONFIG_SMP) += smp.o
arch/arc/kernel/pcibios.c new file +55 -0
55 lines not on this page · raw message
arch/arc/mm/ioremap.c +9 -1
@@ -13,6 +13,7 @@#include <linux/mm.h> #include <linux/slab.h> #include <linux/cache.h> +#include <linux/sizes.h> void __iomem *ioremap (unsigned long paddr,unsigned long size) {
@@ -80,7 +81,6 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size, }EXPORT_SYMBOL (ioremap_prot); -void iounmap (const void __iomem *addr) {if (addr >= (void __force __iomem *)ARC_UNCACHED_ADDR_SPACE )
@@ -89,3 +89,11 @@ void iounmap(const void __iomem *addr)vfree ((void *)(PAGE_MASK & (unsigned long __force )addr)); }EXPORT_SYMBOL (iounmap); + +#ifdef CONFIG_PCI +int pci_ioremap_io (unsigned int offset,phys_addr_t phys_addr) +{ +return ioremap_nocache (phys_addr + offset,SZ_64K ); +} +EXPORT_SYMBOL_GPL (pci_ioremap_io); +#endif
arch/arc/plat-axs10x/Kconfig +1 -0
@@ -11,6 +11,7 @@ menuconfig ARC_PLAT_AXS10X select DW_APB_ICTL select GPIO_DWAPB select OF_GPIO + select MIGHT_HAVE_PCI select GENERIC_IRQ_CHIP select ARCH_REQUIRE_GPIOLIB help
drivers/pci/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_PCI_IOV) += iov.o # Some architectures use the generic PCI setup functions # obj-$(CONFIG_ALPHA) += setup-irq.o +obj-$(CONFIG_ARC) += setup-irq.o obj-$(CONFIG_ARM) += setup-irq.o obj-$(CONFIG_ARM64) += setup-irq.o obj-$(CONFIG_UNICORE32) += setup-irq.o
Signature · 1 line
1.8.1.5
PATCH v3 2/2 add new platform driver for PCI RC
In reply to Joao PintoThis patch adds a new driver that will be the reference platform driver for all PCI RC IP Protoyping Kits based on ARC SDP. This patch is composed by:
-Changes to pcie-designware driver add a function that enables the feature of starting the LTSSM (Link Train Status State) used by the new driver -MAINTAINERS file was updated to include the new driver -Documentation/devicetree/bindings/pci was updated to include the new driver documentation
-New driver called pcie-snpsdev
---
Changes v2 -> v3:
- link init stuff was moved to a snpsdev_pcie_establish_link() function in pcie-snpsdev (Bjorn Helgaas)
- pcie-snpsdev driver declaration was changed to be more standard (Bjorn Helgaas)
- pcie-designware' dw_pcie_link_retrain() now use standard registers from pci-regs.h (Bjorn Helgaas)
- pcie-snpsdev.txt was complemented with more info (Mark Rutland)
Changes v1 -> v2 (Bjorn Helgaas):
- Fixups snpsdev_pcie_fixup_bridge() and snpsdev_pcie_fixup_res() were removed from the driver (these functions were for specific tests only and not usefull in mainline)
- Driver' comments were reviewed (fix Typos and excessive comments removal)
- Removed unnecessary definitions in the driver source (PCIE_PHY_CTRL and PCIE_PHY_STAT)
.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 7 files changed, 344 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 drivers/pci/host/pcie-snpsdev.c
Documentation/devicetree/bindings/pci/pcie-snpsdev.txt new file +33 -0
@@ -0,0 +1,33 @@ +Synopsys PCI RC IP Prototyping Kit +---------------------------------- + +This is the reference platform driver to be used in the Synopsys PCI Root +Complex IP Prototyping Kit. + +Required properties: +- compatible: set to "snps,pcie-snpsdev"; +- reg: base address and length of the pcie controller registers. +- #address-cells: set to <3> +- #size-cells: set to <2> +- device_type: set to "pci" +- ranges: ranges for the PCI memory and I/O regions. +- interrupts: one interrupt source for MSI interrupts, followed by interrupt + source for hardware related interrupts. +- #interrupt-cells: set to <1> +- num-lanes: set to <1>; + +Example configuration: + + pcie: pcie at 0xdffff000 { + compatible = "snps,pcie-snpsdev"; + reg = <0xdffff000 0x1000>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + ranges = <0x00000800 0 0xd0000000 0xd0000000 0 0x00002000>, + <0x81000000 0 0x00000000 0xde000000 0 0x00010000>, + <0x82000000 0 0xd0400000 0xd0400000 0 0x0d000000>; + interrupts = <25>, <24>; + #interrupt-cells = <1>; + num-lanes = <1>; + };
MAINTAINERS +7 -0
@@ -8230,6 +8230,13 @@ S: Maintained F: Documentation/devicetree/bindings/pci/hisilicon-pcie.txt F: drivers/pci/host/pcie-hisi.c +PCI DRIVER FOR SYNOPSYS PROTOTYPING DEVICE +M: Joao Pinto <jpinto at synopsys.com> +L: linux-pci at vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/pci/pcie-snpsdev.txt +F: drivers/pci/host/pcie-snpsdev.c + PCMCIA SUBSYSTEM P: Linux PCMCIA Team L: linux-pcmcia at lists.infradead.org
drivers/pci/host/Kconfig +5 -0
@@ -172,4 +172,9 @@ config PCI_HISI help Say Y here if you want PCIe controller support on HiSilicon HIP05 SoC +config PCIE_SNPSDEV + bool "Platform Driver for Synopsys Device" + select PCIEPORTBUS + select PCIE_DW + endmenu
drivers/pci/host/Makefile +1 -0
@@ -20,3 +20,4 @@ obj-$(CONFIG_PCIE_IPROC_BCMA) += pcie-iproc-bcma.o obj-$(CONFIG_PCIE_ALTERA) += pcie-altera.o obj-$(CONFIG_PCIE_ALTERA_MSI) += pcie-altera-msi.o obj-$(CONFIG_PCI_HISI) += pcie-hisi.o +obj-$(CONFIG_PCIE_SNPSDEV) += pcie-snpsdev.o
drivers/pci/host/pcie-designware.c +11 -0
@@ -22,6 +22,8 @@#include <linux/pci_regs.h> #include <linux/platform_device.h> #include <linux/types.h> +#include <linux/delay.h> +#include <linux/sizes.h> #include "pcie-designware.h"
@@ -706,6 +708,15 @@ static struct pci_ops dw_pcie_ops = { .write = dw_pcie_wr_conf, }; +void dw_pcie_link_retrain (struct pcie_port *pp) +{ +u32 val =0 ; + +dw_pcie_readl_rc (pp,PCI_EXP_LNKCTL +0x70 , &val); + val = val |PCI_EXP_LNKCTL_RL ; +dw_pcie_writel_rc (pp, val,PCI_EXP_LNKCTL +0x70 ); +} +void dw_pcie_setup_rc (struct pcie_port *pp) {u32 val;
drivers/pci/host/pcie-designware.h +1 -0
@@ -79,5 +79,6 @@ void dw_pcie_msi_init(struct pcie_port *pp);int dw_pcie_link_up (struct pcie_port *pp);void dw_pcie_setup_rc (struct pcie_port *pp);int dw_pcie_host_init (struct pcie_port *pp); +void dw_pcie_link_retrain (struct pcie_port *pp);#endif /* _PCIE_DESIGNWARE_H */
drivers/pci/host/pcie-snpsdev.c new file +286 -0
286 lines not on this page · raw message
Signature · 1 line
1.8.1.5
kbuild test robot
build botRe: [PATCH v3 2/2] add new platform driver for PCI RC
reproduce:
Hi Joao,
[auto build test ERROR on arc/for-next]
[also build test ERROR on v4.4-rc6 next-20151221]
url: https://github.com/0day-ci/linux/commits/Joao-Pinto/adding-PCI-support-to-AXS10x/20151221-234734 base: https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc for-next config: i386-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/pci/host/pcie-designware.c: In function 'dw_pcie_host_init':
>> drivers/pci/host/pcie-designware.c:556:7: error: implicit declaration of function 'pci_has_flag' [-Werror=implicit-function-declaration]
if (!pci_has_flag(PCI_PROBE_ONLY)) {
^
>> drivers/pci/host/pcie-designware.c:556:20: error: 'PCI_PROBE_ONLY' undeclared (first use in this function)
if (!pci_has_flag(PCI_PROBE_ONLY)) {
^ drivers/pci/host/pcie-designware.c:556:20: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +/pci_has_flag +556 drivers/pci/host/pcie-designware.c
cbce7900 Zhou Wang 2015-10-29 550
cbce7900 Zhou Wang 2015-10-29 551 #ifdef CONFIG_ARM
cbce7900 Zhou Wang 2015-10-29 552 /* support old dtbs that incorrectly describe IRQs */
cbce7900 Zhou Wang 2015-10-29 553 pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
0815f957 Yijing Wang 2014-11-11 554 #endif
0815f957 Yijing Wang 2014-11-11 555
cbce7900 Zhou Wang 2015-10-29 @556 if (!pci_has_flag(PCI_PROBE_ONLY)) {
cbce7900 Zhou Wang 2015-10-29 557 pci_bus_size_bridges(bus);
cbce7900 Zhou Wang 2015-10-29 558 pci_bus_assign_resources(bus);
4b1ced84 Jingoo Han 2013-07-31 559 :::::: The code at line 556 was first introduced by commit
:::::: cbce7900598c26a12652f8ca9c41c5b29034c38d PCI: designware: Make driver arch-agnostic
:::::: TO: Zhou Wang <wangzhou1 at hisilicon.com>
:::::: CC: Bjorn Helgaas <bhelgaas at google.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 52582 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-snps-arc/attachments/20151222/f7add423/attachment-0001.obj>
Hi Joao,
Quoted 25 lines · Joao Pinto
This patch set has the goal to add suppport for DesignWare PCIe RC in ARC AXS10x. It includes the necessary tweaks to the ARC architecture, necessary tweaks to the PCI subsystem and a new driver (pcie-snpsdev). This new driver will be used extensively in the PCIe RC Prototyping Kit.
The patches were produced against Bjorn Helgaas' repository. It was properly tested in an IP Prototyping Kit.
Joao Pinto (2):
PCI support added to ARC
add new platform driver for PCI RC.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + arch/arc/Kconfig | 23 ++ arch/arc/include/asm/dma.h | 5 + arch/arc/include/asm/io.h | 10 + arch/arc/include/asm/pci.h | 43 ++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++ arch/arc/mm/ioremap.c | 10 +- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 +
Quoted 8 lines
drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 16 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c create mode 100644 drivers/pci/host/pcie-snpsdev.c
This failed the kbuild test, so I'm waiting for a refresh to fix that.
Bjorn
Hi Bjorn,
Quoted 37 lines · Bjorn Helgaas
Hi Joao,
Quoted 25 lines · Joao Pinto
This patch set has the goal to add suppport for DesignWare PCIe RC in ARC AXS10x. It includes the necessary tweaks to the ARC architecture, necessary tweaks to the PCI subsystem and a new driver (pcie-snpsdev). This new driver will be used extensively in the PCIe RC Prototyping Kit.
The patches were produced against Bjorn Helgaas' repository. It was properly tested in an IP Prototyping Kit.
Joao Pinto (2):
PCI support added to ARC
add new platform driver for PCI RC.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + arch/arc/Kconfig | 23 ++ arch/arc/include/asm/dma.h | 5 + arch/arc/include/asm/io.h | 10 + arch/arc/include/asm/pci.h | 43 ++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++ arch/arc/mm/ioremap.c | 10 +- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 +Quoted 8 lines
drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 16 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c create mode 100644 drivers/pci/host/pcie-snpsdev.c
Quoted 4 lines
This failed the kbuild test, so I'm waiting for a refresh to fix that.
Bjorn
I am going to check what happened and send you an update ASAP.
Joao
Hi Bjorn,
Quoted 37 lines · Bjorn Helgaas
Hi Joao,
Quoted 25 lines · Joao Pinto
This patch set has the goal to add suppport for DesignWare PCIe RC in ARC AXS10x. It includes the necessary tweaks to the ARC architecture, necessary tweaks to the PCI subsystem and a new driver (pcie-snpsdev). This new driver will be used extensively in the PCIe RC Prototyping Kit.
The patches were produced against Bjorn Helgaas' repository. It was properly tested in an IP Prototyping Kit.
Joao Pinto (2):
PCI support added to ARC
add new platform driver for PCI RC.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + arch/arc/Kconfig | 23 ++ arch/arc/include/asm/dma.h | 5 + arch/arc/include/asm/io.h | 10 + arch/arc/include/asm/pci.h | 43 ++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++ arch/arc/mm/ioremap.c | 10 +- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 +Quoted 8 lines
drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 16 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c create mode 100644 drivers/pci/host/pcie-snpsdev.c
Quoted 1 line
This failed the kbuild test, so I'm waiting for a refresh to fix that.
Just checked the kbuild robot error and it is happening in ARC git tree when built for i386 arch and the problem is independent from my patches. The build error is the following:
drivers/pci/host/pcie-designware.c: In function 'dw_pcie_host_init':
Quoted 1 line
Quoted 1 line
drivers/pci/host/pcie-designware.c:556:7: error: implicit declaration of function
'pci_has_flag' [-Werror=implicit-function-declaration]
if (!pci_has_flag(PCI_PROBE_ONLY)) {
^Quoted 1 line
Quoted 1 line
drivers/pci/host/pcie-designware.c:556:20: error: 'PCI_PROBE_ONLY' undeclared
(first use in
this function)
if (!pci_has_flag(PCI_PROBE_ONLY)) {
^This problem has been already identified by Stephen Rothwell as you can see in the following mailing list thread:
http://www.gossamer-threads.com/lists/linux/kernel/2341200
If there's something for me to do please let me know.
Quoted 3 lines
Bjorn
Thanks,
Joao
Quoted 52 lines · Joao Pinto
Hi Bjorn,
Quoted 37 lines · Bjorn Helgaas
Hi Joao,
Quoted 25 lines · Joao Pinto
This patch set has the goal to add suppport for DesignWare PCIe RC in ARC AXS10x. It includes the necessary tweaks to the ARC architecture, necessary tweaks to the PCI subsystem and a new driver (pcie-snpsdev). This new driver will be used extensively in the PCIe RC Prototyping Kit.
The patches were produced against Bjorn Helgaas' repository. It was properly tested in an IP Prototyping Kit.
Joao Pinto (2):
PCI support added to ARC
add new platform driver for PCI RC.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + arch/arc/Kconfig | 23 ++ arch/arc/include/asm/dma.h | 5 + arch/arc/include/asm/io.h | 10 + arch/arc/include/asm/pci.h | 43 ++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++ arch/arc/mm/ioremap.c | 10 +- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 +Quoted 8 lines
drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 16 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c create mode 100644 drivers/pci/host/pcie-snpsdev.cQuoted 1 line
This failed the kbuild test, so I'm waiting for a refresh to fix that.
Just checked the kbuild robot error and it is happening in ARC git tree when built for i386 arch and the problem is independent from my patches. The build error is the following:
drivers/pci/host/pcie-designware.c: In function 'dw_pcie_host_init':Quoted 1 line
Quoted 1 line
drivers/pci/host/pcie-designware.c:556:7: error: implicit declaration of function'
pci_has_flag' [-Werror=implicit-function-declaration]if (!pci_has_flag(PCI_PROBE_ONLY)) { ^Quoted 1 line
Quoted 1 line
drivers/pci/host/pcie-designware.c:556:20: error: 'PCI_PROBE_ONLY' undeclared
Quoted 8 lines
(first use in
this function)if (!pci_has_flag(PCI_PROBE_ONLY)) { ^This problem has been already identified by Stephen Rothwell as you can see in the following mailing list thread:
Stephen saw that problem while building the Qualcomm driver (CONFIG_PCIE_QCOM), and we fixed it by changing Kconfig so we won't build that driver on x86.
That fix only affects CONFIG_PCIE_QCOM, so it won't help your driver.
You need some improvements to your drivers/pci/host/Kconfig patch -- some help text and probably some dependencies.
Bjorn
Hi,
I am going to add dependencies to the driver' kconfig to avoid this problem. I will send you a new patch version today.
Thanks.
Quoted 73 lines · Bjorn Helgaas
Quoted 52 lines · Joao Pinto
Hi Bjorn,
Quoted 37 lines · Bjorn Helgaas
Hi Joao,
Quoted 25 lines · Joao Pinto
This patch set has the goal to add suppport for DesignWare PCIe RC in ARC AXS10x. It includes the necessary tweaks to the ARC architecture, necessary tweaks to the PCI subsystem and a new driver (pcie-snpsdev). This new driver will be used extensively in the PCIe RC Prototyping Kit.
The patches were produced against Bjorn Helgaas' repository. It was properly tested in an IP Prototyping Kit.
Joao Pinto (2):
PCI support added to ARC
add new platform driver for PCI RC.../devicetree/bindings/pci/pcie-snpsdev.txt | 33 +++ MAINTAINERS | 7 + arch/arc/Kconfig | 23 ++ arch/arc/include/asm/dma.h | 5 + arch/arc/include/asm/io.h | 10 + arch/arc/include/asm/pci.h | 43 ++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 55 ++++ arch/arc/mm/ioremap.c | 10 +- arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/host/Kconfig | 5 + drivers/pci/host/Makefile | 1 +Quoted 8 lines
drivers/pci/host/pcie-designware.c | 11 + drivers/pci/host/pcie-designware.h | 1 + drivers/pci/host/pcie-snpsdev.c | 286 +++++++++++++++++++++ 16 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pci/pcie-snpsdev.txt create mode 100644 arch/arc/include/asm/pci.h create mode 100644 arch/arc/kernel/pcibios.c create mode 100644 drivers/pci/host/pcie-snpsdev.cQuoted 1 line
This failed the kbuild test, so I'm waiting for a refresh to fix that.
Just checked the kbuild robot error and it is happening in ARC git tree when built for i386 arch and the problem is independent from my patches. The build error is the following:
drivers/pci/host/pcie-designware.c: In function 'dw_pcie_host_init':Quoted 1 line
Quoted 1 line
drivers/pci/host/pcie-designware.c:556:7: error: implicit declaration of function'
pci_has_flag' [-Werror=implicit-function-declaration]if (!pci_has_flag(PCI_PROBE_ONLY)) { ^Quoted 1 line
Quoted 1 line
drivers/pci/host/pcie-designware.c:556:20: error: 'PCI_PROBE_ONLY' undeclaredQuoted 8 lines
(first use in
this function)if (!pci_has_flag(PCI_PROBE_ONLY)) { ^This problem has been already identified by Stephen Rothwell as you can see in the following mailing list thread:
Stephen saw that problem while building the Qualcomm driver (
CONFIG_PCIE_QCOM), and we fixed it by changingKconfigso we won't build that driver on x86.That fix only affects
CONFIG_PCIE_QCOM, so it won't help your driver.You need some improvements to your
drivers/pci/host/Kconfigpatch -- some help text and probably some dependencies.Bjorn