* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
@ 2009-06-11 9:30 ` Thomas Bogendoerfer
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Bogendoerfer @ 2009-06-11 9:30 UTC (permalink / raw)
To: Florian Fainelli
Cc: Linux-MIPS, Ralf Baechle, linux-kernel, Alan Cox, linux-serial
On Thu, Jun 11, 2009 at 10:28:39AM +0200, Florian Fainelli wrote:
> Le Friday 05 June 2009 00:20:20 Thomas Bogendoerfer, vous avez écrit :
> > On Thu, Jun 04, 2009 at 04:22:46PM +0200, Florian Fainelli wrote:
> > > We discussed that in private, there are a couple of things
> > > to fix in order to get 8250 working properly with TI AR7 HW.
> > > If you can still merge that bit, this would ease future work, thanks !
> >
> > I still have a tree here, which works without any changes to the 8250
> > serial driver on a TNETD7300 device.
>
> Could you show me how you register the 8250 driver ? Without the 8250-specific
static struct plat_serial8250_port uart0_data = {
.mapbase = AR7_REGS_UART0,
.irq = AR7_IRQ_UART0,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
};
uart_port[0].type = PORT_16550A;
uart_port[0].line = 0;
uart_port[0].irq = AR7_IRQ_UART0;
uart_port[0].uartclk = ar7_bus_freq() / 2;
uart_port[0].iotype = UPIO_MEM;
uart_port[0].mapbase = AR7_REGS_UART0 + 3;
uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
uart_port[0].regshift = 2;
res = early_serial_setup(&uart_port[0]);
if (res)
return res;
the +3 comes from the fact, that this machine is configured to run big
endian.
Here is the boot log:
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x8610e03 (irq = 15) is a 16550A
console handover: boot [early0] -> real [ttyS0]
serial8250: ttyS1 at MMIO 0x8610f00 (irq = 19) is a 16550A
loop: module loaded
Fixed MDIO Bus: probed
ttyS1 uses the wrong address, but there is nothing connected to
that port on the box.
Do you see the problem on TNETD7200 devices as well ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
2009-06-11 9:30 ` Thomas Bogendoerfer
(?)
@ 2009-06-11 11:27 ` Alexander Clouter
-1 siblings, 0 replies; 16+ messages in thread
From: Alexander Clouter @ 2009-06-11 11:27 UTC (permalink / raw)
To: linux-mips; +Cc: linux-serial, linux-kernel
In gmane.linux.ports.mips.general Thomas Bogendoerfer <tsbogend@alpha.franken.de> wrote:
>
> On Thu, Jun 11, 2009 at 10:28:39AM +0200, Florian Fainelli wrote:
>> Le Friday 05 June 2009 00:20:20 Thomas Bogendoerfer, vous avez écrit :
>> > On Thu, Jun 04, 2009 at 04:22:46PM +0200, Florian Fainelli wrote:
>> > > We discussed that in private, there are a couple of things
>> > > to fix in order to get 8250 working properly with TI AR7 HW.
>> > > If you can still merge that bit, this would ease future work, thanks !
>> >
>> > I still have a tree here, which works without any changes to the 8250
>> > serial driver on a TNETD7300 device.
>>
>> Could you show me how you register the 8250 driver ? Without the 8250-specific
>
> static struct plat_serial8250_port uart0_data = {
> .mapbase = AR7_REGS_UART0,
> .irq = AR7_IRQ_UART0,
> .regshift = 2,
> .iotype = UPIO_MEM,
> .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> };
>
> uart_port[0].type = PORT_16550A;
> uart_port[0].line = 0;
> uart_port[0].irq = AR7_IRQ_UART0;
> uart_port[0].uartclk = ar7_bus_freq() / 2;
> uart_port[0].iotype = UPIO_MEM;
> uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> uart_port[0].regshift = 2;
> res = early_serial_setup(&uart_port[0]);
> if (res)
> return res;
>
>
> the +3 comes from the fact, that this machine is configured to run big
> endian.
>
Alternatively you could not use the byte ordering macro/functions as per
the 'Byte Order' section in:
http://lwn.net/images/pdf/LDD3/ch11.pdf
Makes the code portable, understandable and...well neater.
Cheers
--
Alexander Clouter
.sigmonster says: Life is like a diaper -- short and loaded.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
@ 2009-06-11 11:27 ` Alexander Clouter
0 siblings, 0 replies; 16+ messages in thread
From: Alexander Clouter @ 2009-06-11 11:27 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-serial, linux-mips, linux-serial, linux-kernel
In gmane.linux.ports.mips.general Thomas Bogendoerfer <tsbogend@alpha.franken.de> wrote:
>
> On Thu, Jun 11, 2009 at 10:28:39AM +0200, Florian Fainelli wrote:
>> Le Friday 05 June 2009 00:20:20 Thomas Bogendoerfer, vous avez écrit :
>> > On Thu, Jun 04, 2009 at 04:22:46PM +0200, Florian Fainelli wrote:
>> > > We discussed that in private, there are a couple of things
>> > > to fix in order to get 8250 working properly with TI AR7 HW.
>> > > If you can still merge that bit, this would ease future work, thanks !
>> >
>> > I still have a tree here, which works without any changes to the 8250
>> > serial driver on a TNETD7300 device.
>>
>> Could you show me how you register the 8250 driver ? Without the 8250-specific
>
> static struct plat_serial8250_port uart0_data = {
> .mapbase = AR7_REGS_UART0,
> .irq = AR7_IRQ_UART0,
> .regshift = 2,
> .iotype = UPIO_MEM,
> .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> };
>
> uart_port[0].type = PORT_16550A;
> uart_port[0].line = 0;
> uart_port[0].irq = AR7_IRQ_UART0;
> uart_port[0].uartclk = ar7_bus_freq() / 2;
> uart_port[0].iotype = UPIO_MEM;
> uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> uart_port[0].regshift = 2;
> res = early_serial_setup(&uart_port[0]);
> if (res)
> return res;
>
>
> the +3 comes from the fact, that this machine is configured to run big
> endian.
>
Alternatively you could not use the byte ordering macro/functions as per
the 'Byte Order' section in:
http://lwn.net/images/pdf/LDD3/ch11.pdf
Makes the code portable, understandable and...well neater.
Cheers
--
Alexander Clouter
.sigmonster says: Life is like a diaper -- short and loaded.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
@ 2009-06-11 11:27 ` Alexander Clouter
0 siblings, 0 replies; 16+ messages in thread
From: Alexander Clouter @ 2009-06-11 11:27 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-serial, linux-mips
In gmane.linux.ports.mips.general Thomas Bogendoerfer <tsbogend@alpha.franken.de> wrote:
>
> On Thu, Jun 11, 2009 at 10:28:39AM +0200, Florian Fainelli wrote:
>> Le Friday 05 June 2009 00:20:20 Thomas Bogendoerfer, vous avez écrit :
>> > On Thu, Jun 04, 2009 at 04:22:46PM +0200, Florian Fainelli wrote:
>> > > We discussed that in private, there are a couple of things
>> > > to fix in order to get 8250 working properly with TI AR7 HW.
>> > > If you can still merge that bit, this would ease future work, thanks !
>> >
>> > I still have a tree here, which works without any changes to the 8250
>> > serial driver on a TNETD7300 device.
>>
>> Could you show me how you register the 8250 driver ? Without the 8250-specific
>
> static struct plat_serial8250_port uart0_data = {
> .mapbase = AR7_REGS_UART0,
> .irq = AR7_IRQ_UART0,
> .regshift = 2,
> .iotype = UPIO_MEM,
> .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> };
>
> uart_port[0].type = PORT_16550A;
> uart_port[0].line = 0;
> uart_port[0].irq = AR7_IRQ_UART0;
> uart_port[0].uartclk = ar7_bus_freq() / 2;
> uart_port[0].iotype = UPIO_MEM;
> uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> uart_port[0].regshift = 2;
> res = early_serial_setup(&uart_port[0]);
> if (res)
> return res;
>
>
> the +3 comes from the fact, that this machine is configured to run big
> endian.
>
Alternatively you could not use the byte ordering macro/functions as per
the 'Byte Order' section in:
http://lwn.net/images/pdf/LDD3/ch11.pdf
Makes the code portable, understandable and...well neater.
Cheers
--
Alexander Clouter
.sigmonster says: Life is like a diaper -- short and loaded.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
2009-06-11 11:27 ` Alexander Clouter
(?)
(?)
@ 2009-06-11 12:41 ` Alexander Clouter
-1 siblings, 0 replies; 16+ messages in thread
From: Alexander Clouter @ 2009-06-11 12:41 UTC (permalink / raw)
To: linux-serial; +Cc: linux-mips, linux-kernel
Hi,
* Alexander Clouter <alex@digriz.org.uk> [2009-06-11 12:27:19+0100]:
>
> > static struct plat_serial8250_port uart0_data = {
> > .mapbase = AR7_REGS_UART0,
> > .irq = AR7_IRQ_UART0,
> > .regshift = 2,
> > .iotype = UPIO_MEM,
> > .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> > };
> >
> > uart_port[0].type = PORT_16550A;
> > uart_port[0].line = 0;
> > uart_port[0].irq = AR7_IRQ_UART0;
> > uart_port[0].uartclk = ar7_bus_freq() / 2;
> > uart_port[0].iotype = UPIO_MEM;
> > uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> > uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> > uart_port[0].regshift = 2;
> > res = early_serial_setup(&uart_port[0]);
> > if (res)
> > return res;
> >
> >
> > the +3 comes from the fact, that this machine is configured to run big
> > endian.
> >
> Alternatively you could not use the byte ordering macro/functions as per
> the 'Byte Order' section in:
>
> http://lwn.net/images/pdf/LDD3/ch11.pdf
>
> Makes the code portable, understandable and...well neater.
>
Maybe not, scrap that :)
Cheers
--
Alexander Clouter
.sigmonster says: "MOKE DAT YIGARETTE"
-- "The Last Coin", James P. Blaylock
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
2009-06-11 9:30 ` Thomas Bogendoerfer
@ 2009-06-14 11:18 ` Florian Fainelli
-1 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2009-06-14 11:18 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Linux-MIPS, Ralf Baechle, linux-kernel, Alan Cox, linux-serial
Le Thursday 11 June 2009 11:30:22 Thomas Bogendoerfer, vous avez écrit :
> On Thu, Jun 11, 2009 at 10:28:39AM +0200, Florian Fainelli wrote:
> > Le Friday 05 June 2009 00:20:20 Thomas Bogendoerfer, vous avez écrit :
> > > On Thu, Jun 04, 2009 at 04:22:46PM +0200, Florian Fainelli wrote:
> > > > We discussed that in private, there are a couple of things
> > > > to fix in order to get 8250 working properly with TI AR7 HW.
> > > > If you can still merge that bit, this would ease future work, thanks
> > > > !
> > >
> > > I still have a tree here, which works without any changes to the 8250
> > > serial driver on a TNETD7300 device.
> >
> > Could you show me how you register the 8250 driver ? Without the
> > 8250-specific
>
> static struct plat_serial8250_port uart0_data = {
> .mapbase = AR7_REGS_UART0,
> .irq = AR7_IRQ_UART0,
> .regshift = 2,
> .iotype = UPIO_MEM,
> .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> };
>
> uart_port[0].type = PORT_16550A;
> uart_port[0].line = 0;
> uart_port[0].irq = AR7_IRQ_UART0;
> uart_port[0].uartclk = ar7_bus_freq() / 2;
> uart_port[0].iotype = UPIO_MEM;
> uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> uart_port[0].regshift = 2;
> res = early_serial_setup(&uart_port[0]);
> if (res)
> return res;
>
>
> the +3 comes from the fact, that this machine is configured to run big
> endian.
>
> Here is the boot log:
>
> Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
> serial8250: ttyS0 at MMIO 0x8610e03 (irq = 15) is a 16550A
> console handover: boot [early0] -> real [ttyS0]
> serial8250: ttyS1 at MMIO 0x8610f00 (irq = 19) is a 16550A
> loop: module loaded
> Fixed MDIO Bus: probed
>
>
> ttyS1 uses the wrong address, but there is nothing connected to
> that port on the box.
>
> Do you see the problem on TNETD7200 devices as well ?
I no longer have TNETD7200 devices to test on unfortunately.
What I just found is that TNETD7300GDU revision 5 does not have this bug,
while TNETD7300GDU revision 4 has. This seems to confirm the HW bug
hypothesis. Let's just clean the serial console registration and we will keep
in OpenWrt the 8250 workaround for older TNETD7300 revisions.
--
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
@ 2009-06-14 11:18 ` Florian Fainelli
0 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2009-06-14 11:18 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Linux-MIPS, Ralf Baechle, linux-kernel, Alan Cox, linux-serial
Le Thursday 11 June 2009 11:30:22 Thomas Bogendoerfer, vous avez écrit :
> On Thu, Jun 11, 2009 at 10:28:39AM +0200, Florian Fainelli wrote:
> > Le Friday 05 June 2009 00:20:20 Thomas Bogendoerfer, vous avez écrit :
> > > On Thu, Jun 04, 2009 at 04:22:46PM +0200, Florian Fainelli wrote:
> > > > We discussed that in private, there are a couple of things
> > > > to fix in order to get 8250 working properly with TI AR7 HW.
> > > > If you can still merge that bit, this would ease future work, thanks
> > > > !
> > >
> > > I still have a tree here, which works without any changes to the 8250
> > > serial driver on a TNETD7300 device.
> >
> > Could you show me how you register the 8250 driver ? Without the
> > 8250-specific
>
> static struct plat_serial8250_port uart0_data = {
> .mapbase = AR7_REGS_UART0,
> .irq = AR7_IRQ_UART0,
> .regshift = 2,
> .iotype = UPIO_MEM,
> .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> };
>
> uart_port[0].type = PORT_16550A;
> uart_port[0].line = 0;
> uart_port[0].irq = AR7_IRQ_UART0;
> uart_port[0].uartclk = ar7_bus_freq() / 2;
> uart_port[0].iotype = UPIO_MEM;
> uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> uart_port[0].regshift = 2;
> res = early_serial_setup(&uart_port[0]);
> if (res)
> return res;
>
>
> the +3 comes from the fact, that this machine is configured to run big
> endian.
>
> Here is the boot log:
>
> Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
> serial8250: ttyS0 at MMIO 0x8610e03 (irq = 15) is a 16550A
> console handover: boot [early0] -> real [ttyS0]
> serial8250: ttyS1 at MMIO 0x8610f00 (irq = 19) is a 16550A
> loop: module loaded
> Fixed MDIO Bus: probed
>
>
> ttyS1 uses the wrong address, but there is nothing connected to
> that port on the box.
>
> Do you see the problem on TNETD7200 devices as well ?
I no longer have TNETD7200 devices to test on unfortunately.
What I just found is that TNETD7300GDU revision 5 does not have this bug,
while TNETD7300GDU revision 4 has. This seems to confirm the HW bug
hypothesis. Let's just clean the serial console registration and we will keep
in OpenWrt the 8250 workaround for older TNETD7300 revisions.
--
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread