Bjorn Helgaas | 11 Sep 00:02 2004
Picon

[PATCH, RFC] Add early uart console driver

This adds an early "uart" console driver, based on Andi Kleen's
early_printk work.

The main difference is that this locates the UART device directly by
its MMIO or I/O port address, so we don't have to make assumptions about
how ttyS devices will be named.  After the normal serial driver starts,
we try to locate the matching ttyS device and start a console there.

Sample usage:
    console=uart,io,0x3f8
    console=uart,mmio,0xff5e0000,115200n8

If the baud rate isn't specified, we peek at the UART to figure it
out.

With just the patch below, the console starts working in console_init().
But it provides a hook, early_serial_console_init(), that arch code can
use to make the console start working early in setup_arch(), similar to
early_printk.

Comments welcome.

 Documentation/kernel-parameters.txt |   20 ++
 drivers/serial/8250.c               |   35 ++++
 drivers/serial/Makefile             |    1 
 include/linux/serial.h              |    2 
 kernel/printk.c                     |    2 
 drivers/serial/8250_early.c         |  255 ++++++++++++++++++++++++++++++++++++
 6 files changed, 312 insertions(+), 3 deletions(-)

(Continue reading)

roger blofeld | 16 Sep 02:23 2004
Picon

[PATCH] uart_get_divisor picks better quot

I have a case where uartclk is 33000000 and baud is 115200. The
quotient is about 17.9, but the current code selects 17 as the quot.
With 17 I'm getting corrupted characters transmitted. Using 18 fixes
the problem. Perhaps rounding would be a better choice than truncation.
-roger

===== drivers/serial/serial_core.c 1.87 vs edited =====
--- 1.87/drivers/serial/serial_core.c   2004-06-29 09:43:58 -05:00
+++ edited/drivers/serial/serial_core.c 2004-09-15 14:04:34 -05:00
 <at>  <at>  -403,7 +403,7  <at>  <at> 
        if (baud == 38400 && (port->flags & UPF_SPD_MASK) ==
UPF_SPD_CUST)
                quot = port->custom_divisor;
        else
-               quot = port->uartclk / (16 * baud);
+               quot = (port->uartclk + (8 * baud)) / (16 * baud);

        return quot;
 }

		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Manish RATHI | 16 Sep 05:35 2004

autobaud rate support and dce mode

does linux kernel have a framework for autobaud rate and 
uart as dce mode.
If yes then pls tell me the interface

Manish

-----Original Message-----
From: linux-serial-owner <at> vger.kernel.org
[mailto:linux-serial-owner <at> vger.kernel.org] On Behalf Of roger blofeld
Sent: Thursday, September 16, 2004 5:53 AM
To: rmk+serial <at> arm.linux.org.uk
Cc: linux-serial <at> vger.kernel.org
Subject: [PATCH] uart_get_divisor picks better quot

I have a case where uartclk is 33000000 and baud is 115200. The quotient is
about 17.9, but the current code selects 17 as the quot. With 17 I'm getting
corrupted characters transmitted. Using 18 fixes the problem. Perhaps
rounding would be a better choice than truncation. -roger

===== drivers/serial/serial_core.c 1.87 vs edited =====
--- 1.87/drivers/serial/serial_core.c   2004-06-29 09:43:58 -05:00
+++ edited/drivers/serial/serial_core.c 2004-09-15 14:04:34 -05:00
 <at>  <at>  -403,7 +403,7  <at>  <at> 
        if (baud == 38400 && (port->flags & UPF_SPD_MASK) ==
UPF_SPD_CUST)
                quot = port->custom_divisor;
        else
-               quot = port->uartclk / (16 * baud);
+               quot = (port->uartclk + (8 * baud)) / (16 * baud);

(Continue reading)

Eric Valette | 21 Sep 12:40 2004
Picon

ST16C554 Serial device driver

Hi,

Sorry to annoy you with one small question : I'm currently working as a
contractor to port an application from LynxOS to linux 2.6 and I'm
annoyed with the serial driver code. I need to find a driver for a 
ST16C554 quad serial ISA board. I've tried to use setserial with the 
relevant IO ports and irq but cannot manage to output annything on the 
PC 104 board.

The setting multiplex the same IRQ (10) for the four ports. Do you have
any hint, advice.

Thanks for your help,

--

