Josef Whiter | 6 Sep 23:22 2006
Picon

[PATCH] RFE: add io= option to 8250 serial console

Hello,

This patch is against a recent git clone of Linus's tree.  This patch adds the
ability to set the iobase for the serial port being used when you specify a
serial device for the console on bootup, ie

console=ttyS0,io=0x3f8

this is requested because boxes that use HP's iLo interface will usually
redirect any output to ttyS0 to the iLo interface, which has a certain amount of
latency associated with it.  This option allows users to set the iobase for the
port to the iLo's iobase which removes the need for the bios to do it's
indirection.  This has been tested by myself and HP and it works.  Thank you,

Josef

--- linux-2.6/drivers/serial/8250.c.josef	2006-09-04 11:44:48.000000000 -0400
+++ linux-2.6/drivers/serial/8250.c	2006-09-06 14:22:26.000000000 -0400
 <at>  <at>  -2304,6 +2304,31  <at>  <at>  static int serial8250_console_setup(stru
 	if (!port->iobase && !port->membase)
 		return -ENODEV;

+	/*
+	 * if an io address is specified set the port's iobase to the 
+	 * specified port.  Parses the following option setups
+	 *	console=ttyS0,io=0x3f8
+	 *	console=ttyS0,115200n8,io=0x3f8
+	 *	console=ttyS0,io=0x3f8,115200n8
+	 */
+	if (options) {
(Continue reading)

Russell King | 7 Sep 00:39 2006
Picon

Re: [PATCH] RFE: add io= option to 8250 serial console

On Wed, Sep 06, 2006 at 05:22:37PM -0400, Josef Whiter wrote:
> This patch is against a recent git clone of Linus's tree.  This patch adds
> the ability to set the iobase for the serial port being used when you
> specify a serial device for the console on bootup, ie
> 
> console=ttyS0,io=0x3f8

Have you looked at 8250_early.c already in the kernel?

        console=        [KNL] Output console device and options.

                uart,io,<addr>[,options]
                uart,mmio,<addr>[,options]
                        Start an early, polled-mode console on the 8250/16550
                        UART at the specified I/O port or MMIO address,
                        switching to the matching ttyS device later.  The
                        options are the same as for ttyS, above.

--

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  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

Sergei Shtylyov | 9 Sep 19:19 2006

Re: [PATCH] RM9000 serial driver

Hello, I wrote:

>>>>  <at>  <at>  -289,6 +296,36  <at>  <at>  static inline int map_8250_out_reg(struc
>>>>     return au_io_out_map[offset];
>>>> }
>>>>
>>>> +#elif defined (CONFIG_SERIAL_8250_RM9K)
>>>> +
>>>> +static const u8
>>>> +    regmap_in[8] = {
>>>> +        [UART_RX]    = 0x00,
>>>> +        [UART_IER]    = 0x0c,
>>>> +        [UART_IIR]    = 0x14,
>>>> +        [UART_LCR]    = 0x1c,
>>>> +        [UART_MCR]    = 0x20,
>>>> +        [UART_LSR]    = 0x24,
>>>> +        [UART_MSR]    = 0x28,
>>>> +        [UART_SCR]    = 0x2c
>>>> +    },
>>>> +    regmap_out[8] = {
>>>> +        [UART_TX]     = 0x04,
>>>> +        [UART_IER]    = 0x0c,
>>>> +        [UART_FCR]    = 0x18,
>>>> +        [UART_LCR]    = 0x1c,
>>>> +        [UART_MCR]    = 0x20,
>>>> +        [UART_LSR]    = 0x24,
>>>> +        [UART_MSR]    = 0x28,
>>>> +        [UART_SCR]    = 0x2c
>>>> +    };

(Continue reading)

Sergei Shtylyov | 9 Sep 20:23 2006

[PATCH] 8250 resourse management fixes

I think register ranges obviously need to be claimed/released for all UARTs
including those with UPIO_MEM32 and UPIO_TSI iotype.

Also, serial8250_request_rsa_resources() returns false positives with
UPIO_MEM32, UPIO_AU, and UPIO_TSI iotype -- I don't think this makes any sense.

Signed-off-by: Sergei Shtylyov <sshtylyov <at> ru.mvista.com>

Index: linux-mips/drivers/serial/8250.c
===================================================================
--- linux-mips.orig/drivers/serial/8250.c
+++ linux-mips/drivers/serial/8250.c
 <at>  <at>  -1949,6 +1949,8  <at>  <at>  static int serial8250_request_std_resour
 	case UPIO_AU:
 		size = 0x100000;
 		/* fall thru */
+	case UPIO_TSI:
+	case UPIO_MEM32:
 	case UPIO_MEM:
 		if (!up->port.mapbase)
 			break;
 <at>  <at>  -1984,6 +1986,8  <at>  <at>  static void serial8250_release_std_resou
 	case UPIO_AU:
 		size = 0x100000;
 		/* fall thru */
+	case UPIO_TSI:
+	case UPIO_MEM32:
 	case UPIO_MEM:
(Continue reading)

Olof Johansson | 12 Sep 16:33 2006
Picon

Re: [RFC][PATCH] Xilinx uartlite serial driver

On Tue, 22 Aug 2006 17:13:13 +0200 Peter Korsgaard <jacmet <at> sunsite.dk> wrote:

> >>>>> "Peter" == Peter Korsgaard <jacmet <at> sunsite.dk> writes:
> 
> Hi,
> 
>  Peter> The following patch adds a driver for the Xilinx uartlite serial
>  Peter> controller used in boards with the PPC405 core in the Xilinx V2P/V4
>  Peter> fpgas.
> 
>  Peter> The hardware is very simple (baudrate/start/stopbits fixed and
>  Peter> no break support). See the datasheet for details:
> 
>  Peter> http://www.xilinx.com/bvdocs/ipcenter/data_sheet/opb_uartlite.pdf
> 
>  Peter> Comments and suggestions are welcome. I'm especially wondering about
>  Peter> the fact that I'm hijacking the device nodes used by the mpc52xx_uart
>  Peter> driver ..
> 
> Ok, I now got a chunk of the 204 major range from LANANA. That afaik
> solves the last remaining issue with this..

Hi,

I've been working on getting this running smoothly over the last few days.
In my opinion there's a few pieces missing:

1. There's no early boot console support for PPC. There's another
uartlite patch that's floating around that has this, very useful for
early bringup tasks. I'd like to see this expanded to include that as
(Continue reading)

Alan Cox | 12 Sep 18:21 2006
Picon

[PATCH] serial: Fix up offenders peering at baud bits directly, corrected

Stop some other people peering into the baud bits on their own and make
them use the tty_get_baud_rate() helper as a preperation for the move to
the new termios. Corrected dependancy previous one had on new termios
structs

Signed-off-by: Alan Cox <alan <at> redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude
linux.vanilla-2.6.18-rc6-mm1/drivers/char/moxa.c linux-2.6.18-rc6-mm1/drivers/char/moxa.c
--- linux.vanilla-2.6.18-rc6-mm1/drivers/char/moxa.c	2006-09-11 17:00:09.000000000 +0100
+++ linux-2.6.18-rc6-mm1/drivers/char/moxa.c	2006-09-11 17:18:31.000000000 +0100
 <at>  <at>  -260,7 +260,7  <at>  <at> 
 static void MoxaPortDisable(int);
 static long MoxaPortGetMaxBaud(int);
 static long MoxaPortSetBaud(int, long);
-static int MoxaPortSetTermio(int, struct termios *);
+static int MoxaPortSetTermio(int, struct termios *, speed_t);
 static int MoxaPortGetLineOut(int, int *, int *);
 static void MoxaPortLineCtrl(int, int, int);
 static void MoxaPortFlowCtrl(int, int, int, int, int, int);
 <at>  <at>  -986,7 +988,7  <at>  <at> 
 	if (ts->c_iflag & IXANY)
 		xany = 1;
 	MoxaPortFlowCtrl(ch->port, rts, cts, txflow, rxflow, xany);
-	MoxaPortSetTermio(ch->port, ts);
+	MoxaPortSetTermio(ch->port, ts, tty_get_baud_rate(tty));
 }

 static int block_till_ready(struct tty_struct *tty, struct file *filp,
 <at>  <at>  -1900,9 +1902,10  <at>  <at> 
(Continue reading)

Peter Korsgaard | 13 Sep 07:56 2006
Picon

Re: [RFC][PATCH] Xilinx uartlite serial driver

>>>>> "Olof" == Olof Johansson <olof <at> lixom.net> writes:

Hi Olof, thanks for looking into the driver..

 Olof> In my opinion there's a few pieces missing:

 Olof> 1. There's no early boot console support for PPC. There's another
 Olof> uartlite patch that's floating around that has this, very useful for
 Olof> early bringup tasks. I'd like to see this expanded to include that as
 Olof> well (the regular part of the other driver seems more or less broken
 Olof> though, so this is a better base driver). That shouldn't stop this part
 Olof> of the driver to go in though, just possible future work.

True. The board I have an uartlite on also has a 8250 so it hasn't
been an issue for me so far - But it would indeed be a nice
addition. Adding new stuff to arch/ppc at this moment isn't that
sensible, so perhaps it makes most sense to wait til 4xx is supported
under arch/powerpc?

 Olof> 2. There seems to be some timeout issues with tx_empty. If I boot a
 Olof> regular distro with getty, etc, I get veeeery slow console output right
 Olof> when init starts up. Adding a small default timeout in the init of the
 Olof> uart code seems to help -- the hanging thread seems to be sleeping in
 Olof> uart_wait_until_sent(). I picked a value of '5', seems ok. (Also,
 Olof> without this fix, getty won't start on the port for some reason, it
 Olof> sits in the same timeout forever, or at least for a very long time).

Huh, that's odd - I haven't noticed that. I'll test it again and get
back to you.

(Continue reading)

Peter Korsgaard | 13 Sep 15:39 2006
Picon

Re: [RFC][PATCH] Xilinx uartlite serial driver

>>>>> "Peter" == Peter Korsgaard <jacmet <at> sunsite.dk> writes:

 Olof> 2. There seems to be some timeout issues with tx_empty.

 Peter> Huh, that's odd - I haven't noticed that. I'll test it again and get
 Peter> back to you.

Ahh, found it - I didn't update the uart timeout in set_termios so it
used a very long timeout. Please give the updated patch a try.

Additional changes:
- Actually add the fixes I did in May on request of Russell
- Update for 2.6.18 (devfs and new IRQF defines)
- Removed the SERIAL_UARTLITE_NR_UARTS config option as we only have 4
  minors reserved with lanana anyway.

Signed-off-by: Peter Korsgaard <jacmet <at> sunsite.dk>

diff -urpN linux-2.6.18-rc7.orig/drivers/serial/Kconfig linux-2.6.18-rc7/drivers/serial/Kconfig
--- linux-2.6.18-rc7.orig/drivers/serial/Kconfig	2006-09-13 15:01:24.000000000 +0200
+++ linux-2.6.18-rc7/drivers/serial/Kconfig	2006-09-13 15:01:51.000000000 +0200
 <at>  <at>  -511,6 +511,25  <at>  <at>  config SERIAL_IMX_CONSOLE
 	  your boot loader (lilo or loadlin) about how to pass options to the
 	  kernel at boot time.)

+config SERIAL_UARTLITE
+	tristate "Xilinx uartlite serial port support"
+	depends on PPC32
+	select SERIAL_CORE
+	help
(Continue reading)

Olof Johansson | 13 Sep 17:01 2006
Picon

Re: [RFC][PATCH] Xilinx uartlite serial driver

On Wed, 13 Sep 2006 15:39:09 +0200 Peter Korsgaard <jacmet <at> sunsite.dk> wrote:

> >>>>> "Peter" == Peter Korsgaard <jacmet <at> sunsite.dk> writes:
> 
>  Olof> 2. There seems to be some timeout issues with tx_empty.
> 
>  Peter> Huh, that's odd - I haven't noticed that. I'll test it again and get
>  Peter> back to you.
> 
> Ahh, found it - I didn't update the uart timeout in set_termios so it
> used a very long timeout. Please give the updated patch a try.

Looks good. Thanks.

> Additional changes:
> - Actually add the fixes I did in May on request of Russell
> - Update for 2.6.18 (devfs and new IRQF defines)
> - Removed the SERIAL_UARTLITE_NR_UARTS config option as we only have 4
>   minors reserved with lanana anyway.
> 
> Signed-off-by: Peter Korsgaard <jacmet <at> sunsite.dk>

Acked-by: Olof Johansson <olof <at> lixom.net>

> 
> diff -urpN linux-2.6.18-rc7.orig/drivers/serial/Kconfig linux-2.6.18-rc7/drivers/serial/Kconfig
> --- linux-2.6.18-rc7.orig/drivers/serial/Kconfig	2006-09-13 15:01:24.000000000 +0200
> +++ linux-2.6.18-rc7/drivers/serial/Kconfig	2006-09-13 15:01:51.000000000 +0200
>  <at>  <at>  -511,6 +511,25  <at>  <at>  config SERIAL_IMX_CONSOLE
>  	  your boot loader (lilo or loadlin) about how to pass options to the
(Continue reading)

Irfan Khan | 22 Sep 09:31 2006
Picon

Serial Driver

Hi Everyone,
I am writing a serial driver, which acually not handle any device,
simulate the same.
here I am getting problem like when I call write from user space it is
getting called and write function getting the data , now in write
itself I am calling  tty_insert_flip_char and tty_flip_buffer_push to
echo the string.
but when I call read  from the user space it returns EAGAIN.
Any clues/pointer would be great help.

TIA
Irfan
-
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