Skip to content

Commit

Permalink
Merge branches 'pci/host-designware', 'pci/host-dra7xx', 'pci/host-ex…
Browse files Browse the repository at this point in the history
…ynos', 'pci/host-generic', 'pci/host-imx6', 'pci/host-keystone', 'pci/host-layerscape', 'pci/host-mvebu', 'pci/host-rcar', 'pci/host-spear' and 'pci/host-tegra' into next

* pci/host-designware:
  PCI: designware: Add a blank line after declarations

* pci/host-dra7xx:
  PCI: dra7xx: Add __init annotation to dra7xx_add_pcie_port()
  PCI: dra7xx: Rename add_pcie_port() to dra7xx_add_pcie_port()

* pci/host-exynos:
  PCI: exynos: Remove unnecessary return statement
  PCI: exynos: Add exynos prefix to add_pcie_port()/pcie_init()

* pci/host-generic:
  PCI: generic: Convert to DT resource parsing API
  PCI: generic: Allocate config space windows after limiting bus number range

* pci/host-imx6:
  PCI: imx6: Use tabs for indentation

* pci/host-keystone:
  PCI: keystone: Remove unnecessary OOM message
  PCI: keystone: Make ks_dw_pcie_msi_domain_ops static

* pci/host-layerscape:
  PCI: layerscape: Add Freescale Layerscape PCIe driver

* pci/host-mvebu:
  PCI: mvebu: Add a blank line after declarations

* pci/host-rcar:
  PCI: rcar: Make rcar_pci static

* pci/host-spear:
  PCI: spear: Remove unnecessary OOM message
  PCI: spear: Add __init annotation to spear13xx_add_pcie_port()
  PCI: spear: Rename add_pcie_port(), pcie_init() to spear13xx_add_pcie_port(), etc.

* pci/host-tegra:
  PCI: tegra: Add Kconfig help text
  PCI: tegra: Do not build on 64-bit ARM
  • Loading branch information
Bjorn Helgaas committed Nov 15, 2014
12 parents f114040 + 2c992f3 + e73044a + bc512c5 + dbf9826 + d88a7ef + 6670070 + 62d0ff8 + cf3a9d6 + 3c70637 + 20f9ece + 6b1c4d7 commit 35437e3
Show file tree
Hide file tree
Showing 15 changed files with 297 additions and 127 deletions.
42 changes: 42 additions & 0 deletions Documentation/devicetree/bindings/pci/layerscape-pci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Freescale Layerscape PCIe controller

This PCIe host controller is based on the Synopsis Designware PCIe IP
and thus inherits all the common properties defined in designware-pcie.txt.

Required properties:
- compatible: should contain the platform identifier such as "fsl,ls1021a-pcie"
- reg: base addresses and lengths of the PCIe controller
- interrupts: A list of interrupt outputs of the controller. Must contain an
entry for each entry in the interrupt-names property.
- interrupt-names: Must include the following entries:
"intr": The interrupt that is asserted for controller interrupts
- fsl,pcie-scfg: Must include two entries.
The first entry must be a link to the SCFG device node
The second entry must be '0' or '1' based on physical PCIe controller index.
This is used to get SCFG PEXN registers

Example:

pcie@3400000 {
compatible = "fsl,ls1021a-pcie", "snps,dw-pcie";
reg = <0x00 0x03400000 0x0 0x00010000 /* controller registers */
0x40 0x00000000 0x0 0x00002000>; /* configuration space */
reg-names = "regs", "config";
interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
interrupt-names = "intr";
fsl,pcie-scfg = <&scfg 0>;
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
num-lanes = <4>;
bus-range = <0x0 0xff>;
ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
0xc2000000 0x0 0x20000000 0x40 0x20000000 0x0 0x20000000 /* prefetchable memory */
0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0000 0 0 1 &gic GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
<0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
<0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
<0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
};
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6983,6 +6983,16 @@ S: Maintained
F: Documentation/devicetree/bindings/pci/xgene-pci.txt
F: drivers/pci/host/pci-xgene.c

