Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+69 -48
+4 -2
MAINTAINERS
··· 1598 1598 F: arch/arm/mach-s3c64xx/ 1599 1599 F: arch/arm/mach-s5p*/ 1600 1600 F: arch/arm/mach-exynos*/ 1601 - F: drivers/*/*s3c2410* 1602 - F: drivers/*/*/*s3c2410* 1601 + F: drivers/*/*s3c24* 1602 + F: drivers/*/*/*s3c24* 1603 + F: drivers/*/*s3c64xx* 1604 + F: drivers/*/*s5pv210* 1603 1605 F: drivers/memory/samsung/* 1604 1606 F: drivers/soc/samsung/* 1605 1607 F: drivers/spi/spi-s3c*
+5 -1
arch/arm/include/debug/exynos.S
··· 24 24 mrc p15, 0, \tmp, c0, c0, 0 25 25 and \tmp, \tmp, #0xf0 26 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 31 + 100: ldreq \rp, =EXYNOS5_PA_UART 28 32 movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 29 33 ldr \rv, =S3C_VA_UART 30 34 #if CONFIG_DEBUG_S3C_UART != 0
+8
arch/arm/include/debug/samsung.S
··· 15 15 16 16 .macro fifo_level_s5pv210 rd, rx 17 17 ldr \rd, [\rx, # S3C2410_UFSTAT] 18 + ARM_BE8(rev \rd, \rd) 18 19 and \rd, \rd, #S5PV210_UFSTAT_TXMASK 19 20 .endm 20 21 21 22 .macro fifo_full_s5pv210 rd, rx 22 23 ldr \rd, [\rx, # S3C2410_UFSTAT] 24 + ARM_BE8(rev \rd, \rd) 23 25 tst \rd, #S5PV210_UFSTAT_TXFULL 24 26 .endm 25 27 ··· 30 28 31 29 .macro fifo_level_s3c2440 rd, rx 32 30 ldr \rd, [\rx, # S3C2410_UFSTAT] 31 + ARM_BE8(rev \rd, \rd) 33 32 and \rd, \rd, #S3C2440_UFSTAT_TXMASK 34 33 .endm 35 34 ··· 40 37 41 38 .macro fifo_full_s3c2440 rd, rx 42 39 ldr \rd, [\rx, # S3C2410_UFSTAT] 40 + ARM_BE8(rev \rd, \rd) 43 41 tst \rd, #S3C2440_UFSTAT_TXFULL 44 42 .endm 45 43 ··· 54 50 55 51 .macro busyuart, rd, rx 56 52 ldr \rd, [\rx, # S3C2410_UFCON] 53 + ARM_BE8(rev \rd, \rd) 57 54 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 58 55 beq 1001f @ 59 56 @ FIFO enabled... ··· 66 61 1001: 67 62 @ busy waiting for non fifo 68 63 ldr \rd, [\rx, # S3C2410_UTRSTAT] 64 + ARM_BE8(rev \rd, \rd) 69 65 tst \rd, #S3C2410_UTRSTAT_TXFE 70 66 beq 1001b 71 67 ··· 75 69 76 70 .macro waituart,rd,rx 77 71 ldr \rd, [\rx, # S3C2410_UFCON] 72 + ARM_BE8(rev \rd, \rd) 78 73 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 79 74 beq 1001f @ 80 75 @ FIFO enabled... ··· 87 80 1001: 88 81 @ idle waiting for non fifo 89 82 ldr \rd, [\rx, # S3C2410_UTRSTAT] 83 + ARM_BE8(rev \rd, \rd) 90 84 tst \rd, #S3C2410_UTRSTAT_TXFE 91 85 beq 1001b 92 86
+2 -3
arch/arm/mach-exynos/common.h
··· 166 166 167 167 extern void exynos_set_delayed_reset_assertion(bool enable); 168 168 169 - extern void s5p_init_cpu(void __iomem *cpuid_addr); 170 169 extern unsigned int samsung_rev(void); 171 170 extern void exynos_core_restart(u32 core_id); 172 171 extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr); ··· 173 174 174 175 static inline void pmu_raw_writel(u32 val, u32 offset) 175 176 { 176 - __raw_writel(val, pmu_base_addr + offset); 177 + writel_relaxed(val, pmu_base_addr + offset); 177 178 } 178 179 179 180 static inline u32 pmu_raw_readl(u32 offset) 180 181 { 181 - return __raw_readl(pmu_base_addr + offset); 182 + return readl_relaxed(pmu_base_addr + offset); 182 183 } 183 184 184 185 #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
+1
arch/arm/mach-exynos/exynos.c
··· 25 25 #include <asm/mach/map.h> 26 26 27 27 #include <mach/map.h> 28 + #include <plat/cpu.h> 28 29 29 30 #include "common.h" 30 31 #include "mfc.h"
+9 -9
arch/arm/mach-exynos/firmware.c
··· 41 41 case FW_DO_IDLE_AFTR: 42 42 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) 43 43 exynos_save_cp15(); 44 - __raw_writel(virt_to_phys(exynos_cpu_resume_ns), 45 - sysram_ns_base_addr + 0x24); 46 - __raw_writel(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20); 44 + writel_relaxed(virt_to_phys(exynos_cpu_resume_ns), 45 + sysram_ns_base_addr + 0x24); 46 + writel_relaxed(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20); 47 47 if (soc_is_exynos3250()) { 48 48 flush_cache_all(); 49 49 exynos_smc(SMC_CMD_SAVE, OP_TYPE_CORE, ··· 97 97 if (soc_is_exynos4412()) 98 98 boot_reg += 4 * cpu; 99 99 100 - __raw_writel(boot_addr, boot_reg); 100 + writel_relaxed(boot_addr, boot_reg); 101 101 return 0; 102 102 } 103 103 ··· 113 113 if (soc_is_exynos4412()) 114 114 boot_reg += 4 * cpu; 115 115 116 - *boot_addr = __raw_readl(boot_reg); 116 + *boot_addr = readl_relaxed(boot_reg); 117 117 return 0; 118 118 } 119 119 ··· 234 234 { 235 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 239 if (mode & BOOT_MODE_MASK) 240 240 tmp &= ~BOOT_MODE_MASK; 241 241 242 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 246 246 void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode) 247 247 { 248 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 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 }
+3
arch/arm/mach-exynos/headsmp.S
··· 12 12 #include <linux/linkage.h> 13 13 #include <linux/init.h> 14 14 15 + #include <asm/assembler.h> 16 + 15 17 /* 16 18 * exynos4 specific entry point for secondary CPUs. This provides 17 19 * a "holding pen" into which all secondary cores are held until we're 18 20 * ready for them to initialise. 19 21 */ 20 22 ENTRY(exynos4_secondary_startup) 23 + ARM_BE8(setend be) 21 24 mrc p15, 0, r0, c0, c0, 5 22 25 and r0, r0, #15 23 26 adr r4, 1f
+2 -2
arch/arm/mach-exynos/platsmp.c
··· 264 264 ret = PTR_ERR(boot_reg); 265 265 goto fail; 266 266 } 267 - __raw_writel(boot_addr, boot_reg); 267 + writel_relaxed(boot_addr, boot_reg); 268 268 ret = 0; 269 269 } 270 270 fail: ··· 289 289 ret = PTR_ERR(boot_reg); 290 290 goto fail; 291 291 } 292 - *boot_addr = __raw_readl(boot_reg); 292 + *boot_addr = readl_relaxed(boot_reg); 293 293 ret = 0; 294 294 } 295 295 fail:
+3 -3
arch/arm/mach-exynos/pm.c
··· 132 132 133 133 static void exynos_cpu_set_boot_vector(long flags) 134 134 { 135 - __raw_writel(virt_to_phys(exynos_cpu_resume), 136 - exynos_boot_vector_addr()); 137 - __raw_writel(flags, exynos_boot_vector_flag()); 135 + writel_relaxed(virt_to_phys(exynos_cpu_resume), 136 + exynos_boot_vector_addr()); 137 + writel_relaxed(flags, exynos_boot_vector_flag()); 138 138 } 139 139 140 140 static int exynos_aftr_finisher(unsigned long flags)
+3 -3
arch/arm/mach-exynos/pm_domains.c
··· 70 70 } 71 71 72 72 pwr = power_on ? INT_LOCAL_PWR_EN : 0; 73 - __raw_writel(pwr, base); 73 + writel_relaxed(pwr, base); 74 74 75 75 /* Wait max 1ms */ 76 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 79 if (!timeout) { 80 80 op = (power_on) ? "enable" : "disable"; 81 81 pr_err("Power domain %s %s failed\n", domain->name, op); ··· 185 185 clk_put(pd->oscclk); 186 186 187 187 no_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 190 pm_genpd_init(&pd->pd, NULL, !on); 191 191 of_genpd_add_provider_simple(np, &pd->pd);
+6 -6
arch/arm/mach-exynos/suspend.c
··· 301 301 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); 302 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 306 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) { 307 307 mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); ··· 373 373 * needs to restore it back in case, the primary cpu fails to 374 374 * suspend for any reason. 375 375 */ 376 - exynos5420_cpu_state = __raw_readl(sysram_base_addr + 377 - EXYNOS5420_CPU_STATE); 376 + exynos5420_cpu_state = readl_relaxed(sysram_base_addr + 377 + EXYNOS5420_CPU_STATE); 378 378 379 379 exynos_pm_enter_sleep_mode(); 380 380 ··· 504 504 /* Restore the CPU0 low power state register */ 505 505 tmp = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG); 506 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 509 /* Restore the sysram cpu state register */ 510 - __raw_writel(exynos5420_cpu_state, 511 - sysram_base_addr + EXYNOS5420_CPU_STATE); 510 + writel_relaxed(exynos5420_cpu_state, 511 + sysram_base_addr + EXYNOS5420_CPU_STATE); 512 512 513 513 pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL, 514 514 S5P_CENTRAL_SEQ_OPTION);
+1 -1
arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
··· 520 520 #define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) 521 521 #define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) 522 522 523 - /* interrupt filtering conrrol for EINT16..EINT23 */ 523 + /* interrupt filtering control for EINT16..EINT23 */ 524 524 #define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94) 525 525 #define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98) 526 526 #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C)
+1 -1
arch/arm/mach-s3c24xx/iotiming-s3c2410.c
··· 423 423 * @timings: The IO timing information to fill out. 424 424 * 425 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 427 * through all the IO banks, reading the state and then updating @iot 428 428 * as necessary. 429 429 *
+1 -1
arch/arm/mach-s3c24xx/mach-n30.c
··· 522 522 * 523 523 * The pull ups for H6/H7 are enabled on N30 but not on the 524 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 526 * enabled on the N35, so leave them enabled for all models. 527 527 */ 528 528 __raw_writel(0x0028aaaa, S3C2410_GPHCON);
+1 -1
arch/arm/mach-s3c24xx/mach-osiris-dvs.c
··· 143 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 147 * out if the configuration isn't set. */ 148 148 149 149 static int osiris_dvs_suspend(struct device *dev)
+2 -1
arch/arm/mach-s3c24xx/pll-s3c2410.c
··· 32 32 #include <plat/cpu.h> 33 33 #include <plat/cpu-freq-core.h> 34 34 35 + /* This array should be sorted in ascending order of the frequencies */ 35 36 static struct cpufreq_frequency_table pll_vals_12MHz[] = { 36 37 { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), }, 37 38 { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), }, 38 - { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), }, 39 39 { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), }, 40 + { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), }, 40 41 { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), }, 41 42 { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), }, 42 43 { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), },
+1
arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
··· 20 20 #include <plat/cpu.h> 21 21 #include <plat/cpu-freq-core.h> 22 22 23 + /* This array should be sorted in ascending order of the frequencies */ 23 24 static struct cpufreq_frequency_table s3c2440_plls_12[] = { 24 25 { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ 25 26 { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */
+1
arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
··· 20 20 #include <plat/cpu.h> 21 21 #include <plat/cpu-freq-core.h> 22 22 23 + /* This array should be sorted in ascending order of the frequencies */ 23 24 static struct cpufreq_frequency_table s3c2440_plls_169344[] = { 24 25 { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ 25 26 { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */
+1 -1
arch/arm/mach-s3c64xx/include/mach/map.h
··· 99 99 100 100 #define S3C64XX_PA_USB_HSPHY (0x7C100000) 101 101 102 - /* compatibiltiy defines. */ 102 + /* compatibility defines. */ 103 103 #define S3C_PA_TIMER S3C64XX_PA_TIMER 104 104 #define S3C_PA_HSMMC0 S3C64XX_PA_HSMMC0 105 105 #define S3C_PA_HSMMC1 S3C64XX_PA_HSMMC1
+4 -4
arch/arm/plat-samsung/cpu.c
··· 29 29 30 30 void __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 33 if (!samsung_cpu_id) { 34 34 /* 35 35 * S3C6400 has the ID register in a different place, 36 36 * and needs a write before it can be read. 37 37 */ 38 - __raw_writel(0x0, S3C_VA_SYS + 0xA1C); 39 - samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C); 38 + writel_relaxed(0x0, S3C_VA_SYS + 0xA1C); 39 + samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C); 40 40 } 41 41 42 42 samsung_cpu_rev = 0; ··· 46 46 47 47 void __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 50 samsung_cpu_rev = samsung_cpu_id & 0xFF; 51 51 52 52 pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
+1 -1
arch/arm/plat-samsung/include/plat/cpu-freq-core.h
··· 39 39 unsigned int tacs; 40 40 unsigned int tcos; 41 41 unsigned int tacc; 42 - unsigned int tcoh; /* nCS hold afrer nOE/nWE */ 42 + unsigned int tcoh; /* nCS hold after nOE/nWE */ 43 43 unsigned int tcah; /* Address hold after nCS */ 44 44 unsigned char nwait_en; /* nWait enabled for bank. */ 45 45 };
+1
arch/arm/plat-samsung/include/plat/cpu.h
··· 113 113 extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); 114 114 115 115 extern void s3c64xx_init_cpu(void); 116 + extern void s5p_init_cpu(void __iomem *cpuid_addr); 116 117 117 118 extern unsigned int samsung_rev(void); 118 119
+1 -1
arch/arm/plat-samsung/include/plat/fb-s3c2410.h
··· 48 48 49 49 struct s3c2410fb_mach_info { 50 50 51 - struct s3c2410fb_display *displays; /* attached diplays info */ 51 + struct s3c2410fb_display *displays; /* attached displays info */ 52 52 unsigned num_displays; /* number of defined displays */ 53 53 unsigned default_display; 54 54
+1 -1
arch/arm/plat-samsung/include/plat/gpio-cfg.h
··· 35 35 * struct samsung_gpio_cfg GPIO configuration 36 36 * @cfg_eint: Configuration setting when used for external interrupt source 37 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 39 * @set_config: Set the current configuration for the GPIO 40 40 * @get_config: Read the current configuration for the GPIO 41 41 *
+1 -1
arch/arm/plat-samsung/pm-check.c
··· 5 5 * http://armlinux.simtec.co.uk 6 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 10 * This program is free software; you can redistribute it and/or modify 11 11 * it under the terms of the GNU General Public License version 2 as
+4 -4
arch/arm/plat-samsung/pm-common.c
··· 31 31 void s3c_pm_do_save(struct sleep_save *ptr, int count) 32 32 { 33 33 for (; count > 0; count--, ptr++) { 34 - ptr->val = __raw_readl(ptr->reg); 34 + ptr->val = readl_relaxed(ptr->reg); 35 35 S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val); 36 36 } 37 37 } ··· 51 51 { 52 52 for (; count > 0; count--, ptr++) { 53 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 71 void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) 72 72 { 73 73 for (; count > 0; count--, ptr++) 74 - __raw_writel(ptr->val, ptr->reg); 74 + writel_relaxed(ptr->val, ptr->reg); 75 75 }
+1 -1
arch/arm/plat-samsung/watchdog-reset.c
··· 3 3 * Copyright (c) 2008 Simtec Electronics 4 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 8 * Watchdog reset support for Samsung SoCs. 9 9 *