aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2016-07-06 01:41:01 -0400
committerOlof Johansson <olof@lixom.net>2016-07-06 01:41:01 -0400
commit553228d073444ac49cb24cafdde3e8a3fc56297a (patch)
treef11727a3ee3087d3ab7f3d679de3c9fafd76979b
parentdf92d2e39313d0af510cacef27e82be6a002b889 (diff)
parent1c03274d68f4744afe582fcff1c2e5b1c5c34b5b (diff)
Merge tag 'samsung-soc-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc
Samsung mach/soc update for v4.8, part 2: 1. Endian-friendly fixes. 2. Maintainers update. * tag 'samsung-soc-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: MAINTAINERS: Extend Samsung SoC entry with S3C/S5P drivers ARM: SAMSUNG: Fix missing s5p_init_cpu() declaration ARM: EXYNOS: Fix UART address selection for DEBUG_LL ARM: EXYNOS: Fixup for __raw operations in suspend.c ARM: SAMSUNG: Fixup usage of __raw IO in PM ARM: EXYNOS: Fixup endian in pm/pmu ARM: EXYNOS: Fixups for big-endian operation ARM: SAMSUNG: Fixup endian issues in CPU detection ARM: EXYNOS: Fixup debug macros for big-endian ARM: s3c24xx: Sort cpufreq tables ARM: SAMSUNG: Fix typos Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--MAINTAINERS6
-rw-r--r--arch/arm/include/debug/exynos.S6
-rw-r--r--arch/arm/include/debug/samsung.S8
-rw-r--r--arch/arm/mach-exynos/common.h5
-rw-r--r--arch/arm/mach-exynos/exynos.c1
-rw-r--r--arch/arm/mach-exynos/firmware.c18
-rw-r--r--arch/arm/mach-exynos/headsmp.S3
-rw-r--r--arch/arm/mach-exynos/platsmp.c4
-rw-r--r--arch/arm/mach-exynos/pm.c6
-rw-r--r--arch/arm/mach-exynos/pm_domains.c6
-rw-r--r--arch/arm/mach-exynos/suspend.c12
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-gpio.h2
-rw-r--r--arch/arm/mach-s3c24xx/iotiming-s3c2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-n30.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris-dvs.c2
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2410.c3
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c1
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c1
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/map.h2
-rw-r--r--arch/arm/plat-samsung/cpu.c8
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu-freq-core.h2
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/fb-s3c2410.h2
-rw-r--r--arch/arm/plat-samsung/include/plat/gpio-cfg.h2
-rw-r--r--arch/arm/plat-samsung/pm-check.c2
-rw-r--r--arch/arm/plat-samsung/pm-common.c8
-rw-r--r--arch/arm/plat-samsung/watchdog-reset.c2
27 files changed, 69 insertions, 48 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 8035dc883157..362a93cb315a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1598,8 +1598,10 @@ F: arch/arm/mach-s3c24*/
1598F: arch/arm/mach-s3c64xx/ 1598F: arch/arm/mach-s3c64xx/
1599F: arch/arm/mach-s5p*/ 1599F: arch/arm/mach-s5p*/
1600F: arch/arm/mach-exynos*/ 1600F: arch/arm/mach-exynos*/
1601F: drivers/*/*s3c2410* 1601F: drivers/*/*s3c24*
1602F: drivers/*/*/*s3c2410* 1602F: drivers/*/*/*s3c24*
1603F: drivers/*/*s3c64xx*
1604F: drivers/*/*s5pv210*
1603F: drivers/memory/samsung/* 1605F: drivers/memory/samsung/*
1604F: drivers/soc/samsung/* 1606F: drivers/soc/samsung/*
1605F: drivers/spi/spi-s3c* 1607F: drivers/spi/spi-s3c*
diff --git a/arch/arm/include/debug/exynos.S b/arch/arm/include/debug/exynos.S
index b17fdb7fbd34..60bf3c23200d 100644
--- a/arch/arm/include/debug/exynos.S
+++ b/arch/arm/include/debug/exynos.S
@@ -24,7 +24,11 @@
24 mrc p15, 0, \tmp, c0, c0, 0 24 mrc p15, 0, \tmp, c0, c0, 0
25 and \tmp, \tmp, #0xf0 25 and \tmp, \tmp, #0xf0
26 teq \tmp, #0xf0 @@ A15 26 teq \tmp, #0xf0 @@ A15
27 ldreq \rp, =EXYNOS5_PA_UART 27 beq 100f
28 mrc p15, 0, \tmp, c0, c0, 5
29 and \tmp, \tmp, #0xf00
30 teq \tmp, #0x100 @@ A15 + A7 but boot to A7
31100: ldreq \rp, =EXYNOS5_PA_UART
28 movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 32 movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4
29 ldr \rv, =S3C_VA_UART 33 ldr \rv, =S3C_VA_UART
30#if CONFIG_DEBUG_S3C_UART != 0 34#if CONFIG_DEBUG_S3C_UART != 0
diff --git a/arch/arm/include/debug/samsung.S b/arch/arm/include/debug/samsung.S
index 8d8d922e5e44..f4eeed2a1981 100644
--- a/arch/arm/include/debug/samsung.S
+++ b/arch/arm/include/debug/samsung.S
@@ -15,11 +15,13 @@
15 15
16 .macro fifo_level_s5pv210 rd, rx 16 .macro fifo_level_s5pv210 rd, rx
17 ldr \rd, [\rx, # S3C2410_UFSTAT] 17 ldr \rd, [\rx, # S3C2410_UFSTAT]
18ARM_BE8(rev \rd, \rd)
18 and \rd, \rd, #S5PV210_UFSTAT_TXMASK 19 and \rd, \rd, #S5PV210_UFSTAT_TXMASK
19 .endm 20 .endm
20 21
21 .macro fifo_full_s5pv210 rd, rx 22 .macro fifo_full_s5pv210 rd, rx
22 ldr \rd, [\rx, # S3C2410_UFSTAT] 23 ldr \rd, [\rx, # S3C2410_UFSTAT]
24ARM_BE8(rev \rd, \rd)
23 tst \rd, #S5PV210_UFSTAT_TXFULL 25 tst \rd, #S5PV210_UFSTAT_TXFULL
24 .endm 26 .endm
25 27
@@ -28,6 +30,7 @@
28 30
29 .macro fifo_level_s3c2440 rd, rx 31 .macro fifo_level_s3c2440 rd, rx
30 ldr \rd, [\rx, # S3C2410_UFSTAT] 32 ldr \rd, [\rx, # S3C2410_UFSTAT]
33ARM_BE8(rev \rd, \rd)
31 and \rd, \rd, #S3C2440_UFSTAT_TXMASK 34 and \rd, \rd, #S3C2440_UFSTAT_TXMASK
32 .endm 35 .endm
33 36
@@ -37,6 +40,7 @@
37 40
38 .macro fifo_full_s3c2440 rd, rx 41 .macro fifo_full_s3c2440 rd, rx
39 ldr \rd, [\rx, # S3C2410_UFSTAT] 42 ldr \rd, [\rx, # S3C2410_UFSTAT]
43ARM_BE8(rev \rd, \rd)
40 tst \rd, #S3C2440_UFSTAT_TXFULL 44 tst \rd, #S3C2440_UFSTAT_TXFULL
41 .endm 45 .endm
42 46
@@ -50,6 +54,7 @@
50 54
51 .macro busyuart, rd, rx 55 .macro busyuart, rd, rx
52 ldr \rd, [\rx, # S3C2410_UFCON] 56 ldr \rd, [\rx, # S3C2410_UFCON]
57ARM_BE8(rev \rd, \rd)
53 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 58 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
54 beq 1001f @ 59 beq 1001f @
55 @ FIFO enabled... 60 @ FIFO enabled...
@@ -61,6 +66,7 @@
611001: 661001:
62 @ busy waiting for non fifo 67 @ busy waiting for non fifo
63 ldr \rd, [\rx, # S3C2410_UTRSTAT] 68 ldr \rd, [\rx, # S3C2410_UTRSTAT]
69ARM_BE8(rev \rd, \rd)
64 tst \rd, #S3C2410_UTRSTAT_TXFE 70 tst \rd, #S3C2410_UTRSTAT_TXFE
65 beq 1001b 71 beq 1001b
66 72
@@ -69,6 +75,7 @@
69 75
70 .macro waituart,rd,rx 76 .macro waituart,rd,rx
71 ldr \rd, [\rx, # S3C2410_UFCON] 77 ldr \rd, [\rx, # S3C2410_UFCON]
78ARM_BE8(rev \rd, \rd)
72 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 79 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
73 beq 1001f @ 80 beq 1001f @
74 @ FIFO enabled... 81 @ FIFO enabled...
@@ -80,6 +87,7 @@
801001: 871001:
81 @ idle waiting for non fifo 88 @ idle waiting for non fifo
82 ldr \rd, [\rx, # S3C2410_UTRSTAT] 89 ldr \rd, [\rx, # S3C2410_UTRSTAT]
90ARM_BE8(rev \rd, \rd)
83 tst \rd, #S3C2410_UTRSTAT_TXFE 91 tst \rd, #S3C2410_UTRSTAT_TXFE
84 beq 1001b 92 beq 1001b
85 93
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 5365bf1f586a..9424a8a9f308 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -166,7 +166,6 @@ extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
166 166
167extern void exynos_set_delayed_reset_assertion(bool enable); 167extern void exynos_set_delayed_reset_assertion(bool enable);
168 168
169extern void s5p_init_cpu(void __iomem *cpuid_addr);
170extern unsigned int samsung_rev(void); 169extern unsigned int samsung_rev(void);
171extern void exynos_core_restart(u32 core_id); 170extern void exynos_core_restart(u32 core_id);
172extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr); 171extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr);
@@ -174,12 +173,12 @@ extern int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr);
174 173
175static inline void pmu_raw_writel(u32 val, u32 offset) 174static inline void pmu_raw_writel(u32 val, u32 offset)
176{ 175{
177 __raw_writel(val, pmu_base_addr + offset); 176 writel_relaxed(val, pmu_base_addr + offset);
178} 177}
179 178
180static inline u32 pmu_raw_readl(u32 offset) 179static inline u32 pmu_raw_readl(u32 offset)
181{ 180{
182 return __raw_readl(pmu_base_addr + offset); 181 return readl_relaxed(pmu_base_addr + offset);
183} 182}
184 183
185#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ 184#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 52ccf247e079..bdaf81c46d74 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -25,6 +25,7 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26 26
27#include <mach/map.h> 27#include <mach/map.h>
28#include <plat/cpu.h>
28 29
29#include "common.h" 30#include "common.h"
30#include "mfc.h" 31#include "mfc.h"
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index 1bfd1b0bd9dc..fd6da5419b51 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -41,9 +41,9 @@ static int exynos_do_idle(unsigned long mode)
41 case FW_DO_IDLE_AFTR: 41 case FW_DO_IDLE_AFTR:
42 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) 42 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
43 exynos_save_cp15(); 43 exynos_save_cp15();
44 __raw_writel(virt_to_phys(exynos_cpu_resume_ns), 44 writel_relaxed(virt_to_phys(exynos_cpu_resume_ns),
45 sysram_ns_base_addr + 0x24); 45 sysram_ns_base_addr + 0x24);
46 __raw_writel(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20); 46 writel_relaxed(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20);
47 if (soc_is_exynos3250()) { 47 if (soc_is_exynos3250()) {
48 flush_cache_all(); 48 flush_cache_all();
49 exynos_smc(SMC_CMD_SAVE, OP_TYPE_CORE, 49 exynos_smc(SMC_CMD_SAVE, OP_TYPE_CORE,
@@ -97,7 +97,7 @@ static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
97 if (soc_is_exynos4412()) 97 if (soc_is_exynos4412())
98 boot_reg += 4 * cpu; 98 boot_reg += 4 * cpu;
99 99
100 __raw_writel(boot_addr, boot_reg); 100 writel_relaxed(boot_addr, boot_reg);
101 return 0; 101 return 0;
102} 102}
103 103
@@ -113,7 +113,7 @@ static int exynos_get_cpu_boot_addr(int cpu, unsigned long *boot_addr)
113 if (soc_is_exynos4412()) 113 if (soc_is_exynos4412())
114 boot_reg += 4 * cpu; 114 boot_reg += 4 * cpu;
115 115
116 *boot_addr = __raw_readl(boot_reg); 116 *boot_addr = readl_relaxed(boot_reg);
117 return 0; 117 return 0;
118} 118}
119 119
@@ -234,20 +234,20 @@ void exynos_set_boot_flag(unsigned int cpu, unsigned int mode)
234{ 234{
235 unsigned int tmp; 235 unsigned int tmp;
236 236
237 tmp = __raw_readl(REG_CPU_STATE_ADDR + cpu * 4); 237 tmp = readl_relaxed(REG_CPU_STATE_ADDR + cpu * 4);
238 238
239 if (mode & BOOT_MODE_MASK) 239 if (mode & BOOT_MODE_MASK)
240 tmp &= ~BOOT_MODE_MASK; 240 tmp &= ~BOOT_MODE_MASK;
241 241
242 tmp |= mode; 242 tmp |= mode;
243 __raw_writel(tmp, REG_CPU_STATE_ADDR + cpu * 4); 243 writel_relaxed(tmp, REG_CPU_STATE_ADDR + cpu * 4);
244} 244}
245 245
246void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode) 246void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode)
247{ 247{
248 unsigned int tmp; 248 unsigned int tmp;
249 249
250 tmp = __raw_readl(REG_CPU_STATE_ADDR + cpu * 4); 250 tmp = readl_relaxed(REG_CPU_STATE_ADDR + cpu * 4);
251 tmp &= ~mode; 251 tmp &= ~mode;
252 __raw_writel(tmp, REG_CPU_STATE_ADDR + cpu * 4); 252 writel_relaxed(tmp, REG_CPU_STATE_ADDR + cpu * 4);
253} 253}
diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S
index b54f9701e421..d3d24ab351ae 100644
--- a/arch/arm/mach-exynos/headsmp.S
+++ b/arch/arm/mach-exynos/headsmp.S
@@ -12,12 +12,15 @@
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15#include <asm/assembler.h>
16
15/* 17/*
16 * exynos4 specific entry point for secondary CPUs. This provides 18 * exynos4 specific entry point for secondary CPUs. This provides
17 * a "holding pen" into which all secondary cores are held until we're 19 * a "holding pen" into which all secondary cores are held until we're
18 * ready for them to initialise. 20 * ready for them to initialise.
19 */ 21 */
20ENTRY(exynos4_secondary_startup) 22ENTRY(exynos4_secondary_startup)
23ARM_BE8(setend be)
21 mrc p15, 0, r0, c0, c0, 5 24 mrc p15, 0, r0, c0, c0, 5
22 and r0, r0, #15 25 and r0, r0, #15
23 adr r4, 1f 26 adr r4, 1f
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 85c3be63d644..98ffe1e62ad5 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -264,7 +264,7 @@ int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr)
264 ret = PTR_ERR(boot_reg); 264 ret = PTR_ERR(boot_reg);
265 goto fail; 265 goto fail;
266 } 266 }
267 __raw_writel(boot_addr, boot_reg); 267 writel_relaxed(boot_addr, boot_reg);
268 ret = 0; 268 ret = 0;
269 } 269 }
270fail: 270fail:
@@ -289,7 +289,7 @@ int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr)
289 ret = PTR_ERR(boot_reg); 289 ret = PTR_ERR(boot_reg);
290 goto fail; 290 goto fail;
291 } 291 }
292 *boot_addr = __raw_readl(boot_reg); 292 *boot_addr = readl_relaxed(boot_reg);
293 ret = 0; 293 ret = 0;
294 } 294 }
295fail: 295fail:
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index c43b776a51a3..487295f4a56b 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -132,9 +132,9 @@ static void exynos_set_wakeupmask(long mask)
132 132
133static void exynos_cpu_set_boot_vector(long flags) 133static void exynos_cpu_set_boot_vector(long flags)
134{ 134{
135 __raw_writel(virt_to_phys(exynos_cpu_resume), 135 writel_relaxed(virt_to_phys(exynos_cpu_resume),
136 exynos_boot_vector_addr()); 136 exynos_boot_vector_addr());
137 __raw_writel(flags, exynos_boot_vector_flag()); 137 writel_relaxed(flags, exynos_boot_vector_flag());
138} 138}
139 139
140static int exynos_aftr_finisher(unsigned long flags) 140static int exynos_aftr_finisher(unsigned long flags)
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 875a2bab64f6..0e075d96ccd4 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -70,12 +70,12 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
70 } 70 }
71 71
72 pwr = power_on ? INT_LOCAL_PWR_EN : 0; 72 pwr = power_on ? INT_LOCAL_PWR_EN : 0;
73 __raw_writel(pwr, base); 73 writel_relaxed(pwr, base);
74 74
75 /* Wait max 1ms */ 75 /* Wait max 1ms */
76 timeout = 10; 76 timeout = 10;
77 77
78 while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) { 78 while ((readl_relaxed(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) {
79 if (!timeout) { 79 if (!timeout) {
80 op = (power_on) ? "enable" : "disable"; 80 op = (power_on) ? "enable" : "disable";
81 pr_err("Power domain %s %s failed\n", domain->name, op); 81 pr_err("Power domain %s %s failed\n", domain->name, op);
@@ -185,7 +185,7 @@ static __init int exynos4_pm_init_power_domain(void)
185 clk_put(pd->oscclk); 185 clk_put(pd->oscclk);
186 186
187no_clk: 187no_clk:
188 on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN; 188 on = readl_relaxed(pd->base + 0x4) & INT_LOCAL_PWR_EN;
189 189
190 pm_genpd_init(&pd->pd, NULL, !on); 190 pm_genpd_init(&pd->pd, NULL, !on);
191 of_genpd_add_provider_simple(np, &pd->pd); 191 of_genpd_add_provider_simple(np, &pd->pd);
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index f21690937b7d..3750575c73c5 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -301,7 +301,7 @@ static int exynos5420_cpu_suspend(unsigned long arg)
301 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); 301 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
302 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); 302 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
303 303
304 __raw_writel(0x0, sysram_base_addr + EXYNOS5420_CPU_STATE); 304 writel_relaxed(0x0, sysram_base_addr + EXYNOS5420_CPU_STATE);
305 305
306 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) { 306 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) {
307 mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); 307 mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);
@@ -373,8 +373,8 @@ static void exynos5420_pm_prepare(void)
373 * needs to restore it back in case, the primary cpu fails to 373 * needs to restore it back in case, the primary cpu fails to
374 * suspend for any reason. 374 * suspend for any reason.
375 */ 375 */
376 exynos5420_cpu_state = __raw_readl(sysram_base_addr + 376 exynos5420_cpu_state = readl_relaxed(sysram_base_addr +
377 EXYNOS5420_CPU_STATE); 377 EXYNOS5420_CPU_STATE);
378 378
379 exynos_pm_enter_sleep_mode(); 379 exynos_pm_enter_sleep_mode();
380 380
@@ -504,11 +504,11 @@ static void exynos5420_pm_resume(void)
504 /* Restore the CPU0 low power state register */ 504 /* Restore the CPU0 low power state register */
505 tmp = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG); 505 tmp = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG);
506 pmu_raw_writel(tmp | S5P_CORE_LOCAL_PWR_EN, 506 pmu_raw_writel(tmp | S5P_CORE_LOCAL_PWR_EN,
507 EXYNOS5_ARM_CORE0_SYS_PWR_REG); 507 EXYNOS5_ARM_CORE0_SYS_PWR_REG);
508 508
509 /* Restore the sysram cpu state register */ 509 /* Restore the sysram cpu state register */
510 __raw_writel(exynos5420_cpu_state, 510 writel_relaxed(exynos5420_cpu_state,
511 sysram_base_addr + EXYNOS5420_CPU_STATE); 511 sysram_base_addr + EXYNOS5420_CPU_STATE);
512 512
513 pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL, 513 pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL,
514 S5P_CENTRAL_SEQ_OPTION); 514 S5P_CENTRAL_SEQ_OPTION);
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index c6583cfa5835..0d622f3b57a5 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -520,7 +520,7 @@
520#define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) 520#define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C)
521#define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) 521#define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90)
522 522
523/* interrupt filtering conrrol for EINT16..EINT23 */ 523/* interrupt filtering control for EINT16..EINT23 */
524#define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94) 524#define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94)
525#define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98) 525#define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98)
526#define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) 526#define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C)
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index 4cd13ab6496b..65e5f9cb650f 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -423,7 +423,7 @@ void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg,
423 * @timings: The IO timing information to fill out. 423 * @timings: The IO timing information to fill out.
424 * 424 *
425 * Calculate the @timings timing information from the current frequency 425 * Calculate the @timings timing information from the current frequency
426 * information in @cfg, and the new frequency configur 426 * information in @cfg, and the new frequency configuration
427 * through all the IO banks, reading the state and then updating @iot 427 * through all the IO banks, reading the state and then updating @iot
428 * as necessary. 428 * as necessary.
429 * 429 *
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 171c1f11fd22..070a0d0714a5 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -522,7 +522,7 @@ static void __init n30_hwinit(void)
522 * 522 *
523 * The pull ups for H6/H7 are enabled on N30 but not on the 523 * The pull ups for H6/H7 are enabled on N30 but not on the
524 * N35/PiN. I suppose is useful for a budget model of the N30 524 * N35/PiN. I suppose is useful for a budget model of the N30
525 * with no bluetooh. It doesn't hurt to have the pull ups 525 * with no bluetooth. It doesn't hurt to have the pull ups
526 * enabled on the N35, so leave them enabled for all models. 526 * enabled on the N35, so leave them enabled for all models.
527 */ 527 */
528 __raw_writel(0x0028aaaa, S3C2410_GPHCON); 528 __raw_writel(0x0028aaaa, S3C2410_GPHCON);
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
index ce2db235dbaf..262ab0744748 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
@@ -143,7 +143,7 @@ static int osiris_dvs_remove(struct platform_device *pdev)
143 return 0; 143 return 0;
144} 144}
145 145
146/* the CONFIG_PM block is so small, it isn't worth actaully compiling it 146/* the CONFIG_PM block is so small, it isn't worth actually compiling it
147 * out if the configuration isn't set. */ 147 * out if the configuration isn't set. */
148 148
149static int osiris_dvs_suspend(struct device *dev) 149static int osiris_dvs_suspend(struct device *dev)
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c
index 5e37d368594b..7ee4924a543d 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c
@@ -32,11 +32,12 @@
32#include <plat/cpu.h> 32#include <plat/cpu.h>
33#include <plat/cpu-freq-core.h> 33#include <plat/cpu-freq-core.h>
34 34
35/* This array should be sorted in ascending order of the frequencies */
35static struct cpufreq_frequency_table pll_vals_12MHz[] = { 36static struct cpufreq_frequency_table pll_vals_12MHz[] = {
36 { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), }, 37 { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), },
37 { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), }, 38 { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), },
38 { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), },
39 { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), }, 39 { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), },
40 { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), },
40 { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), }, 41 { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), },
41 { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), }, 42 { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), },
42 { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), }, 43 { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), },
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index b355fca6cc2e..a3fbfed75e28 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -20,6 +20,7 @@
20#include <plat/cpu.h> 20#include <plat/cpu.h>
21#include <plat/cpu-freq-core.h> 21#include <plat/cpu-freq-core.h>
22 22
23/* This array should be sorted in ascending order of the frequencies */
23static struct cpufreq_frequency_table s3c2440_plls_12[] = { 24static struct cpufreq_frequency_table s3c2440_plls_12[] = {
24 { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ 25 { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */
25 { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ 26 { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index be9a248b5ce9..bcff89fd9871 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -20,6 +20,7 @@
20#include <plat/cpu.h> 20#include <plat/cpu.h>
21#include <plat/cpu-freq-core.h> 21#include <plat/cpu-freq-core.h>
22 22
23/* This array should be sorted in ascending order of the frequencies */
23static struct cpufreq_frequency_table s3c2440_plls_169344[] = { 24static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
24 { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ 25 { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */
25 { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ 26 { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h
index f55ccb1ce893..d51873e8f63f 100644
--- a/arch/arm/mach-s3c64xx/include/mach/map.h
+++ b/arch/arm/mach-s3c64xx/include/mach/map.h
@@ -99,7 +99,7 @@
99 99
100#define S3C64XX_PA_USB_HSPHY (0x7C100000) 100#define S3C64XX_PA_USB_HSPHY (0x7C100000)
101 101
102/* compatibiltiy defines. */ 102/* compatibility defines. */
103#define S3C_PA_TIMER S3C64XX_PA_TIMER 103#define S3C_PA_TIMER S3C64XX_PA_TIMER
104#define S3C_PA_HSMMC0 S3C64XX_PA_HSMMC0 104#define S3C_PA_HSMMC0 S3C64XX_PA_HSMMC0
105#define S3C_PA_HSMMC1 S3C64XX_PA_HSMMC1 105#define S3C_PA_HSMMC1 S3C64XX_PA_HSMMC1
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c
index 71333bb61013..bd12a55401e0 100644
--- a/arch/arm/plat-samsung/cpu.c
+++ b/arch/arm/plat-samsung/cpu.c
@@ -29,14 +29,14 @@ EXPORT_SYMBOL(samsung_rev);
29 29
30void __init s3c64xx_init_cpu(void) 30void __init s3c64xx_init_cpu(void)
31{ 31{
32 samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118); 32 samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0x118);
33 if (!samsung_cpu_id) { 33 if (!samsung_cpu_id) {
34 /* 34 /*
35 * S3C6400 has the ID register in a different place, 35 * S3C6400 has the ID register in a different place,
36 * and needs a write before it can be read. 36 * and needs a write before it can be read.
37 */ 37 */
38 __raw_writel(0x0, S3C_VA_SYS + 0xA1C); 38 writel_relaxed(0x0, S3C_VA_SYS + 0xA1C);
39 samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C); 39 samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C);
40 } 40 }
41 41
42 samsung_cpu_rev = 0; 42 samsung_cpu_rev = 0;
@@ -46,7 +46,7 @@ void __init s3c64xx_init_cpu(void)
46 46
47void __init s5p_init_cpu(void __iomem *cpuid_addr) 47void __init s5p_init_cpu(void __iomem *cpuid_addr)
48{ 48{
49 samsung_cpu_id = __raw_readl(cpuid_addr); 49 samsung_cpu_id = readl_relaxed(cpuid_addr);
50 samsung_cpu_rev = samsung_cpu_id & 0xFF; 50 samsung_cpu_rev = samsung_cpu_id & 0xFF;
51 51
52 pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id); 52 pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
index 317c52303288..37cf20e04aff 100644
--- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
+++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
@@ -39,7 +39,7 @@ struct s3c2410_iobank_timing {
39 unsigned int tacs; 39 unsigned int tacs;
40 unsigned int tcos; 40 unsigned int tcos;
41 unsigned int tacc; 41 unsigned int tacc;
42 unsigned int tcoh; /* nCS hold afrer nOE/nWE */ 42 unsigned int tcoh; /* nCS hold after nOE/nWE */
43 unsigned int tcah; /* Address hold after nCS */ 43 unsigned int tcah; /* Address hold after nCS */
44 unsigned char nwait_en; /* nWait enabled for bank. */ 44 unsigned char nwait_en; /* nWait enabled for bank. */
45}; 45};
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 61d14f3a0426..4f8a6221dc6d 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -113,6 +113,7 @@ extern void s3c_init_cpu(unsigned long idcode,
113extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); 113extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
114 114
115extern void s3c64xx_init_cpu(void); 115extern void s3c64xx_init_cpu(void);
116extern void s5p_init_cpu(void __iomem *cpuid_addr);
116 117
117extern unsigned int samsung_rev(void); 118extern unsigned int samsung_rev(void);
118 119
diff --git a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h b/arch/arm/plat-samsung/include/plat/fb-s3c2410.h
index 4e5d9588b5ba..1f2972a74e9f 100644
--- a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h
+++ b/arch/arm/plat-samsung/include/plat/fb-s3c2410.h
@@ -48,7 +48,7 @@ struct s3c2410fb_display {
48 48
49struct s3c2410fb_mach_info { 49struct s3c2410fb_mach_info {
50 50
51 struct s3c2410fb_display *displays; /* attached diplays info */ 51 struct s3c2410fb_display *displays; /* attached displays info */
52 unsigned num_displays; /* number of defined displays */ 52 unsigned num_displays; /* number of defined displays */
53 unsigned default_display; 53 unsigned default_display;
54 54
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h
index b5294eff18b5..21391faab068 100644
--- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h
+++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h
@@ -35,7 +35,7 @@ struct samsung_gpio_chip;
35 * struct samsung_gpio_cfg GPIO configuration 35 * struct samsung_gpio_cfg GPIO configuration
36 * @cfg_eint: Configuration setting when used for external interrupt source 36 * @cfg_eint: Configuration setting when used for external interrupt source
37 * @get_pull: Read the current pull configuration for the GPIO 37 * @get_pull: Read the current pull configuration for the GPIO
38 * @set_pull: Set the current pull configuraiton for the GPIO 38 * @set_pull: Set the current pull configuration for the GPIO
39 * @set_config: Set the current configuration for the GPIO 39 * @set_config: Set the current configuration for the GPIO
40 * @get_config: Read the current configuration for the GPIO 40 * @get_config: Read the current configuration for the GPIO
41 * 41 *
diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c
index 70f2f699bed3..d63516374f7c 100644
--- a/arch/arm/plat-samsung/pm-check.c
+++ b/arch/arm/plat-samsung/pm-check.c
@@ -5,7 +5,7 @@
5 * http://armlinux.simtec.co.uk 5 * http://armlinux.simtec.co.uk
6 * Ben Dooks <ben@simtec.co.uk> 6 * Ben Dooks <ben@simtec.co.uk>
7 * 7 *
8 * S3C Power Mangament - suspend/resume memory corruptiuon check. 8 * S3C Power Mangament - suspend/resume memory corruption check.
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
diff --git a/arch/arm/plat-samsung/pm-common.c b/arch/arm/plat-samsung/pm-common.c
index 515cd53372bd..6534c3ff9fe2 100644
--- a/arch/arm/plat-samsung/pm-common.c
+++ b/arch/arm/plat-samsung/pm-common.c
@@ -31,7 +31,7 @@
31void s3c_pm_do_save(struct sleep_save *ptr, int count) 31void s3c_pm_do_save(struct sleep_save *ptr, int count)
32{ 32{
33 for (; count > 0; count--, ptr++) { 33 for (; count > 0; count--, ptr++) {
34 ptr->val = __raw_readl(ptr->reg); 34 ptr->val = readl_relaxed(ptr->reg);
35 S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val); 35 S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val);
36 } 36 }
37} 37}
@@ -51,9 +51,9 @@ void s3c_pm_do_restore(const struct sleep_save *ptr, int count)
51{ 51{
52 for (; count > 0; count--, ptr++) { 52 for (; count > 0; count--, ptr++) {
53 pr_debug("restore %p (restore %08lx, was %08x)\n", 53 pr_debug("restore %p (restore %08lx, was %08x)\n",
54 ptr->reg, ptr->val, __raw_readl(ptr->reg)); 54 ptr->reg, ptr->val, readl_relaxed(ptr->reg));
55 55
56 __raw_writel(ptr->val, ptr->reg); 56 writel_relaxed(ptr->val, ptr->reg);
57 } 57 }
58} 58}
59 59
@@ -71,5 +71,5 @@ void s3c_pm_do_restore(const struct sleep_save *ptr, int count)
71void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) 71void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count)
72{ 72{
73 for (; count > 0; count--, ptr++) 73 for (; count > 0; count--, ptr++)
74 __raw_writel(ptr->val, ptr->reg); 74 writel_relaxed(ptr->val, ptr->reg);
75} 75}
diff --git a/arch/arm/plat-samsung/watchdog-reset.c b/arch/arm/plat-samsung/watchdog-reset.c
index 2ecb50bea044..307d8ad96a78 100644
--- a/arch/arm/plat-samsung/watchdog-reset.c
+++ b/arch/arm/plat-samsung/watchdog-reset.c
@@ -3,7 +3,7 @@
3 * Copyright (c) 2008 Simtec Electronics 3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * Coyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com> 6 * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
7 * 7 *
8 * Watchdog reset support for Samsung SoCs. 8 * Watchdog reset support for Samsung SoCs.
9 * 9 *