From 99b2fc2b8b40256538332769f11f2fe6ee942f6c Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Tue, 18 Mar 2014 07:28:09 +0900 Subject: [PATCH] ARM: SAMSUNG: Use debug_ll_addr() to get UART base address This patch modifies Samsung PM debug helpers to use a multiplatform friendly way of getting base address of debug UART port, so instead of using a per-mach static macro, a generic debug_ll_addr() helper is used. Signed-off-by: Tomasz Figa Acked-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/pm.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 3563421d63ab..c7fac34de621 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -74,9 +75,19 @@ static inline void s3c_pm_debug_init(void) static struct pm_uart_save uart_save; +static inline void __iomem *s3c_pm_uart_base(void) +{ + unsigned long paddr; + unsigned long vaddr; + + debug_ll_addr(&paddr, &vaddr); + + return (void __iomem *)vaddr; +} + static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) { - void __iomem *regs = S3C_VA_UARTx(uart); + void __iomem *regs = s3c_pm_uart_base(); save->ulcon = __raw_readl(regs + S3C2410_ULCON); save->ucon = __raw_readl(regs + S3C2410_UCON); @@ -98,7 +109,7 @@ static void s3c_pm_save_uarts(void) 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_pm_uart_base(); s3c_pm_arch_update_uart(regs, save); -- 2.20.1