Commit 86de9f5f authored by Ishizaki Kou's avatar Ishizaki Kou Committed by Paul Mackerras

[POWERPC] Celleb: Serial I/O update

This is an update for Serial I/O on Celleb.
  - Detection algorithm has been changed
Signed-off-by: default avatarKou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7f2c8577
/* /*
* setup serial port in SCC * setup serial port in SCC
* *
* (C) Copyright 2006 TOSHIBA CORPORATION * (C) Copyright 2006-2007 TOSHIBA CORPORATION
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -42,23 +42,22 @@ static struct { ...@@ -42,23 +42,22 @@ static struct {
static int __init txx9_serial_init(void) static int __init txx9_serial_init(void)
{ {
extern int early_serial_txx9_setup(struct uart_port *port); extern int early_serial_txx9_setup(struct uart_port *port);
struct device_node *node; struct device_node *node = NULL;
int i; int i;
struct uart_port req; struct uart_port req;
struct of_irq irq; struct of_irq irq;
struct resource res; struct resource res;
node = of_find_node_by_path("/ioif1/sio"); while ((node = of_find_compatible_node(node,
if (!node) "serial", "toshiba,sio-scc")) != NULL) {
return 0; for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) {
for(i = 0; i < sizeof(txx9_scc_tab)/sizeof(txx9_scc_tab[0]); i++) {
if (!(txx9_serial_bitmap & (1<<i))) if (!(txx9_serial_bitmap & (1<<i)))
continue; continue;
if (of_irq_map_one(node, i, &irq)) if (of_irq_map_one(node, i, &irq))
continue; continue;
if (of_address_to_resource(node, txx9_scc_tab[i].index, &res)) if (of_address_to_resource(node,
txx9_scc_tab[i].index, &res))
continue; continue;
memset(&req, 0, sizeof(req)); memset(&req, 0, sizeof(req));
...@@ -70,12 +69,13 @@ static int __init txx9_serial_init(void) ...@@ -70,12 +69,13 @@ static int __init txx9_serial_init(void)
#endif #endif
req.irq = irq_create_of_mapping(irq.controller, req.irq = irq_create_of_mapping(irq.controller,
irq.specifier, irq.size); irq.specifier, irq.size);
req.flags |= UPF_IOREMAP | UPF_BUGGY_UART /*HAVE_CTS_LINE*/; req.flags |= UPF_IOREMAP | UPF_BUGGY_UART
/*HAVE_CTS_LINE*/;
req.uartclk = 83300000; req.uartclk = 83300000;
early_serial_txx9_setup(&req); early_serial_txx9_setup(&req);
} }
}
of_node_put(node);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment