.. | .. |
---|
1397 | 1397 | printk(KERN_WARNING "PCIE%d: Link up failed\n", port->index); |
---|
1398 | 1398 | |
---|
1399 | 1399 | iounmap(mbase); |
---|
1400 | | - return; |
---|
1401 | 1400 | } |
---|
1402 | 1401 | |
---|
1403 | 1402 | static struct ppc4xx_pciex_hwops ppc_476fpe_pcie_hwops __initdata = |
---|
.. | .. |
---|
2079 | 2078 | const u32 *pval; |
---|
2080 | 2079 | int portno; |
---|
2081 | 2080 | unsigned int dcrs; |
---|
2082 | | - const char *val; |
---|
2083 | 2081 | |
---|
2084 | 2082 | /* First, proceed to core initialization as we assume there's |
---|
2085 | 2083 | * only one PCIe core in the system |
---|
.. | .. |
---|
2125 | 2123 | * Resulting from this setup this PCIe port will be configured |
---|
2126 | 2124 | * as root-complex or as endpoint. |
---|
2127 | 2125 | */ |
---|
2128 | | - val = of_get_property(port->node, "device_type", NULL); |
---|
2129 | | - if (!strcmp(val, "pci-endpoint")) { |
---|
| 2126 | + if (of_node_is_type(port->node, "pci-endpoint")) { |
---|
2130 | 2127 | port->endpoint = 1; |
---|
2131 | | - } else if (!strcmp(val, "pci")) { |
---|
| 2128 | + } else if (of_node_is_type(port->node, "pci")) { |
---|
2132 | 2129 | port->endpoint = 0; |
---|
2133 | 2130 | } else { |
---|
2134 | 2131 | printk(KERN_ERR "PCIE: missing or incorrect device_type for %pOF\n", |
---|