diff options
author | Tomasz Figa <t.figa@samsung.com> | 2014-03-17 18:28:09 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-03-20 15:06:11 -0400 |
commit | 99b2fc2b8b40256538332769f11f2fe6ee942f6c (patch) | |
tree | 7303be5f6d13dc66e07c14f8da99e2593d87ce0e /arch/arm/plat-samsung | |
parent | de7fe0807c08553b88028d039861a4b8ad04fc62 (diff) |
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 <t.figa@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/pm.c | 15 |
1 files 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 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
25 | #include <asm/mach/map.h> | ||
25 | #include <asm/suspend.h> | 26 | #include <asm/suspend.h> |
26 | 27 | ||
27 | #include <plat/cpu.h> | 28 | #include <plat/cpu.h> |
@@ -74,9 +75,19 @@ static inline void s3c_pm_debug_init(void) | |||
74 | 75 | ||
75 | static struct pm_uart_save uart_save; | 76 | static struct pm_uart_save uart_save; |
76 | 77 | ||
78 | static inline void __iomem *s3c_pm_uart_base(void) | ||
79 | { | ||
80 | unsigned long paddr; | ||
81 | unsigned long vaddr; | ||
82 | |||
83 | debug_ll_addr(&paddr, &vaddr); | ||
84 | |||
85 | return (void __iomem *)vaddr; | ||
86 | } | ||
87 | |||
77 | static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) | 88 | static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) |
78 | { | 89 | { |
79 | void __iomem *regs = S3C_VA_UARTx(uart); | 90 | void __iomem *regs = s3c_pm_uart_base(); |
80 | 91 | ||
81 | save->ulcon = __raw_readl(regs + S3C2410_ULCON); | 92 | save->ulcon = __raw_readl(regs + S3C2410_ULCON); |
82 | save->ucon = __raw_readl(regs + S3C2410_UCON); | 93 | save->ucon = __raw_readl(regs + S3C2410_UCON); |
@@ -98,7 +109,7 @@ static void s3c_pm_save_uarts(void) | |||
98 | 109 | ||
99 | static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) | 110 | static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) |
100 | { | 111 | { |
101 | void __iomem *regs = S3C_VA_UARTx(uart); | 112 | void __iomem *regs = s3c_pm_uart_base(); |
102 | 113 | ||
103 | s3c_pm_arch_update_uart(regs, save); | 114 | s3c_pm_arch_update_uart(regs, save); |
104 | 115 | ||