Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/4xx: PCIe driver now detects if a port is disabled via the dev-tree

This patch add a check to the PPC4xx PCIe driver to detect if the port
is disabled via the device-tree. This is needed for the AMCC Canyonlands
board which has an option to either select 2 PCIe ports or 1 PCIe port
and one SATA port. The SATA port and the 1st PCIe port pins are multiplexed
so we can't start both drivers.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

authored by

Stefan Roese and committed by
Josh Boyer
995ada8d 156cea23

+9
+9
arch/powerpc/sysdev/ppc4xx_pci.c
··· 1634 1634 } 1635 1635 port = &ppc4xx_pciex_ports[portno]; 1636 1636 port->index = portno; 1637 + 1638 + /* 1639 + * Check if device is enabled 1640 + */ 1641 + if (!of_device_is_available(np)) { 1642 + printk(KERN_INFO "PCIE%d: Port disabled via device-tree\n", port->index); 1643 + return; 1644 + } 1645 + 1637 1646 port->node = of_node_get(np); 1638 1647 pval = of_get_property(np, "sdr-base", NULL); 1639 1648 if (pval == NULL) {