PCI DRIVER FOR FREESCALE LAYERSCAPE
M: Minghuan Lian <minghuan.Lian@freescale.com>
M: Mingkai Hu <mingkai.hu@freescale.com>
M: Roy Zang <tie-fei.zang@freescale.com>
L: linuxppc-dev@lists.ozlabs.org
L: linux-pci@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org
S: Maintained
F: drivers/pci/host/*layerscape*

PCI DRIVER FOR IMX6
M: Richard Zhu <r65037@freescale.com>
M: Lucas Stach <l.stach@pengutronix.de>
Expand Down
13 changes: 12 additions & 1 deletion drivers/pci/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ config PCI_IMX6

config PCI_TEGRA
bool "NVIDIA Tegra PCIe controller"
depends on ARCH_TEGRA
depends on ARCH_TEGRA && !ARM64
help
Say Y here if you want support for the PCIe host controller found
on NVIDIA Tegra SoCs.

config PCI_RCAR_GEN2
bool "Renesas R-Car Gen2 Internal PCI controller"
Expand Down Expand Up @@ -91,4 +94,12 @@ config PCI_XGENE
There are 5 internal PCIe ports available. Each port is GEN3 capable
and have varied lanes from x1 to x8.

config PCI_LAYERSCAPE
bool "Freescale Layerscape PCIe controller"
depends on OF && ARM
select PCIE_DW
select MFD_SYSCON
help
Say Y here if you want PCIe controller support on Layerscape SoCs.

endmenu
1 change: 1 addition & 0 deletions drivers/pci/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o
obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone-dw.o pci-keystone.o
obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o
obj-$(CONFIG_PCI_XGENE) += pci-xgene.o
obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o
6 changes: 3 additions & 3 deletions drivers/pci/host/pci-dra7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ static irqreturn_t dra7xx_pcie_irq_handler(int irq, void *arg)
return IRQ_HANDLED;
}

static int add_pcie_port(struct dra7xx_pcie *dra7xx,
struct platform_device *pdev)
static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
struct platform_device *pdev)
{
int ret;
struct pcie_port *pp;
Expand Down Expand Up @@ -398,7 +398,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, dra7xx);

ret = add_pcie_port(dra7xx, pdev);
ret = dra7xx_add_pcie_port(dra7xx, pdev);
if (ret < 0)
goto err_add_port;

Expand Down
18 changes: 5 additions & 13 deletions drivers/pci/host/pci-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ static void exynos_pcie_assert_reset(struct pcie_port *pp)
if (exynos_pcie->reset_gpio >= 0)
devm_gpio_request_one(pp->dev, exynos_pcie->reset_gpio,
GPIOF_OUT_INIT_HIGH, "RESET");
return;
}

static int exynos_pcie_establish_link(struct pcie_port *pp)
Expand Down Expand Up @@ -388,7 +387,6 @@ static void exynos_pcie_clear_irq_pulse(struct pcie_port *pp)

val = exynos_elb_readl(exynos_pcie, PCIE_IRQ_PULSE);
exynos_elb_writel(exynos_pcie, val, PCIE_IRQ_PULSE);
return;
}

static void exynos_pcie_enable_irq_pulse(struct pcie_port *pp)
Expand All @@ -400,7 +398,6 @@ static void exynos_pcie_enable_irq_pulse(struct pcie_port *pp)
val = IRQ_INTA_ASSERT | IRQ_INTB_ASSERT |
IRQ_INTC_ASSERT | IRQ_INTD_ASSERT,
exynos_elb_writel(exynos_pcie, val, PCIE_IRQ_EN_PULSE);
return;
}

static irqreturn_t exynos_pcie_irq_handler(int irq, void *arg)
Expand Down Expand Up @@ -429,7 +426,6 @@ static void exynos_pcie_msi_init(struct pcie_port *pp)
val = exynos_elb_readl(exynos_pcie, PCIE_IRQ_EN_LEVEL);
val |= IRQ_MSI_ENABLE;
exynos_elb_writel(exynos_pcie, val, PCIE_IRQ_EN_LEVEL);
return;
}

static void exynos_pcie_enable_interrupts(struct pcie_port *pp)
Expand All @@ -438,8 +434,6 @@ static void exynos_pcie_enable_interrupts(struct pcie_port *pp)

if (IS_ENABLED(CONFIG_PCI_MSI))
exynos_pcie_msi_init(pp);

return;
}

static inline void exynos_pcie_readl_rc(struct pcie_port *pp,
Expand All @@ -448,7 +442,6 @@ static inline void exynos_pcie_readl_rc(struct pcie_port *pp,
exynos_pcie_sideband_dbi_r_mode(pp, true);
*val = readl(dbi_base);
exynos_pcie_sideband_dbi_r_mode(pp, false);
return;
}

static inline void exynos_pcie_writel_rc(struct pcie_port *pp,
Expand All @@ -457,7 +450,6 @@ static inline void exynos_pcie_writel_rc(struct pcie_port *pp,
exynos_pcie_sideband_dbi_w_mode(pp, true);
writel(val, dbi_base);
exynos_pcie_sideband_dbi_w_mode(pp, false);
return;
}

static int exynos_pcie_rd_own_conf(struct pcie_port *pp, int where, int size,
Expand Down Expand Up @@ -509,8 +501,8 @@ static struct pcie_host_ops exynos_pcie_host_ops = {
.host_init = exynos_pcie_host_init,
};

static int __init add_pcie_port(struct pcie_port *pp,
struct platform_device *pdev)
static int __init exynos_add_pcie_port(struct pcie_port *pp,
struct platform_device *pdev)
{
int ret;

Expand Down Expand Up @@ -615,7 +607,7 @@ static int __init exynos_pcie_probe(struct platform_device *pdev)
goto fail_bus_clk;
}

ret = add_pcie_port(pp, pdev);
ret = exynos_add_pcie_port(pp, pdev);
if (ret < 0)
goto fail_bus_clk;

Expand Down Expand Up @@ -656,11 +648,11 @@ static struct platform_driver exynos_pcie_driver = {

/* Exynos PCIe driver does not allow module unload */

static int __init pcie_init(void)
static int __init exynos_pcie_init(void)
{
return platform_driver_probe(&exynos_pcie_driver, exynos_pcie_probe);
}
subsys_initcall(pcie_init);
subsys_initcall(exynos_pcie_init);

MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>");
MODULE_DESCRIPTION("Samsung PCIe host controller driver");
Expand Down
Loading

0 comments on commit 35437e3

Please sign in to comment.