提交 995ada8d 编写于 作者: S Stefan Roese 提交者: Josh Boyer

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: NStefan Roese <sr@denx.de>
Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
上级 156cea23
...@@ -1634,6 +1634,15 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np) ...@@ -1634,6 +1634,15 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
} }
port = &ppc4xx_pciex_ports[portno]; port = &ppc4xx_pciex_ports[portno];
port->index = portno; port->index = portno;
/*
* Check if device is enabled
*/
if (!of_device_is_available(np)) {
printk(KERN_INFO "PCIE%d: Port disabled via device-tree\n", port->index);
return;
}
port->node = of_node_get(np); port->node = of_node_get(np);
pval = of_get_property(np, "sdr-base", NULL); pval = of_get_property(np, "sdr-base", NULL);
if (pval == NULL) { if (pval == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册