aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNaveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>2011-03-03 14:28:30 +0530
committerHenrik Öhman <henrik.ohman@stericsson.com>2011-03-15 13:15:41 +0100
commit6f09c2674c0f56ef021464e5c3e5c737199c5272 (patch)
tree85b059e136834098115dd0cea8ae84c6a7f418ab /arch
parent478c3c96217c2d4107a6a9c8afdb8416c61ac338 (diff)
uart:BT works after suspend and resume
During suspend uart.0 seem to handle it's irq incorrectly. BT works after suspend and resume.This has been fixed by store and restoring only the enabled uart ports and console port register values. ST-Ericsson Id: ER 326768 Change-Id: Id5a12e69e92f7992c250e00bb7c8d857f99eb6c9 Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17484 Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: Martin PERSSON <martin.persson@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/uart-db8500.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/uart-db8500.c b/arch/arm/mach-ux500/uart-db8500.c
index 5bd0b7d261a..0fb6679c953 100644
--- a/arch/arm/mach-ux500/uart-db8500.c
+++ b/arch/arm/mach-ux500/uart-db8500.c
@@ -78,6 +78,16 @@ static void save_uart(void)
int i;
for (i = 0; i < UX500_NR_UARTS; i++) {
+ /*
+ * No need to store the UART register values
+ * for the port which is already disabled the clock
+ * other than the console port.
+ */
+ context_uart[i].cr =
+ readl(context_uart[i].base + UART011_CR);
+ if ((!context_uart[i].cr) && (i != CONFIG_UX500_DEBUG_UART))
+ continue;
+
clk_enable(context_uart[i].uart_clk);
context_uart[i].dr =
@@ -137,6 +147,14 @@ static void restore_uart(void)
int i, cnt;
for (i = 0; i < UX500_NR_UARTS; i++) {
+ /*
+ * No need to restore the UART register values
+ * for the port which is already disabled the clock
+ * other than the console port.
+ */
+ if ((!context_uart[i].cr) && (i != CONFIG_UX500_DEBUG_UART))
+ continue;
+
clk_enable(context_uart[i].uart_clk);
writel(context_uart[i].dr,