Alessandro Rubini | 25 May 17:47
Favicon

[PATCH 0/6] Bridging PCI to amba

This patch set introduces use of the pl011 AMBA serial port under a
PCI bridge.  To compile AMBA under x86, though I need <asm/sizes.h>,
which is moved to <linux/sizes.h> as suggested earlier.

I'm hereby volunteering to handle the moving of the various users
of <asm/sizes.h> to <linux/sizes.h>; this set only moves the ARM core
files and the ones that I need under x86.

The whole patch set is sent to the same set of recipients:
all relevant lists, Russell King (for arm), Greg-KH (for uart) and
Arnd Bergmann (for generic include).

With this set in place (plus a clok API not included here) I have
4 serial ports working. We have a number of other devices that can
use existing drivers, but we definitely need <linux/sizes.h> first.

  spusa.root# uname -r
  3.4.0-next-20120524-00014-gae0c129

  spusa.root# dmesg | grep ttyA
  pl011-pci-03:0005: ttyAMA0 at MMIO 0xcf400000 (irq = 46) is a PL011 rev3
  pl011-pci-03:0006: ttyAMA1 at MMIO 0xcec00000 (irq = 47) is a PL011 rev3
  pl011-pci-03:0007: ttyAMA2 at MMIO 0xce400000 (irq = 48) is a PL011 rev3
  pl011-pci-04:0005: ttyAMA3 at MMIO 0xd3400000 (irq = 49) is a PL011 rev3

  spusa.root# grep -C1 pl011 /proc/iomem
          ce400000-ce7fffff : 0000:03:00.7
            ce400000-ce400fff : pl011-pci-03:0007
            ce400000-ce400fff : uart-pl011
          ce800000-cebfffff : 0000:03:00.6
(Continue reading)

Dmitriy Alekseev | 24 May 17:05
Picon
Favicon

Re: struct tty_flip_buffer replacement in newer kernels

The link I gave is original source, which I afterwards changed according to my parameters - clock and
processor memory map.

You right about offset 0x8, this is offset between ports in my 68 mode, I corrected, but it doesn't give any result.

 
Best regards,
Dmitriy Alekseev

----- Original Message -----
From: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
To: Dmitriy Alekseev <alexeev6 <at> yahoo.com>
Cc: 
Sent: Thursday, May 24, 2012 5:22 PM
Subject: Re: struct tty_flip_buffer replacement in newer kernels

On Thu, 24 May 2012 03:38:42 -0700 (PDT)
Dmitriy Alekseev <alexeev6 <at> yahoo.com> wrote:

