Tomoya MORINAGA | 2 Apr 2012 07:36
Picon

[PATCH] pch_uart: Fix MSI setting issue

The following patch (MSI setting) is not enough.

commit e463595fd9c752fa4bf06b47df93ef9ade3c7cf0
Author: Alexander Stein <alexander.stein <at> systec-electronic.com>
Date:   Mon Jul 4 08:58:31 2011 +0200

    pch_uart: Add MSI support

    Signed-off-by: Alexander Stein <alexander.stein <at> systec-electronic.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>

To enable MSI mode, PCI bus-mastering must be enabled.
This patch enables the setting.

cc: Alexander Stein <alexander.stein <at> systec-electronic.com>
Signed-off-by: Tomoya MORINAGA <tomoya.rohm <at> gmail.com>
---
 drivers/tty/serial/pch_uart.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 5928877..ae8f848 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
 <at>  <at>  -1586,6 +1586,7  <at>  <at>  static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
 	}

 	pci_enable_msi(pdev);
+	pci_set_master(pdev);

(Continue reading)

mathieu.poirier | 3 Apr 2012 00:32
Favicon

[PATCH 5/9] tty/serial/omap: console can only be built-in

From: Arnd Bergmann <arnd <at> arndb.de>

When the omap serial driver is built as a module, we must
not allow the console driver to be selected, because consoles
can not be loadable modules.

Signed-off-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier <at> linaro.org>
Acked-by: Govindraj.R <govindraj.raja <at> ti.com>
---
 drivers/tty/serial/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 2de9924..bcf7e24 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
 <at>  <at>  -1041,7 +1041,7  <at>  <at>  config SERIAL_OMAP

 config SERIAL_OMAP_CONSOLE
 	bool "Console on OMAP serial port"
-	depends on SERIAL_OMAP
+	depends on SERIAL_OMAP=y
 	select SERIAL_CORE_CONSOLE
 	help
 	  Select this option if you would like to use omap serial port as
--

-- 
1.7.5.4

--
(Continue reading)

Shankarmurthy, Akshay | 3 Apr 2012 08:03
Picon
Favicon

[PATCH] serial: 8250: Add cpufreq support

From: Chaithrika U S <chaithrika <at> ti.com>

On DA850/OMAP-L138 SoC, the PLL which supplies the clock to CPU also
feeds the UART and the UART input frequency can change when the CPU
frequency is scaled.

This patch adds cpufreq support for 8250 serial driver. A clk structure
member has been added to the platform and port data structures.This
member is used by the cpufreq notifier callback to get the updated
clock rate. The implementation is based on the cpufreq implementation
for Samsung serial driver.

Tested on TI DA850/OMAP-L138 EVM.

Signed-off-by: Chaithrika U S <chaithrika <at> ti.com>
Signed-off-by: Shankarmurthy, Akshay <akshay.s <at> ti.com>
---
This patch was submitted 2 years ago but didn't make it to the mainline. Now i am reposting it.

 drivers/tty/serial/8250/8250.c |   74 ++++++++++++++++++++++++++++++++++++++++
 drivers/tty/serial/8250/8250.h |    5 +++
 include/linux/serial_8250.h    |    1 +
 3 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 9b7336f..b7cfe6c 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
 <at>  <at>  -38,6 +38,8  <at>  <at> 
 #include <linux/nmi.h>
(Continue reading)

Alan Cox | 3 Apr 2012 11:55
Face
Picon

Re: [PATCH] serial: 8250: Add cpufreq support

> This patch was submitted 2 years ago but didn't make it to the mainline. Now i am reposting it.

Can you fix it instead of just reposting it ?

