Skip to contentSkip to conversation

SERIAL: OMAP: Remove the slave idle handling from the driver

PATCH New Santosh Shilimkar 4 participants 9 messages Feb 20, 2013 – Apr 1, 2013 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

---
 drivers/tty/serial/omap-serial.c |   23 -----------------------
 1 file changed, 23 deletions(-)
drivers/tty/serial/omap-serial.c +0 -23
index 57d6b29..5722eaf 100644
@@ -201,26 +201,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;
@@ -279,8 +259,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);
 }
@@ -348,7 +326,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);
 }
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

Quoted 11 lines · Santosh Shilimkar

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

---
 drivers/tty/serial/omap-serial.c |   23 -----------------------
 1 file changed, 23 deletions(-)

This patch should also remove the hooks from
<linux/platform_data/serial-omap.h>

Kevin

#2 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

Quoted 10 lines · Kevin Hilman
Quoted 8 lines · Santosh Shilimkar

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

Quoted 7 lines
Quoted 3 lines
---
  drivers/tty/serial/omap-serial.c |   23 -----------------------
  1 file changed, 23 deletions(-)

This patch should also remove the hooks from
<linux/platform_data/serial-omap.h>

Right. Will fix that in next version. Thanks.

Regards,
Santosh

#3 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

(Looping Greg KH.)

Greg,

Quoted 11 lines · Santosh Shilimkar
Quoted 10 lines · Kevin Hilman
Quoted 8 lines · Santosh Shilimkar

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
---
  drivers/tty/serial/omap-serial.c |   23 -----------------------
  1 file changed, 23 deletions(-)

This patch should also remove the hooks from
<linux/platform_data/serial-omap.h>

Right. Will fix that in next version. Thanks.

Sorry for not CC'ing first place
The subject patch is part of the series which cleans up the slave idle handling from OMAP serial driver. It will be best to queue it along with rest of the patches with your ack on $subject patch.

Here is the updated version which also removed the hooks from 'linux/platform_data/serial-omap.h' as per Kevin suggestion.

Quoted 1 line

From 92916b8e0d895962c88fefbf99284967a4b94426 Mon Sep 17 00:00:00 2001

From: Santosh Shilimkar <[email protected]>
Date: Fri, 15 Feb 2013 15:50:37 +0530
Subject: [PATCH 6/8] SERIAL: OMAP: Remove the slave idle handling from the
driver

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/tty/serial/omap-serial.c          |   23 -----------------------
 include/linux/platform_data/serial-omap.h |    2 --
 2 files changed, 25 deletions(-)
drivers/tty/serial/omap-serial.c +0 -23
index 4dc4140..08332f3 100644
@@ -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);
 }
include/linux/platform_data/serial-omap.h +0 -2
index ff9b0aa..c860c1b 100644
@@ -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);
 };
 
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

Quoted 42 lines · Santosh Shilimkar

(Looping Greg KH.)

Greg,

Quoted 11 lines · Santosh Shilimkar
Quoted 10 lines · Kevin Hilman
Quoted 8 lines · Santosh Shilimkar

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
---
  drivers/tty/serial/omap-serial.c |   23 -----------------------
  1 file changed, 23 deletions(-)

This patch should also remove the hooks from
<linux/platform_data/serial-omap.h>

Right. Will fix that in next version. Thanks.

Sorry for not CC'ing first place
The subject patch is part of the series which cleans up the slave idle handling from OMAP serial driver. It will be best to queue it along with rest of the patches with your ack on $subject patch.

Here is the updated version which also removed the hooks from 'linux/platform_data/serial-omap.h' as per Kevin suggestion.

Quoted 1 line

From 92916b8e0d895962c88fefbf99284967a4b94426 Mon Sep 17 00:00:00 2001

From: Santosh Shilimkar <[email protected]>
Date: Fri, 15 Feb 2013 15:50:37 +0530
Subject: [PATCH 6/8] SERIAL: OMAP: Remove the slave idle handling from the
driver

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

Quoted 6 lines
Cc Greg Kroah-Hartman <[email protected]>
#5 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Santosh Shilimkar

(Looping Greg KH.)

Greg,

[..]

Quoted 18 lines
Quoted 18 lines
Quoted 1 line

Sorry for not CC'ing first place
The subject patch is part of the series which cleans up the slave idle handling from OMAP serial driver. It will be best to queue it along with rest of the patches with your ack on $subject patch.

Here is the updated version which also removed the hooks from 'linux/platform_data/serial-omap.h' as per Kevin suggestion.

Quoted 1 line

From 92916b8e0d895962c88fefbf99284967a4b94426 Mon Sep 17 00:00:00 2001

From: Santosh Shilimkar <[email protected]>
Date: Fri, 15 Feb 2013 15:50:37 +0530
Subject: [PATCH 6/8] SERIAL: OMAP: Remove the slave idle handling from the
driver

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

Quoted 9 lines
Quoted 6 lines
Cc Greg Kroah-Hartman <[email protected]>

Thanks Greg !!

Regards,
Santosh

#6 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

In reply to Santosh Shilimkar

Hi

Quoted 7 lines · Santosh Shilimkar

UART IP slave idle handling now taken care by runtime pm backend(hwmod layer) so remove the hackery from the driver.

I'm fine with the basic idea. But based on rmk's and your subsequent comments, please add some comments to the driver in this patch that encapsulates what needs to be done to get DMA working again properly, including the idle mode switching, in the unlikely event that someone will try to get that working again.

- Paul

#7 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

(and also please add Greg's ack when this is reposted)

- Paul

#8 lore raw

PATCH 6/8 SERIAL: OMAP: Remove the slave idle handling from the driver

Quoted 4 lines · Paul Walmsley

(and also please add Greg's ack when this is reposted)

Yes. His ack is already picked up in the pull request I sent. Will add a note about DMA support in the commit.

Regards,
Santosh