aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/legacy_serial.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 59164ba2eb1c..f970ace208d3 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -134,8 +134,9 @@ static int __init add_legacy_soc_port(struct device_node *np,
134 return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags); 134 return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags);
135} 135}
136 136
137#ifdef CONFIG_ISA
137static int __init add_legacy_isa_port(struct device_node *np, 138static int __init add_legacy_isa_port(struct device_node *np,
138 struct device_node *isa_bridge) 139 struct device_node *isa_brg)
139{ 140{
140 u32 *reg; 141 u32 *reg;
141 char *typep; 142 char *typep;
@@ -167,7 +168,9 @@ static int __init add_legacy_isa_port(struct device_node *np,
167 return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ, UPF_BOOT_AUTOCONF); 168 return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ, UPF_BOOT_AUTOCONF);
168 169
169} 170}
171#endif
170 172
173#ifdef CONFIG_PCI
171static int __init add_legacy_pci_port(struct device_node *np, 174static int __init add_legacy_pci_port(struct device_node *np,
172 struct device_node *pci_dev) 175 struct device_node *pci_dev)
173{ 176{
@@ -233,6 +236,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
233 */ 236 */
234 return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, UPF_BOOT_AUTOCONF); 237 return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, UPF_BOOT_AUTOCONF);
235} 238}
239#endif
236 240
237/* 241/*
238 * This is called very early, as part of setup_system() or eventually 242 * This is called very early, as part of setup_system() or eventually
@@ -272,6 +276,7 @@ void __init find_legacy_serial_ports(void)
272 of_node_put(soc); 276 of_node_put(soc);
273 } 277 }
274 278
279#ifdef CONFIG_ISA
275 /* First fill our array with ISA ports */ 280 /* First fill our array with ISA ports */
276 for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { 281 for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
277 struct device_node *isa = of_get_parent(np); 282 struct device_node *isa = of_get_parent(np);
@@ -282,7 +287,9 @@ void __init find_legacy_serial_ports(void)
282 } 287 }
283 of_node_put(isa); 288 of_node_put(isa);
284 } 289 }
290#endif
285 291
292#ifdef CONFIG_PCI
286 /* Next, try to locate PCI ports */ 293 /* Next, try to locate PCI ports */
287 for (np = NULL; (np = of_find_all_nodes(np));) { 294 for (np = NULL; (np = of_find_all_nodes(np));) {
288 struct device_node *pci, *parent = of_get_parent(np); 295 struct device_node *pci, *parent = of_get_parent(np);
@@ -312,6 +319,7 @@ void __init find_legacy_serial_ports(void)
312 legacy_serial_console = index; 319 legacy_serial_console = index;
313 of_node_put(parent); 320 of_node_put(parent);
314 } 321 }
322#endif
315 323
316 DBG("legacy_serial_console = %d\n", legacy_serial_console); 324 DBG("legacy_serial_console = %d\n", legacy_serial_console);
317 325
@@ -375,6 +383,7 @@ static void __init fixup_port_pio(int index,
375 struct device_node *np, 383 struct device_node *np,
376 struct plat_serial8250_port *port) 384 struct plat_serial8250_port *port)
377{ 385{
386#ifdef CONFIG_PCI
378 struct pci_controller *hose; 387 struct pci_controller *hose;
379 388
380 DBG("fixup_port_pio(%d)\n", index); 389 DBG("fixup_port_pio(%d)\n", index);
@@ -391,6 +400,7 @@ static void __init fixup_port_pio(int index,
391 index, port->iobase, port->iobase + offset); 400 index, port->iobase, port->iobase + offset);
392 port->iobase += offset; 401 port->iobase += offset;
393 } 402 }
403#endif
394} 404}
395 405
396static void __init fixup_port_mmio(int index, 406static void __init fixup_port_mmio(int index,