> +#ifdef CONFIG_CPU_FREQ
> +static int serial8250_cpufreq_transition(struct notifier_block *nb,
> +					     unsigned long val, void *data)
> +{
> +	struct uart_8250_port *p;
> +	struct uart_port *uport;

What is your locking model ?

> +static inline void serial8250_cpufreq_deregister(struct uart_8250_port *p)

unregister

> +		ret = serial8250_cpufreq_register(uart);
> +		if (ret < 0)
> +			printk(KERN_ERR "Failed to add cpufreq notifier\n");

Why do this for devices that don't care.

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

Govindraj.R | 3 Apr 2012 15:42
Picon
Favicon

[PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags

From: "Govindraj.R" <govindraj.raja <at> ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Jon Hunter <jon-hunter <at> ti.com>
Cc: Paul Walmsley <paul <at> pwsan.com>
Cc: Kevin Hilman <khilman <at> ti.com>
Signed-off-by: Felipe Balbi <balbi <at> ti.com>
Signed-off-by: Govindraj.R <govindraj.raja <at> ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
 3 files changed, 73 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0cdd359..6affdd4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
 <at>  <at>  -355,14 +355,6  <at>  <at>  void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;

-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
(Continue reading)

Paul Gortmaker | 3 Apr 2012 17:36
Favicon

Re: [PATCH] serial: PL011: move interrupt clearing

On Thu, Mar 29, 2012 at 5:33 PM, Greg Kroah-Hartman
<gregkh <at> linuxfoundation.org> wrote:
> On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
>> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij <at> linaro.org> wrote:
>> > Commit 360f748b204275229f8398cb2f9f53955db1503b
>> > "serial: PL011: clear pending interrupts"
>> > attempts to clear interrupts by writing to a
>> > yet-unassigned memory address. This fixes the issue.
>> >
>> > The breaking patch is marked for stable so should be
>> > carried along with the other patch.
>> >
>> > Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu <at> stericsson.com>
>> > Cc: Russell King <linux <at> arm.linux.org.uk>
>> > Cc: stable <stable <at> vger.kernel.org>
>> > Reported-by: Viresh Kumar <viresh.kumar <at> st.com>
>> > Signed-off-by: Linus Walleij <linus.walleij <at> linaro.org>
>>
>> Ugh; the original patch is obviously broken.  How did it get applied
>> without testing?
>>
>> Greg, can you get this out to Linus ASAP please?  I have one comment
>> below, but I don't think it should block merging this patch.
>>
>> Tested-by: Grant Likely <grant.likely <at> secretlab.ca>
>
> Thanks, I'll get it to him after 3.4-rc1 is out, in a few days, along
> with other tty fixes being queued up.

Hi Greg,
(Continue reading)

Greg Kroah-Hartman | 3 Apr 2012 18:19
Favicon
Gravatar

Re: [PATCH] serial: PL011: move interrupt clearing

On Tue, Apr 03, 2012 at 11:36:23AM -0400, Paul Gortmaker wrote:
> On Thu, Mar 29, 2012 at 5:33 PM, Greg Kroah-Hartman
> <gregkh <at> linuxfoundation.org> wrote:
> > On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
> >> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij <at> linaro.org> wrote:
> >> > Commit 360f748b204275229f8398cb2f9f53955db1503b
> >> > "serial: PL011: clear pending interrupts"
> >> > attempts to clear interrupts by writing to a
> >> > yet-unassigned memory address. This fixes the issue.
> >> >
> >> > The breaking patch is marked for stable so should be
> >> > carried along with the other patch.
> >> >
> >> > Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu <at> stericsson.com>
> >> > Cc: Russell King <linux <at> arm.linux.org.uk>
> >> > Cc: stable <stable <at> vger.kernel.org>
> >> > Reported-by: Viresh Kumar <viresh.kumar <at> st.com>
> >> > Signed-off-by: Linus Walleij <linus.walleij <at> linaro.org>
> >>
> >> Ugh; the original patch is obviously broken.  How did it get applied
> >> without testing?
> >>
> >> Greg, can you get this out to Linus ASAP please?  I have one comment
> >> below, but I don't think it should block merging this patch.
> >>
> >> Tested-by: Grant Likely <grant.likely <at> secretlab.ca>
> >
> > Thanks, I'll get it to him after 3.4-rc1 is out, in a few days, along
> > with other tty fixes being queued up.
> 
(Continue reading)

sudhakar | 3 Apr 2012 21:43

[PATCH 1/2] 8250_pci: Replace commits 448ac154 and e86ff4a


From: Sudhakar Mamillapalli <sudhakar <at> fb.com>

The following commits don't completely fix the KT serial missing
interrupt problems.  So they have been replaced instead by
enabling serial backup timer.  The iir-once + msi tried approach tried
to enforce one read of the iir per THRE event, but its defeated by any
other event occurring at the wrong time, particularly MSR events.

448ac15 serial/8250_pci: setup-quirk workaround for the kt serial controller
e86ff4a serial/8250_pci: init-quirk msi support for kt serial controller

Signed-off-by: Sudhakar Mamillapalli <sudhakar <at> fb.com>
Acked-by: Dan Williams <dan.j.williams <at> intel.com>
Acked-by: Nhan H Mai <nhan.h.mai <at> intel.com>
---
 drivers/tty/serial/8250/8250.c     |   12 ++++++------
 drivers/tty/serial/8250/8250_pci.c |   16 +---------------
 include/linux/serial_core.h        |    2 +-
 3 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 5b149b4..5fb0157 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
 <at>  <at>  -1572,13 +1572,11  <at>  <at>  static irqreturn_t serial8250_interrupt(int irq, void *dev_id)
 	do {
 		struct uart_8250_port *up;
 		struct uart_port *port;
-		bool skip;
(Continue reading)

sudhakar | 3 Apr 2012 21:47

[PATCH 2/2] serial/8250_pci: Need to clear FIFOs for KT serial on BI


From: Sudhakar Mamillapalli <sudhakar <at> fb.com>

When using SOL thru a KT serial device and Intel ME gets reset
the serial FIFOs need to be cleared for sane SOL output.  On
a reset the device assertes BI, so using that as a cue FIFOs
are cleared.  One other problem is that the serial registers
might temporarily go to 0 on reset for this device. So
instead of restoring IER register from read value in
poll_char and other functions we get the value from
uart_8250_port which should have the same value.

Signed-off-by: Sudhakar Mamillapalli <sudhakar <at> fb.com>
Acked-by: Dan Williams <dan.j.williams <at> intel.com>
Acked-by: Nhan H Mai <nhan.h.mai <at> intel.com>
---
 drivers/tty/serial/8250/8250.c     |   37 +++++++++++++++++++++++++++++++++--
 drivers/tty/serial/8250/8250_pci.c |    3 +-
 include/linux/serial_core.h        |    3 +-
 3 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 5fb0157..c61799e 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
 <at>  <at>  -282,6 +282,13  <at>  <at>  static const struct serial8250_config uart_config[] = {
 		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
 		.flags		= UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR,
 	},
+	[PORT_KT_SERIAL] = {
(Continue reading)

Alan Cox | 3 Apr 2012 22:03
Face
Picon

Re: [PATCH 2/2] serial/8250_pci: Need to clear FIFOs for KT serial on BI

On Tue, 3 Apr 2012 12:47:21 -0700
sudhakar <sudhakar <at> fb.com> wrote:

> 
> From: Sudhakar Mamillapalli <sudhakar <at> fb.com>
> 
> When using SOL thru a KT serial device and Intel ME gets reset
> the serial FIFOs need to be cleared for sane SOL output.  On

Acronym failure.

Please remember that people looking at a patch and even more so people in
future maintaining the code will not have any idea wtf you are talking
about !

Expand the acronyms in a patch and include a bit of context.

>  <at>  <at>  -1385,6 +1393,16  <at>  <at>  serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr)
>  		lsr |= up->lsr_saved_flags;
>  		up->lsr_saved_flags = 0;
>  
> +		if ((up->port.type == PORT_KT_SERIAL) && (lsr & UART_LSR_BI)) {
> +			/*
> +			 * For KT serial device if break interrupt then got
> +			 * to clear the fifos for sane SOL output.
> +			 */
> +			serial8250_clear_fifos(up);
> +			fcr = uart_config[up->port.type].fcr;
> +			serial_port_out(port, UART_FCR, fcr);
> +		}
(Continue reading)


Gmane