Subject: [PATCH v2 4/6] SERIAL: OMAP: Remove the slave idle handling from the driver

From: [email-masked] (Kevin Hilman)
Date: Fri, 26 Apr 2013 11:05:24 -0700

Rajendra Nayak <[email-masked]> writes:

> From: Santosh Shilimkar <[email-masked]>
>
> UART IP slave idle handling now taken care by runtime pm backend(hwmod layer)
> so remove the hackery from the driver.
>
> As discussed on the list, in future if dma mode needs to be brought
> back to this driver, UART sysc handling needs to be updated in
> framework such a way that no-idle/force idle profile can be supported.
> Given the broken dma mode for OMAP uarts, its very unlikely.
>
> Acked-by: Greg Kroah-Hartman <[email-masked]>
> Tested-by: Vaibhav Bedia <[email-masked]>
> Tested-by: Sourav Poddar <[email-masked]>
> Signed-off-by: Rajendra nayak <[email-masked]>
> Signed-off-by: Santosh Shilimkar <[email-masked]>

nit: the ordering of this patch with the following one will break
bisect.  

IOW, with this patch applied, but not the following one, compilation
will be broken because the func pointers are removed from the header,
but still used in omap-serial.c.

A simple fix is to just apply the other one first.

Kevin

> ---
>  drivers/tty/serial/omap-serial.c          |   23 -----------------------
>  include/linux/platform_data/serial-omap.h |    2 --
>  2 files changed, 25 deletions(-)
>
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 4dc4140..08332f3 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -202,26 +202,6 @@ static int serial_omap_get_context_loss_count(struct uart_omap_port *up)
>  	return pdata->get_context_loss_count(up->dev);
>  }
>  
> -static void serial_omap_set_forceidle(struct uart_omap_port *up)
> -{
> -	struct omap_uart_port_info *pdata = up->dev->platform_data;
> -
> -	if (!pdata || !pdata->set_forceidle)
> -		return;
> -
> -	pdata->set_forceidle(up->dev);
> -}
> -
> -static void serial_omap_set_noidle(struct uart_omap_port *up)
> -{
> -	struct omap_uart_port_info *pdata = up->dev->platform_data;
> -
> -	if (!pdata || !pdata->set_noidle)
> -		return;
> -
> -	pdata->set_noidle(up->dev);
> -}
> -
>  static void serial_omap_enable_wakeup(struct uart_omap_port *up, bool enable)
>  {
>  	struct omap_uart_port_info *pdata = up->dev->platform_data;
> @@ -298,8 +278,6 @@ static void serial_omap_stop_tx(struct uart_port *port)
>  		serial_out(up, UART_IER, up->ier);
>  	}
>  
> -	serial_omap_set_forceidle(up);
> -
>  	pm_runtime_mark_last_busy(up->dev);
>  	pm_runtime_put_autosuspend(up->dev);
>  }
> @@ -364,7 +342,6 @@ static void serial_omap_start_tx(struct uart_port *port)
>  
>  	pm_runtime_get_sync(up->dev);
>  	serial_omap_enable_ier_thri(up);
> -	serial_omap_set_noidle(up);
>  	pm_runtime_mark_last_busy(up->dev);
>  	pm_runtime_put_autosuspend(up->dev);
>  }
> diff --git a/include/linux/platform_data/serial-omap.h b/include/linux/platform_data/serial-omap.h
> index ff9b0aa..c860c1b 100644
> --- a/include/linux/platform_data/serial-omap.h
> +++ b/include/linux/platform_data/serial-omap.h
> @@ -43,8 +43,6 @@ struct omap_uart_port_info {
>  	int			DTR_present;
>  
>  	int (*get_context_loss_count)(struct device *);
> -	void (*set_forceidle)(struct device *);
> -	void (*set_noidle)(struct device *);
>  	void (*enable_wakeup)(struct device *, bool);
>  };