diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-s3c/include/plat/pm.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-s3c/pm.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/pm.h b/arch/arm/plat-s3c/include/plat/pm.h index 3779775133a9..5f8707e2a09c 100644 --- a/arch/arm/plat-s3c/include/plat/pm.h +++ b/arch/arm/plat-s3c/include/plat/pm.h | |||
@@ -44,6 +44,8 @@ extern void (*pm_cpu_sleep)(void); | |||
44 | 44 | ||
45 | extern unsigned long s3c_pm_flags; | 45 | extern unsigned long s3c_pm_flags; |
46 | 46 | ||
47 | extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */ | ||
48 | |||
47 | /* from sleep.S */ | 49 | /* from sleep.S */ |
48 | 50 | ||
49 | extern int s3c_cpu_save(unsigned long *saveblk); | 51 | extern int s3c_cpu_save(unsigned long *saveblk); |
@@ -88,6 +90,7 @@ struct pm_uart_save { | |||
88 | u32 ufcon; | 90 | u32 ufcon; |
89 | u32 umcon; | 91 | u32 umcon; |
90 | u32 ubrdiv; | 92 | u32 ubrdiv; |
93 | u32 udivslot; | ||
91 | }; | 94 | }; |
92 | 95 | ||
93 | /* helper functions to save/restore lists of registers. */ | 96 | /* helper functions to save/restore lists of registers. */ |
diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c index de4c4aa22468..9957b539600f 100644 --- a/arch/arm/plat-s3c/pm.c +++ b/arch/arm/plat-s3c/pm.c | |||
@@ -70,6 +70,8 @@ static inline void s3c_pm_debug_init(void) | |||
70 | 70 | ||
71 | /* Save the UART configurations if we are configured for debug. */ | 71 | /* Save the UART configurations if we are configured for debug. */ |
72 | 72 | ||
73 | unsigned char pm_uart_udivslot; | ||
74 | |||
73 | #ifdef CONFIG_S3C2410_PM_DEBUG | 75 | #ifdef CONFIG_S3C2410_PM_DEBUG |
74 | 76 | ||
75 | struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS]; | 77 | struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS]; |
@@ -84,6 +86,9 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) | |||
84 | save->umcon = __raw_readl(regs + S3C2410_UMCON); | 86 | save->umcon = __raw_readl(regs + S3C2410_UMCON); |
85 | save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); | 87 | save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); |
86 | 88 | ||
89 | if (pm_uart_udivslot) | ||
90 | save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT); | ||
91 | |||
87 | S3C_PMDBG("UART[%d]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n", | 92 | S3C_PMDBG("UART[%d]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n", |
88 | uart, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); | 93 | uart, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); |
89 | } | 94 | } |
@@ -108,6 +113,9 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) | |||
108 | __raw_writel(save->ufcon, regs + S3C2410_UFCON); | 113 | __raw_writel(save->ufcon, regs + S3C2410_UFCON); |
109 | __raw_writel(save->umcon, regs + S3C2410_UMCON); | 114 | __raw_writel(save->umcon, regs + S3C2410_UMCON); |
110 | __raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV); | 115 | __raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV); |
116 | |||
117 | if (pm_uart_udivslot) | ||
118 | __raw_writel(save->udivslot, regs + S3C2443_DIVSLOT); | ||
111 | } | 119 | } |
112 | 120 | ||
113 | static void s3c_pm_restore_uarts(void) | 121 | static void s3c_pm_restore_uarts(void) |