> Hi, Alan.
> 
> Thank You very much for the answer!
> So, if I understand correctly, I took for example this: arch/arm/mach-omap1/board-voiceblue.c
> And made in my board specific file:
> static struct plat_serial8250_port exar_ports[] = {
>         {
>                 .mapbase        = (unsigned long)(0x30000300), // according to at91rm9200 CS2
memory map
>                 .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP, // I don't know, what kind of
flags is suitable for me
(Continue reading)

Dmitriy Alekseev | 24 May 12:38
Picon
Favicon

Fw: struct tty_flip_buffer replacement in newer kernels

Hi, Alan.

Thank You very much for the answer!
So, if I understand correctly, I took for example this: arch/arm/mach-omap1/board-voiceblue.c
And made in my board specific file:
static struct plat_serial8250_port exar_ports[] = {
        {
                .mapbase        = (unsigned long)(0x30000300), // according to at91rm9200 CS2
memory map
                .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP, // I don't know, what kind of
flags is suitable for me
                .iotype         = UPIO_MEM, // similar problem
                .regshift       = 1, 
                .uartclk        = 14745600, // Our chip clock frequency
        },
        {
                .mapbase        = (unsigned long)(0x30000200),
                .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
                .iotype         = UPIO_MEM,
                .regshift       = 1,
                .uartclk        = 14745600,
        },
        {
                .mapbase        = (unsigned long)(0x30000100),
                .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
                .iotype         = UPIO_MEM,
                .regshift       = 1,
                .uartclk        = 14745600,
        },
        {
(Continue reading)

Kyoungil Kim | 24 May 10:39

RE: [PATCH 1/2] serial: samsung: Remove NULL checking for baud clock

Kyoungil Kim wrote:

I missed following.

Russell King suggested:

As I said, drivers have no business interpreting anything but IS_ERR(clk) as being an error.  They should
not make any other
assumptions.

Suggested-by: Russell King <rmk+kernel <at> arm.linux.org.uk>

> Signed-off-by: Kyoungil Kim <ki0351.kim <at> samsung.com>
> ---
>  drivers/tty/serial/samsung.c |   21 ++++++++++++---------
>  1 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index d8b0aee..5668538 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -529,7 +529,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level,
> 
>  	switch (level) {
>  	case 3:
> -		if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL)
> +		if (!IS_ERR(ourport->baudclk))
>  			clk_disable(ourport->baudclk);
> 
>  		clk_disable(ourport->clk);
(Continue reading)

Linus Walleij | 23 May 21:18

[PATCH] serial/amba-pl011: move custom pin control to driver

From: Linus Walleij <linus.walleij <at> linaro.org>

We had a boot regression in Ux500 in the merge window because
two orthogonal pin control schemes for the PL011 were merged
at the same time:

- One using the .init() and .exit() hooks into the platform
  for Ux500 putting the pins into default vs sleep state
  respectively as the port was started/stopped.
  commit a09806607fd20bed2f8c41fe22793386790a14aa
  "ARM: ux500: switch to using pinctrl for uart0"

- One hogging the default setting at PL011 probe()
  commit 258e055111d3cde2607e0d04eb91da2f7a59b591
  "serial: amba-pl011: adopt pinctrl support"

To get a solution that works for both let's scrap the stuff
in the platform callbacks, instead have the driver itself
select default and sleep states when the port is
started/stopped. Hopefully this works for all clients.
Platform callbacks are bad for device tree migration anyway,
so this rids us of another problem in Ux500.

Cc: linux-serial <at> vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh <at> linuxfoundation.org>
Cc: Shawn Guo <shawn.guo <at> linaro.org>
Cc: Russell King <rmk+kernel <at> arm.linux.org.uk>
Reported-by: Lee Jones <lee.jones <at> linaro.org>
Signed-off-by: Linus Walleij <linus.walleij <at> linaro.org>
---
(Continue reading)

Jiri Slaby | 22 May 22:38
Picon
Gravatar

Re: [PATCH 1/1] serial_core: Update buffer overrun statistics.

On 05/22/2012 10:31 PM, Corbin wrote:
> On Mon, May 21, 2012 at 11:05 AM, Alan Cox <alan <at> lxorguk.ukuu.org.uk> wrote:
>> I was hopng Jiri would chip in.
> 
> Jiri,
> 
> What do you think of my patch?

That it is perfectly concealed.

(I'm not subscribed to linux-serial and cannot find it anywhere. A link
would be appreciated...)

thanks,
--

-- 
js
suse labs

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

Greg KH | 22 May 17:15
Favicon
Gravatar

[GIT PATCH] TTY/serial patches for 3.5-rc1 - try 2

The following changes since commit 66f75a5d028beaf67c931435fdc3e7823125730c:

  Linux 3.4-rc4 (2012-04-21 14:47:52 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/ tags/tty-3.5-rc1

for you to fetch changes up to 59bd234b72fc29887839d792b7d6c7e8d2a577a6:

  serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller. (2012-05-17 13:25:56 -0700)

----------------------------------------------------------------
TTY pull request for 3.5-rc1

Here's the big TTY/serial driver pull request for the 3.5-rc1 merge window.

Nothing major in here, just lots of incremental changes from Alan and
Jiri reworking some tty core things to behave better and to get a more
solid grasp on some of the nasty tty locking issues.

There are a few tty and serial driver updates in here as well.

All of this has been in the linux-next releases for a while with no problems.

Signed-off-by: Greg Kroah-Hartman <gregkh <at> linuxfoundation.org>

----------------------------------------------------------------
Alan Cox (7):
      vt: push the tty_lock down into the map handling
(Continue reading)

Greg KH | 22 May 15:20
Favicon
Gravatar

[GIT PATCH] TTY/serial patches for 3.5-rc1

The following changes since commit d48b97b403d23f6df0b990cee652bdf9a52337a3:

  Linux 3.4-rc6 (2012-05-06 15:07:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/ tags/tty-3.5-rc1

for you to fetch changes up to d48b97b403d23f6df0b990cee652bdf9a52337a3:

  Linux 3.4-rc6 (2012-05-06 15:07:32 -0700)

----------------------------------------------------------------
TTY pull request for 3.5-rc1

Here's the big TTY/serial driver pull request for the 3.5-rc1 merge window.

Nothing major in here, just lots of incremental changes from Alan and
Jiri reworking some tty core things to behave better and to get a more
solid grasp on some of the nasty tty locking issues.

There are a few tty and serial driver updates in here as well.

All of this has been in the linux-next releases for a while with no problems.

Signed-off-by: Greg Kroah-Hartman <gregkh <at> linuxfoundation.org>

----------------------------------------------------------------

 Documentation/ABI/testing/sysfs-bus-hsi            |   19 -
(Continue reading)

Chao Xie | 22 May 06:43
Favicon

[PATCH V2] serial: pxa: add spin lock for console write

at UP mode, when cpu want to print message in kernel, it will invoke
peempt_disable and disable irq. So it is safe for UP mode.
For SMP mode, it is not safe to protect the HW reigsters.
one CPU will run a program which will invoke printf.
another CPU will run a program in kernel that invoke printk.
So when second CPU is trying to printk, it will do
1. save ier register
2. enable uue bit of ier register
3. push buffer to uart fifo
4 .restore ier register
when first CPU want to printf, and it happens between 1 and 4, it will
enable thre bit of ier, and waiting for transmit intterupt. while step 4
will make the ier lost thre bit.
add spin lock here to protect the ier register for console write.

Signed-off-by: Chao Xie <chao.xie <at> marvell.com>
---
 drivers/tty/serial/pxa.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 5847a4b..aca62f6 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -670,9 +670,19 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
 {
 	struct uart_pxa_port *up = serial_pxa_ports[co->index];
 	unsigned int ier;
+	unsigned long flags;
+	int locked = 1;
(Continue reading)

Donald | 21 May 08:19
Picon

Questions regarding adding a patch in linux/drivers/char/8250.c

Hi,

This is Donald from ASIX Electronics Corp. My company has three PCI to Serial controllers, including
MCS9845, MCS9835, and MCS9820.
Currently those serial devices using these three chips can directly use the Linux kernel's serial driver in
linux/drivers/char/8250.c. Recently we find these three chips have a hardware bug relating to parity
error count function. We have a
software workaround for this issue. Below for reference is a pseudo code for this workaround.

serial8250_do_set_termios() {
	If ((PID == MCS9845 || PID == MCS935 || PID == MCS9820) && ((termios->c_cflag & PARENB))) {
		port->fifosize = 1; /* Change RX FIFO size to 1 byte */
		up->ier &= ~UART_IER_RLSI; /* Disable RLSI interrupt */
	}	
}

Is it possible to add a patch into linux/drivers/char/8250.c for our chips' hardware issue? If it's not
feasible to add a patch into
linux/drivers/char/8250.c, could we submit a new driver (e.g., mcs78xx_8250.c) to Linux kernel for
devices using these three chips
(i.e., those devices can use new driver mcs78xx_8250.c instead of 8250.c)

Your reply to my questions will be very appreciated.

Regards,
Donald Lee
~~~~~~~~~~~~~~~~~~~~~~~~
R&D Division
ASIX Electronics Corporation
TEL: 886-3-5799500 ext.515
(Continue reading)

Chao Xie | 21 May 04:33
Favicon

[PATCH] serial: pxa: add spin lock for console write

at UP mode, when cpu want to print message in kernel, it will invoke
peempt_disable and disable irq. So it is safe for UP mode.
For SMP mode, it is not safe to protect the HW reigsters.
one CPU will run a program which will invoke printf.
another CPU will run a program in kernel that invoke printk.
So when second CPU is trying to printk, it will do
1. save ier register
2. enable uue bit of ier register
3. push buffer to uart fifo
4 .restore ier register
when first CPU want to printf, and it happens between 1 and 4, it will
enable thre bit of ier, and waiting for transmit intterupt. while step 4
will make the ier lost thre bit.
add spin lock here to protect the ier register for console write.

Signed-off-by: Chao Xie <chao.xie <at> marvell.com>
---
 drivers/tty/serial/pxa.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 5847a4b..d94387f 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -670,6 +670,16 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
 {
 	struct uart_pxa_port *up = serial_pxa_ports[co->index];
 	unsigned int ier;
+	unsigned long flags;
+	int locked = 1;
(Continue reading)


Gmane