Commit 57699e9a authored by Ben Dooks's avatar Ben Dooks

[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: default avatarBen Dooks <ben-linux@fluff.org>
parent 67b3e542
...@@ -83,6 +83,9 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) ...@@ -83,6 +83,9 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
save->ufcon = __raw_readl(regs + S3C2410_UFCON); save->ufcon = __raw_readl(regs + S3C2410_UFCON);
save->umcon = __raw_readl(regs + S3C2410_UMCON); save->umcon = __raw_readl(regs + S3C2410_UMCON);
save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV);
S3C_PMDBG("UART[%d]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n",
uart, save->ulcon, save->ucon, save->ufcon, save->ubrdiv);
} }
static void s3c_pm_save_uarts(void) static 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,6 +101,8 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
{ {
void __iomem *regs = S3C_VA_UARTx(uart); void __iomem *regs = S3C_VA_UARTx(uart);
s3c_pm_arch_update_uart(regs, save);
__raw_writel(save->ulcon, regs + S3C2410_ULCON); __raw_writel(save->ulcon, regs + S3C2410_ULCON);
__raw_writel(save->ucon, regs + S3C2410_UCON); __raw_writel(save->ucon, regs + S3C2410_UCON);
__raw_writel(save->ufcon, regs + S3C2410_UFCON); __raw_writel(save->ufcon, regs + S3C2410_UFCON);
......
...@@ -57,3 +57,8 @@ static inline void s3c_pm_arch_show_resume_irqs(void) ...@@ -57,3 +57,8 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
s3c_pm_show_resume_irqs(IRQ_EINT4-4, __raw_readl(S3C2410_EINTPEND), s3c_pm_show_resume_irqs(IRQ_EINT4-4, __raw_readl(S3C2410_EINTPEND),
s3c_irqwake_eintmask); s3c_irqwake_eintmask);
} }
static inline void s3c_pm_arch_update_uart(void __iomem *regs,
struct pm_uart_save *save)
{
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment