Patchwork [0/7] UART: OMAP: Updates

login
register
mail settings
Submitter Datta, Shubhrajyoti
Date April 16, 2012, 3:06 p.m.
Message ID <1334588821-5224-1-git-send-email-shubhrajyoti@ti.com>
Download mbox
Permalink /patch/152890/
State New
Headers show

Pull-request

git://gitorious.org/linus-tree/linus-tree.git uart-omap-next

Comments

Datta, Shubhrajyoti - April 16, 2012, 3:06 p.m.
The patch series collects few previously posted patches 
and adds some clock fixes to the series.

The patch series does following.
- Makes the context_loss_cnt signed to make error handling possible.
- The clock cutting is missed in the error cases, fix it.
- Make the serial_omap_console_ports depend on the macro
 OMAP_MAX_HSUART_PORTS.
- use devinit and devexit for the probe and remove functions.
- Fixes to the software flow control.

The following changes since commit e816b57a337ea3b755de72bec38c10c864f23015:

  Linux 3.4-rc3 (2012-04-15 18:28:29 -0700)

are available in the git repository at:
  git://gitorious.org/linus-tree/linus-tree.git uart-omap-next

Shubhrajyoti D (6):
      ARM: OMAP: UART: Make context_loss_cnt signed
      UART: OMAP: Cut the clock in the error cases
      UART: OMAP: Remove the default setting of special character
      UART: OMAP: Prevent cutting of clocks if put_sync immediately follows
      UART: OMAP: Remove the hardcode serial_omap_console_ports array.
      UART: OMAP: Trivial optimisation of the probe and remove

Vikram Pandita (1):
      UART: OMAP: fix software flow control

 arch/arm/plat-omap/include/plat/omap-serial.h |    6 ++--
 drivers/tty/serial/omap-serial.c              |   47 ++++++++++++++-----------
 2 files changed, 29 insertions(+), 24 deletions(-)
Kevin Hilman - April 18, 2012, 12:06 a.m.
Shubhrajyoti D <shubhrajyoti@ti.com> writes:

> In the error cases the clock cut is missed. This patch intends to fix the
> same.

Please change the references to 'cut clocks' in subject/changelog here
(and in other patches) to use runtime suspend instead.   First, runtime PM
calls do more than cut clocks, but they only do so when
usecounting/autosuspend timeouts permit.


> Cc: stable@vger.kernel.org

Please hold off on Cc'ing stable until your patches are reviewed and accepted.

> Cc: Govindraj.R <govindraj.raja@ti.com>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
>  drivers/tty/serial/omap-serial.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index fe099bb..10e80bb 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port)
>  
>  		if (ret < 0) {
>  			serial_omap_enable_ier_thri(up);
> +			pm_runtime_mark_last_busy(&up->pdev->dev);
> +			pm_runtime_put_autosuspend(&up->pdev->dev);

Why the autosuspend version here?

Kevin

>  			return;
>  		}
>  	}
> @@ -1029,8 +1031,10 @@ static int serial_omap_poll_get_char(struct uart_port *port)
>  
>  	pm_runtime_get_sync(&up->pdev->dev);
>  	status = serial_in(up, UART_LSR);
> -	if (!(status & UART_LSR_DR))
> +	if (!(status & UART_LSR_DR)) {
> +		pm_runtime_put(&up->pdev->dev);
>  		return NO_POLL_CHAR;
> +	}
>  
>  	status = serial_in(up, UART_RX);
>  	pm_runtime_put(&up->pdev->dev);
Datta, Shubhrajyoti - April 18, 2012, 6:44 a.m.
Hi Kevin,
Thanks for the review.

On Wednesday 18 April 2012 05:36 AM, Kevin Hilman wrote:
> Shubhrajyoti D <shubhrajyoti@ti.com> writes:
>
>> In the error cases the clock cut is missed. This patch intends to fix the
>> same.
> Please change the references to 'cut clocks' in subject/changelog here
> (and in other patches) to use runtime suspend instead.   First, runtime PM
> calls do more than cut clocks, but they only do so when
> usecounting/autosuspend timeouts permit.
Yes thanks will fix it.
>
>
>> Cc: stable@vger.kernel.org
> Please hold off on Cc'ing stable until your patches are reviewed and accepted.
OK
>> Cc: Govindraj.R <govindraj.raja@ti.com>
>> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
>> ---
>>  drivers/tty/serial/omap-serial.c |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
>> index fe099bb..10e80bb 100644
>> --- a/drivers/tty/serial/omap-serial.c
>> +++ b/drivers/tty/serial/omap-serial.c
>> @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port)
>>  
>>  		if (ret < 0) {
>>  			serial_omap_enable_ier_thri(up);
>> +			pm_runtime_mark_last_busy(&up->pdev->dev);
>> +			pm_runtime_put_autosuspend(&up->pdev->dev);
> Why the autosuspend version here?
>
> Kevin
>
>
In case the request_dma fails we enable the thri( effectively like intr
mode) so
I thought of using the autosuspend version here .

Do you prefer put version instead ?

With Regards,
Shubhro
Kevin Hilman - April 18, 2012, 2 p.m.
Shubhrajyoti <shubhrajyoti@ti.com> writes:

> Hi Kevin,
> Thanks for the review.
>
> On Wednesday 18 April 2012 05:36 AM, Kevin Hilman wrote:
>> Shubhrajyoti D <shubhrajyoti@ti.com> writes:
>>
>>> In the error cases the clock cut is missed. This patch intends to fix the
>>> same.
>> Please change the references to 'cut clocks' in subject/changelog here
>> (and in other patches) to use runtime suspend instead.   First, runtime PM
>> calls do more than cut clocks, but they only do so when
>> usecounting/autosuspend timeouts permit.
> Yes thanks will fix it.
>>
>>
>>> Cc: stable@vger.kernel.org
>> Please hold off on Cc'ing stable until your patches are reviewed and accepted.
> OK
>>> Cc: Govindraj.R <govindraj.raja@ti.com>
>>> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
>>> ---
>>>  drivers/tty/serial/omap-serial.c |    6 +++++-
>>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
>>> index fe099bb..10e80bb 100644
>>> --- a/drivers/tty/serial/omap-serial.c
>>> +++ b/drivers/tty/serial/omap-serial.c
>>> @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port)
>>>  
>>>  		if (ret < 0) {
>>>  			serial_omap_enable_ier_thri(up);
>>> +			pm_runtime_mark_last_busy(&up->pdev->dev);
>>> +			pm_runtime_put_autosuspend(&up->pdev->dev);
>> Why the autosuspend version here?
>>
>> Kevin
>>
>>
> In case the request_dma fails we enable the thri( effectively like intr
> mode) so
> I thought of using the autosuspend version here .
>
> Do you prefer put version instead ?

Not necessarily, it should just be well described in the changelog.

Kevin
Datta, Shubhrajyoti - April 18, 2012, 3:13 p.m.
On Wednesday 18 April 2012 07:30 PM, Kevin Hilman wrote:
>>>> >>>  		if (ret < 0) {
>>>> >>>  			serial_omap_enable_ier_thri(up);
>>>> >>> +			pm_runtime_mark_last_busy(&up->pdev->dev);
>>>> >>> +			pm_runtime_put_autosuspend(&up->pdev->dev);
>>> >> Why the autosuspend version here?
>>> >>
>>> >> Kevin
>>> >>
>>> >>
>> > In case the request_dma fails we enable the thri( effectively like intr
>> > mode) so
>> > I thought of using the autosuspend version here .
>> >
>> > Do you prefer put version instead ?
> Not necessarily, it should just be well described in the changelog.
>
> Kevin
Yes agree completely. Will describe that in the changelog.
Kevin Hilman - April 20, 2012, 1:46 p.m.
Shubhrajyoti Datta <omaplinuxkernel@gmail.com> writes:

> On Wed, Apr 18, 2012 at 8:43 PM, Shubhrajyoti <shubhrajyoti@ti.com> wrote:
>>>
>>> Kevin
>> Yes agree completely. Will describe that in the changelog.
>> --
> Does the following changelog look ok?

A little better, but still doesn't explain things so that someone who is
not intimately familar with the driver can understand the auto-suspend
version is needed in the one case.

Possibly explaining in more detail what would happen if the normal put
is used here instead of the autosuspend version might help.

Kevin

> From 37fdc2d40c9b2b19b8c5a9a4b8f7dd547d420f55 Mon Sep 17 00:00:00 2001
> From: Shubhrajyoti D <shubhrajyoti@ti.com>
> Date: Wed, 4 Apr 2012 16:32:37 +0530
> Subject: [PATCH] UART: OMAP: call pm_runtime_put/autosuspend in the error cases
>
> In the error cases the runtime_put call is missed. This patch intends to fix the
> same. In case dma request fails, we fall back to the nondma mode so after
> enabling the threshold call put_autosuspend.
>
> Cc: Govindraj.R <govindraj.raja@ti.com>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
>  drivers/tty/serial/omap-serial.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index fe099bb..10e80bb 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port)
>
>  		if (ret < 0) {
>  			serial_omap_enable_ier_thri(up);
> +			pm_runtime_mark_last_busy(&up->pdev->dev);
> +			pm_runtime_put_autosuspend(&up->pdev->dev);
>  			return;
>  		}
>  	}
> @@ -1029,8 +1031,10 @@ static int serial_omap_poll_get_char(struct
> uart_port *port)
>
>  	pm_runtime_get_sync(&up->pdev->dev);
>  	status = serial_in(up, UART_LSR);
> -	if (!(status & UART_LSR_DR))
> +	if (!(status & UART_LSR_DR)) {
> +		pm_runtime_put(&up->pdev->dev);
>  		return NO_POLL_CHAR;
> +	}
>
>  	status = serial_in(up, UART_RX);
>  	pm_runtime_put(&up->pdev->dev);