* [PATCH 4/5] Celleb: Serial I/O update
@ 2007-10-02 8:25 Ishizaki Kou
2007-10-02 11:27 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Ishizaki Kou @ 2007-10-02 8:25 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
This is an update patch for Serial I/O on Celleb.
- Detection algorithm has been changed
Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
---
Index: linux-powerpc-git/arch/powerpc/platforms/celleb/scc_sio.c
===================================================================
--- linux-powerpc-git.orig/arch/powerpc/platforms/celleb/scc_sio.c
+++ linux-powerpc-git/arch/powerpc/platforms/celleb/scc_sio.c
@@ -1,7 +1,7 @@
/*
* 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
* it under the terms of the GNU General Public License as published by
@@ -42,40 +42,40 @@ static struct {
static int __init txx9_serial_init(void)
{
extern int early_serial_txx9_setup(struct uart_port *port);
- struct device_node *node;
+ struct device_node *node = NULL;
int i;
struct uart_port req;
struct of_irq irq;
struct resource res;
- node = of_find_node_by_path("/ioif1/sio");
- if (!node)
- return 0;
-
- for(i = 0; i < sizeof(txx9_scc_tab)/sizeof(txx9_scc_tab[0]); i++) {
- if (!(txx9_serial_bitmap & (1<<i)))
- continue;
-
- if (of_irq_map_one(node, i, &irq))
- continue;
- if (of_address_to_resource(node, txx9_scc_tab[i].index, &res))
- continue;
-
- memset(&req, 0, sizeof(req));
- req.line = i;
- req.iotype = UPIO_MEM;
- req.mapbase = res.start + txx9_scc_tab[i].offset;
+ while ((node = of_find_compatible_node(node,
+ "serial", "toshiba,sio-scc")) != NULL) {
+ for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) {
+ if (!(txx9_serial_bitmap & (1<<i)))
+ continue;
+
+ if (of_irq_map_one(node, i, &irq))
+ continue;
+ if (of_address_to_resource(node,
+ txx9_scc_tab[i].index, &res))
+ continue;
+
+ memset(&req, 0, sizeof(req));
+ req.line = i;
+ req.iotype = UPIO_MEM;
+ req.mapbase = res.start + txx9_scc_tab[i].offset;
#ifdef CONFIG_SERIAL_TXX9_CONSOLE
- req.membase = ioremap(req.mapbase, 0x24);
+ req.membase = ioremap(req.mapbase, 0x24);
#endif
- req.irq = irq_create_of_mapping(irq.controller,
- irq.specifier, irq.size);
- req.flags |= UPF_IOREMAP | UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
- req.uartclk = 83300000;
- early_serial_txx9_setup(&req);
+ req.irq = irq_create_of_mapping(irq.controller,
+ irq.specifier, irq.size);
+ req.flags |= UPF_IOREMAP | UPF_BUGGY_UART
+ /*HAVE_CTS_LINE*/;
+ req.uartclk = 83300000;
+ early_serial_txx9_setup(&req);
+ }
}
- of_node_put(node);
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 4/5] Celleb: Serial I/O update
2007-10-02 8:25 [PATCH 4/5] Celleb: Serial I/O update Ishizaki Kou
@ 2007-10-02 11:27 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2007-10-02 11:27 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
On Tuesday 02 October 2007, Ishizaki Kou wrote:
> This is an update patch for Serial I/O on Celleb.
> - Detection algorithm has been changed
>
> Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-02 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 8:25 [PATCH 4/5] Celleb: Serial I/O update Ishizaki Kou
2007-10-02 11:27 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.