-- 
    __
   /  `                   	Eric Valette
  /--   __  o _.          	6 rue Paul Le Flem
(___, / (_(_(__         	35740 Pace

Tel: +33 (0)2 99 85 26 76	Fax: +33 (0)2 99 85 26 76
E-mail: eric.valette <at> free.fr

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Roman Kurakin | 21 Sep 13:08 2004
Picon

Re: ST16C554 Serial device driver

Hi,

    Try our driver, it is only wrapper for serial.c.
So you may see some hints in it.

http://www.cronyx.ru/~rik/omlinux_current.tgz

But I should warn you that current serial.c is buggy.
Our internal tests works fine with linux prior 2.6 and
FreeBSD both with our cards and com ports, but fails
with serial.c from 2.6.x. This fact enforce me to think
that driver is buggy, not test.

rik

Eric Valette wrote:

> Hi,
>
> Sorry to annoy you with one small question : I'm currently working as a
> contractor to port an application from LynxOS to linux 2.6 and I'm
> annoyed with the serial driver code. I need to find a driver for a 
> ST16C554 quad serial ISA board. I've tried to use setserial with the 
> relevant IO ports and irq but cannot manage to output annything on the 
> PC 104 board.
>
> The setting multiplex the same IRQ (10) for the four ports. Do you have
> any hint, advice.
>
> Thanks for your help,
(Continue reading)

Russell King | 21 Sep 14:09 2004
Picon

Re: ST16C554 Serial device driver

On Tue, Sep 21, 2004 at 12:40:08PM +0200, Eric Valette wrote:
> Sorry to annoy you with one small question : I'm currently working as a
> contractor to port an application from LynxOS to linux 2.6 and I'm
> annoyed with the serial driver code. I need to find a driver for a 
> ST16C554 quad serial ISA board. I've tried to use setserial with the 
> relevant IO ports and irq but cannot manage to output annything on the 
> PC 104 board.

The kernel 8250 driver is expected to drive this port.

What is the result of an autodetect at the correct address?  What are
the commands you're issuing to tell the kernel where this port is?
Do you get any kernel messages, and what are they?

--

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Eric Valette | 21 Sep 14:35 2004
Picon

Re: ST16C554 Serial device driver

Russell King wrote:
> On Tue, Sep 21, 2004 at 12:40:08PM +0200, Eric Valette wrote:
> 
>>Sorry to annoy you with one small question : I'm currently working as a
>>contractor to port an application from LynxOS to linux 2.6 and I'm
>>annoyed with the serial driver code. I need to find a driver for a 
>>ST16C554 quad serial ISA board. I've tried to use setserial with the 
>>relevant IO ports and irq but cannot manage to output annything on the 
>>PC 104 board.
> 
> 
> The kernel 8250 driver is expected to drive this port.
> 
> What is the result of an autodetect at the correct address?  What are
> the commands you're issuing to tell the kernel where this port is?
> Do you get any kernel messages, and what are they?
> 

I checked the LynOS working driver code and found the following
driver uart configuration code (support two differents boards with
diffrent IO ranges and irq's) :

ERIMSERIAL(erimserial0, 0x287, 32 + 10, B19200, B19200,
         0x280, 0x288, 0x290, 0x298);

It means : IRQ 10, baud rate 1920 ioports : 0x280, 0x288, 0x290, 0x298
but the interesting register is the 0x287 that is used to

ERIMSERIAL(erimserial1, 0x2a7, 32 + 11, B19200, B19200,
         0x2a0, 0x2a8, 0x2b0, 0x2b8);
(Continue reading)

Russell King | 21 Sep 14:54 2004
Picon

Re: ST16C554 Serial device driver

On Tue, Sep 21, 2004 at 02:35:27PM +0200, Eric Valette wrote:
> Russell King wrote:
> > What is the result of an autodetect at the correct address?  What are
> > the commands you're issuing to tell the kernel where this port is?
> > Do you get any kernel messages, and what are they?
> 
> What is more suspect is the 0x287 (0x2a7) and register address that is 
> described in the manufacturer documentation of the PC104 board that says 
> : "When the same IRQ is shared by the 4 ports, the card uses 2 registers 
> at 287H, one to valid the interrupts and the other to read back the 4 
> interrupt status". The attached pictures gives the signification of the 
> register.

Ok the above shouldn't be a problem.

> regarding configuration I basically said :
> 	setserial /dev/ttyS2 port 0x280 irq 10 autoconfig
> 
> (same with the four ports) and
> 
> 	setserial /dev/ttyS6 port 0x2a0 irq 11 autoconfig
> 
> (same with the four ports)

Can you run:

	setserial -bav /dev/ttyS2

so we can see what the kernel has done?

(Continue reading)

Eric Valette | 21 Sep 15:13 2004
Picon

Re: ST16C554 Serial device driver

Russell King wrote:
> On Tue, Sep 21, 2004 at 02:35:27PM +0200, Eric Valette wrote:
> 
>>Russell King wrote:
>>
>>>What is the result of an autodetect at the correct address?  What are
>>>the commands you're issuing to tell the kernel where this port is?
>>>Do you get any kernel messages, and what are they?
>>
>>What is more suspect is the 0x287 (0x2a7) and register address that is 
>>described in the manufacturer documentation of the PC104 board that says 
>>: "When the same IRQ is shared by the 4 ports, the card uses 2 registers 
>>at 287H, one to valid the interrupts and the other to read back the 4 
>>interrupt status". The attached pictures gives the signification of the 
>>register.
> 
> 
> Ok the above shouldn't be a problem.
> 
> 
>>regarding configuration I basically said :
>>	setserial /dev/ttyS2 port 0x280 irq 10 autoconfig
>>
>>(same with the four ports) and
>>
>>	setserial /dev/ttyS6 port 0x2a0 irq 11 autoconfig
>>
>>(same with the four ports)
> 
> 
(Continue reading)

Eric Valette | 21 Sep 15:47 2004
Picon

Re: ST16C554 Serial device driver

Eric Valette wrote:

> Do not hesitate to ask more, I can recompile a kernel also if you want...

I forgot to mention that I am not suscribed so please CC me.

-- eric

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane