From: "Govindraj.R" <govindraj.raja@ti.com>
To: linux-omap@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: "Govindraj.R" <govindraj.raja@ti.com>,
Tony Lindgren <tony@atomide.com>,
Benoit Cousson <b-cousson@ti.com>, Kevin Hilman <khilman@ti.com>,
Paul Walmsley <paul@pwsan.com>, Rajendra Nayak <rnayak@ti.com>
Subject: [PATCH 3/7] OMAP2+: UART: Remove certain uart calls from sram_idle
Date: Mon, 28 Feb 2011 20:09:14 +0530 [thread overview]
Message-ID: <1298903958-6496-4-git-send-email-govindraj.raja@ti.com> (raw)
In-Reply-To: <1298903958-6496-1-git-send-email-govindraj.raja@ti.com>
In preparation to UART runtime conversion. Remove certain uart specific calls
from sram_idle path in pm24xx/34xx files.
These func calls will no more be used with upcoming uart runtime design.
1.) Removing console lock holding :- Now can be handled with omap-serial file
itself with appropraite console_enable/disable calls for clk_enable/disable
cases.
2.) omap_uart_can_sleep :- not needed driver can decide based on inactivity.
3.) omap_uart_prepare_suspend :- omap-serial can take care with driver
suspend/resume hooks.
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/pm24xx.c | 11 -----------
arch/arm/mach-omap2/pm34xx.c | 16 ----------------
arch/arm/plat-omap/include/plat/serial.h | 4 ----
3 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 97feb3a..5af9881 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -132,11 +132,6 @@ static void omap2_enter_full_retention(void)
if (omap_irq_pending())
goto no_sleep;
- /* Block console output in case it is on one of the OMAP UARTs */
- if (!is_suspending())
- if (!console_trylock())
- goto no_sleep;
-
omap_uart_prepare_idle(0);
omap_uart_prepare_idle(1);
omap_uart_prepare_idle(2);
@@ -150,9 +145,6 @@ static void omap2_enter_full_retention(void)
omap_uart_resume_idle(1);
omap_uart_resume_idle(0);
- if (!is_suspending())
- console_unlock();
-
no_sleep:
if (omap2_pm_debug) {
unsigned long long tmp;
@@ -267,8 +259,6 @@ static int omap2_can_sleep(void)
{
if (omap2_fclks_active())
return 0;
- if (!omap_uart_can_sleep())
- return 0;
if (osc_ck->usecount > 1)
return 0;
if (omap_dma_running())
@@ -319,7 +309,6 @@ static int omap2_pm_suspend(void)
mir1 = omap_readl(0x480fe0a4);
omap_writel(1 << 5, 0x480fe0ac);
- omap_uart_prepare_suspend();
omap2_enter_full_retention();
omap_writel(mir1, 0x480fe0a4);
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2f864e4..850bb0a 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -395,13 +395,6 @@ void omap_sram_idle(void)
omap3_enable_io_chain();
}
- /* Block console output in case it is on one of the OMAP UARTs */
- if (!is_suspending())
- if (per_next_state < PWRDM_POWER_ON ||
- core_next_state < PWRDM_POWER_ON)
- if (!console_trylock())
- goto console_still_active;
-
/* PER */
if (per_next_state < PWRDM_POWER_ON) {
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
@@ -481,10 +474,6 @@ void omap_sram_idle(void)
omap_uart_resume_idle(3);
}
- if (!is_suspending())
- console_unlock();
-
-console_still_active:
/* Disable IO-PAD and IO-CHAIN wakeup */
if (omap3_has_io_wakeup() &&
(per_next_state < PWRDM_POWER_ON ||
@@ -503,8 +492,6 @@ int omap3_can_sleep(void)
{
if (!sleep_while_idle)
return 0;
- if (!omap_uart_can_sleep())
- return 0;
return 1;
}
@@ -547,7 +534,6 @@ static int omap3_pm_suspend(void)
goto restore;
}
- omap_uart_prepare_suspend();
omap3_intc_suspend();
omap_sram_idle();
@@ -594,14 +580,12 @@ static int omap3_pm_begin(suspend_state_t state)
{
disable_hlt();
suspend_state = state;
- omap_uart_enable_irqs(0);
return 0;
}
static void omap3_pm_end(void)
{
suspend_state = PM_SUSPEND_ON;
- omap_uart_enable_irqs(1);
enable_hlt();
return;
}
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index 8061695..6339848 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -106,12 +106,8 @@ struct omap_board_data;
extern void omap_serial_init(void);
extern void omap_serial_init_port(struct omap_board_data *bdata);
-extern int omap_uart_can_sleep(void);
-extern void omap_uart_check_wakeup(void);
-extern void omap_uart_prepare_suspend(void);
extern void omap_uart_prepare_idle(int num);
extern void omap_uart_resume_idle(int num);
-extern void omap_uart_enable_irqs(int enable);
#endif
#endif
--
1.7.1
next prev parent reply other threads:[~2011-02-28 14:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 14:39 [PATCH 0/7] OMAP2+: UART: runtime conversion + cleanup Govindraj.R
2011-02-28 14:39 ` [PATCH 1/7] OMAP2+ : hwmod_data: update uart hwmod data Govindraj.R
2011-02-28 14:39 ` [PATCH 2/7] OMAP2+: mux: Enable wakeup for wakeup enable requested pads Govindraj.R
2011-03-02 4:49 ` Varadarajan, Charulatha
2011-03-02 10:40 ` Govindraj
2011-02-28 14:39 ` Govindraj.R [this message]
2011-02-28 14:39 ` [PATCH 4/7] OMAP2+: UART: Remove uart clock handling code serial.c Govindraj.R
2011-02-28 14:39 ` [PATCH 5/7] Serial: OMAP: add runtime pm support for omap-serial driver Govindraj.R
2011-03-05 1:59 ` Kevin Hilman
2011-03-08 14:04 ` Govindraj
2011-03-09 1:48 ` Kevin Hilman
2011-03-09 2:02 ` Paul Walmsley
2011-03-09 13:03 ` Govindraj
2011-03-09 15:07 ` Govindraj
2011-03-09 23:06 ` Kevin Hilman
2011-02-28 14:39 ` [PATCH 6/7] OMAP: Serial: Allow UART parameters to be configured from board file Govindraj.R
2011-03-01 19:16 ` Sricharan R
2011-03-02 7:40 ` Govindraj
2011-03-02 8:19 ` Sricharan R
2011-03-02 10:07 ` Govindraj
2011-03-02 18:24 ` Tony Lindgren
2011-03-03 12:14 ` Govindraj
2011-03-03 5:08 ` Sricharan R
2011-03-04 6:25 ` Govindraj
2011-02-28 14:39 ` [PATCH 7/7] Serial: OMAP2+: Make the RX_TIMEOUT for DMA configurable for each UART Govindraj.R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298903958-6496-4-git-send-email-govindraj.raja@ti.com \
--to=govindraj.raja@ti.com \
--cc=b-cousson@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).