aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-11 19:24:23 -0500
committerBen Dooks <ben-linux@fluff.org>2009-05-07 06:04:55 -0400
commit57699e9adf1b44f281d808609b47816804763bfa (patch)
tree61e2932babbbee5ae2c4ccb70554ee366da03fc5 /arch/arm/plat-s3c
parent67b3e542ab1cf9f2fe3c1d4ae2aa16dd3b4a7e24 (diff)
[ARM] S3C: Add debug to UART save and a per-arch callback pre-restore
Add a simple debug message on saving the UART state and add a per-arch pre-restore function to be used by the s3c64xx restore code to ensure the UARTs control registers do not go through any illegal state changes. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r--arch/arm/plat-s3c/pm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c
index 061182ca66e3..de4c4aa22468 100644
--- a/arch/arm/plat-s3c/pm.c
+++ b/arch/arm/plat-s3c/pm.c
@@ -83,6 +83,9 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
83 save->ufcon = __raw_readl(regs + S3C2410_UFCON); 83 save->ufcon = __raw_readl(regs + S3C2410_UFCON);
84 save->umcon = __raw_readl(regs + S3C2410_UMCON); 84 save->umcon = __raw_readl(regs + S3C2410_UMCON);
85 save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); 85 save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV);
86
87 S3C_PMDBG("UART[%d]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n",
88 uart, save->ulcon, save->ucon, save->ufcon, save->ubrdiv);
86} 89}
87 90
88static void s3c_pm_save_uarts(void) 91static void s3c_pm_save_uarts(void)
@@ -98,6 +101,8 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
98{ 101{
99 void __iomem *regs = S3C_VA_UARTx(uart); 102 void __iomem *regs = S3C_VA_UARTx(uart);
100 103
104 s3c_pm_arch_update_uart(regs, save);
105
101 __raw_writel(save->ulcon, regs + S3C2410_ULCON); 106 __raw_writel(save->ulcon, regs + S3C2410_ULCON);
102 __raw_writel(save->ucon, regs + S3C2410_UCON); 107 __raw_writel(save->ucon, regs + S3C2410_UCON);
103 __raw_writel(save->ufcon, regs + S3C2410_UFCON); 108 __raw_writel(save->ufcon, regs + S3C2410_UFCON);