* Re: IP32: serial console broken with current git
2007-09-25 18:24 IP32: serial console broken with current git Martin Michlmayr
@ 2007-09-25 16:25 ` Ricardo Mendoza
2007-09-26 12:02 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Mendoza @ 2007-09-25 16:25 UTC (permalink / raw)
To: Martin Michlmayr; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
Martin Michlmayr wrote:
> With current git (and 2.6.23-rc1), nothing shows up on the serial
> console on IP32. Ricardo Mendoza commented on this on IRC:
>
>> I think it was that using iobase member in the plat_serial8250_port
>> struct was not working, swapping to membase gave console messages
>> but kind of stopped printing messages at some point (further in than
>> first line of C tho)
>
> He also sent me a patch to test. With this patch, I get serial
> console output - but only until:
>
> | Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
> | serial8250.0: ttyS0 at MMIO 0x0 (irq = 53) is a 16550A
> | console [ttyS0] enabled
>
> Maybe Ricardo can post his patch for comments and someone can look
> into the second issue.
The patch is the following, please ignore the rewrite of the MACE_PORT
specifications, those are not needed (I don't remember why I did that at
all).
As Martin said, the output stops on the 'console [ttyS0] enabled'
message. I don't know much about the serial code internals but I presume
something is getting trashed on the console setup.. or perhaps it's just
something really dumb like a missing call or something. Someone
enlightened in the issue can perhaps shed a light.
Ricardo
[-- Attachment #2: plat_dev.patch --]
[-- Type: text/x-patch, Size: 1722 bytes --]
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index ba3697e..6ad2ecc 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -10,25 +10,29 @@
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
+#include <asm/addrspace.h>
#include <asm/ip32/mace.h>
#include <asm/ip32/ip32_ints.h>
-/*
- * .iobase isn't a constant (in the sense of C) so we fill it in at runtime.
- */
-#define MACE_PORT(int) \
-{ \
- .irq = int, \
- .uartclk = 1843200, \
- .iotype = UPIO_MEM, \
- .flags = UPF_SKIP_TEST, \
- .regshift = 8, \
-}
static struct plat_serial8250_port uart8250_data[] = {
- MACE_PORT(MACEISA_SERIAL1_IRQ),
- MACE_PORT(MACEISA_SERIAL2_IRQ),
- { },
+ [0] = {
+ .irq = MACEISA_SERIAL1_IRQ,
+ .uartclk = 1843200,
+ .iotype = UPIO_MEM,
+ .flags = UPF_SKIP_TEST,
+ .regshift = 8,
+ },
+ [1] = {
+ .irq = MACEISA_SERIAL2_IRQ,
+ .uartclk = 1843200,
+ .iotype = UPIO_MEM,
+ .flags = UPF_SKIP_TEST,
+ .regshift = 8,
+ },
+ {
+ 0,
+ },
};
static struct platform_device uart8250_device = {
@@ -41,8 +45,8 @@ static struct platform_device uart8250_device = {
static int __init uart8250_init(void)
{
- uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1;
- uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1;
+ uart8250_data[0].membase = (char *) &mace->isa.serial1;
+ uart8250_data[1].membase = (char *) &mace->isa.serial2;
return platform_device_register(&uart8250_device);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* IP32: serial console broken with current git
@ 2007-09-25 18:24 Martin Michlmayr
2007-09-25 16:25 ` Ricardo Mendoza
0 siblings, 1 reply; 3+ messages in thread
From: Martin Michlmayr @ 2007-09-25 18:24 UTC (permalink / raw)
To: linux-mips; +Cc: Ricardo Mendoza
With current git (and 2.6.23-rc1), nothing shows up on the serial
console on IP32. Ricardo Mendoza commented on this on IRC:
> I think it was that using iobase member in the plat_serial8250_port
> struct was not working, swapping to membase gave console messages
> but kind of stopped printing messages at some point (further in than
> first line of C tho)
He also sent me a patch to test. With this patch, I get serial
console output - but only until:
| Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
| serial8250.0: ttyS0 at MMIO 0x0 (irq = 53) is a 16550A
| console [ttyS0] enabled
Maybe Ricardo can post his patch for comments and someone can look
into the second issue.
--
Martin Michlmayr
http://www.cyrius.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: IP32: serial console broken with current git
2007-09-25 16:25 ` Ricardo Mendoza
@ 2007-09-26 12:02 ` Ralf Baechle
0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2007-09-26 12:02 UTC (permalink / raw)
To: Ricardo Mendoza; +Cc: Martin Michlmayr, linux-mips
On Tue, Sep 25, 2007 at 12:25:54PM -0400, Ricardo Mendoza wrote:
> Martin Michlmayr wrote:
> > With current git (and 2.6.23-rc1), nothing shows up on the serial
> > console on IP32. Ricardo Mendoza commented on this on IRC:
> >
> >> I think it was that using iobase member in the plat_serial8250_port
> >> struct was not working, swapping to membase gave console messages
> >> but kind of stopped printing messages at some point (further in than
> >> first line of C tho)
> >
> > He also sent me a patch to test. With this patch, I get serial
> > console output - but only until:
> >
> > | Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
> > | serial8250.0: ttyS0 at MMIO 0x0 (irq = 53) is a 16550A
> > | console [ttyS0] enabled
> >
> > Maybe Ricardo can post his patch for comments and someone can look
> > into the second issue.
>
>
> The patch is the following, please ignore the rewrite of the MACE_PORT
> specifications, those are not needed (I don't remember why I did that at
> all).
>
> As Martin said, the output stops on the 'console [ttyS0] enabled'
> message. I don't know much about the serial code internals but I presume
> something is getting trashed on the console setup.. or perhaps it's just
> something really dumb like a missing call or something. Someone
> enlightened in the issue can perhaps shed a light.
The membase part of it looks right.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-26 12:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-25 18:24 IP32: serial console broken with current git Martin Michlmayr
2007-09-25 16:25 ` Ricardo Mendoza
2007-09-26 12:02 ` Ralf Baechle
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.