aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-05-27 22:26:30 -0400
committerOlof Johansson <olof@lixom.net>2013-05-27 22:26:30 -0400
commit81c0d9047f204b1c08034a5815a5cddfbb4bee1f (patch)
tree801b7b365306dc24e2b6d1e9eedd3a7a663349d2 /arch
parentf4ae176c626311d6507c9a2d263657c4cc4e1667 (diff)
parent15f504f0c2038b9a0f1569c9ce34def61f0c65be (diff)
Merge tag 'samsung-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
From Kukjin Kim: Fixes following for v3.10 - to get usb2 working on the Chromebook with adding the usb phy node for usb2 on exynos5250 - supporting exynos4210 rev0 SoC - exynos5440 restart applying only to powered-on domains - drm-exynos probe failure with adding resource names to fimd0 platform device * tag 'samsung-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: SAMSUNG: Add names to fimd0 IRQ resources ARM: EXYNOS: fix software reset logic for EXYNOS5440 SOC ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC ARM: dts: Enabling samsung-usb2phy driver for exynos5250
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi15
-rw-r--r--arch/arm/mach-exynos/Kconfig3
-rw-r--r--arch/arm/mach-exynos/common.c39
-rw-r--r--arch/arm/mach-exynos/common.h2
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c5
-rw-r--r--arch/arm/plat-samsung/devs.c6
6 files changed, 61 insertions, 9 deletions
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 98dfc3ea5c0b..0673524238a6 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -497,6 +497,21 @@
497 clock-names = "usbhost"; 497 clock-names = "usbhost";
498 }; 498 };
499 499
500 usbphy@12130000 {
501 compatible = "samsung,exynos5250-usb2phy";
502 reg = <0x12130000 0x100>;
503 clocks = <&clock 1>, <&clock 285>;
504 clock-names = "ext_xtal", "usbhost";
505 #address-cells = <1>;
506 #size-cells = <1>;
507 ranges;
508
509 usbphy-sys {
510 reg = <0x10040704 0x8>,
511 <0x10050230 0x4>;
512 };
513 };
514
500 amba { 515 amba {
501 #address-cells = <1>; 516 #address-cells = <1>;
502 #size-cells = <1>; 517 #size-cells = <1>;
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d19edff0ea6e..ff18fc2ea46f 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -250,6 +250,7 @@ config MACH_ARMLEX4210
250config MACH_UNIVERSAL_C210 250config MACH_UNIVERSAL_C210
251 bool "Mobile UNIVERSAL_C210 Board" 251 bool "Mobile UNIVERSAL_C210 Board"
252 select CLKSRC_MMIO 252 select CLKSRC_MMIO
253 select CLKSRC_SAMSUNG_PWM
253 select CPU_EXYNOS4210 254 select CPU_EXYNOS4210
254 select EXYNOS4_SETUP_FIMC 255 select EXYNOS4_SETUP_FIMC
255 select EXYNOS4_SETUP_FIMD0 256 select EXYNOS4_SETUP_FIMD0
@@ -281,7 +282,6 @@ config MACH_UNIVERSAL_C210
281 select S5P_DEV_TV 282 select S5P_DEV_TV
282 select S5P_GPIO_INT 283 select S5P_GPIO_INT
283 select S5P_SETUP_MIPIPHY 284 select S5P_SETUP_MIPIPHY
284 select SAMSUNG_HRT
285 help 285 help
286 Machine support for Samsung Mobile Universal S5PC210 Reference 286 Machine support for Samsung Mobile Universal S5PC210 Reference
287 Board. 287 Board.
@@ -410,6 +410,7 @@ config MACH_EXYNOS4_DT
410 depends on ARCH_EXYNOS4 410 depends on ARCH_EXYNOS4
411 select ARM_AMBA 411 select ARM_AMBA
412 select CLKSRC_OF 412 select CLKSRC_OF
413 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
413 select CPU_EXYNOS4210 414 select CPU_EXYNOS4210
414 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD 415 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
415 select PINCTRL 416 select PINCTRL
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 745e304ad0de..027c9e7f0d13 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -10,12 +10,14 @@
10 */ 10 */
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/bitops.h>
13#include <linux/interrupt.h> 14#include <linux/interrupt.h>
14#include <linux/irq.h> 15#include <linux/irq.h>
15#include <linux/irqchip.h> 16#include <linux/irqchip.h>
16#include <linux/io.h> 17#include <linux/io.h>
17#include <linux/device.h> 18#include <linux/device.h>
18#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <clocksource/samsung_pwm.h>
19#include <linux/sched.h> 21#include <linux/sched.h>
20#include <linux/serial_core.h> 22#include <linux/serial_core.h>
21#include <linux/of.h> 23#include <linux/of.h>
@@ -302,6 +304,13 @@ static struct map_desc exynos5440_iodesc0[] __initdata = {
302 }, 304 },
303}; 305};
304 306
307static struct samsung_pwm_variant exynos4_pwm_variant = {
308 .bits = 32,
309 .div_base = 0,
310 .has_tint_cstat = true,
311 .tclk_mask = 0,
312};
313
305void exynos4_restart(char mode, const char *cmd) 314void exynos4_restart(char mode, const char *cmd)
306{ 315{
307 __raw_writel(0x1, S5P_SWRESET); 316 __raw_writel(0x1, S5P_SWRESET);
@@ -317,9 +326,16 @@ void exynos5_restart(char mode, const char *cmd)
317 val = 0x1; 326 val = 0x1;
318 addr = EXYNOS_SWRESET; 327 addr = EXYNOS_SWRESET;
319 } else if (of_machine_is_compatible("samsung,exynos5440")) { 328 } else if (of_machine_is_compatible("samsung,exynos5440")) {
329 u32 status;
320 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"); 330 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
331
332 addr = of_iomap(np, 0) + 0xbc;
333 status = __raw_readl(addr);
334
321 addr = of_iomap(np, 0) + 0xcc; 335 addr = of_iomap(np, 0) + 0xcc;
322 val = (0xfff << 20) | (0x1 << 16); 336 val = __raw_readl(addr);
337
338 val = (val & 0xffff0000) | (status & 0xffff);
323 } else { 339 } else {
324 pr_err("%s: cannot support non-DT\n", __func__); 340 pr_err("%s: cannot support non-DT\n", __func__);
325 return; 341 return;
@@ -442,8 +458,20 @@ static void __init exynos5440_map_io(void)
442 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); 458 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
443} 459}
444 460
461void __init exynos_set_timer_source(u8 channels)
462{
463 exynos4_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
464 exynos4_pwm_variant.output_mask &= ~channels;
465}
466
445void __init exynos_init_time(void) 467void __init exynos_init_time(void)
446{ 468{
469 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
470 EXYNOS4_IRQ_TIMER0_VIC, EXYNOS4_IRQ_TIMER1_VIC,
471 EXYNOS4_IRQ_TIMER2_VIC, EXYNOS4_IRQ_TIMER3_VIC,
472 EXYNOS4_IRQ_TIMER4_VIC,
473 };
474
447 if (of_have_populated_dt()) { 475 if (of_have_populated_dt()) {
448#ifdef CONFIG_OF 476#ifdef CONFIG_OF
449 of_clk_init(NULL); 477 of_clk_init(NULL);
@@ -455,7 +483,14 @@ void __init exynos_init_time(void)
455 exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1); 483 exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1);
456 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); 484 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
457#endif 485#endif
458 mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1); 486#ifdef CONFIG_CLKSRC_SAMSUNG_PWM
487 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
488 samsung_pwm_clocksource_init(S3C_VA_TIMER,
489 timer_irqs, &exynos4_pwm_variant);
490 else
491#endif
492 mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0,
493 EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1);
459 } 494 }
460} 495}
461 496
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 60dd35cc01a6..11fc1e29819b 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -32,6 +32,8 @@ void exynos4_clk_register_fixed_ext(unsigned long, unsigned long);
32 32
33void exynos_firmware_init(void); 33void exynos_firmware_init(void);
34 34
35void exynos_set_timer_source(u8 channels);
36
35#ifdef CONFIG_PM_GENERIC_DOMAINS 37#ifdef CONFIG_PM_GENERIC_DOMAINS
36int exynos_pm_late_initcall(void); 38int exynos_pm_late_initcall(void);
37#else 39#else
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 327d50d4681d..74ddb2b55614 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -41,7 +41,6 @@
41#include <plat/mfc.h> 41#include <plat/mfc.h>
42#include <plat/sdhci.h> 42#include <plat/sdhci.h>
43#include <plat/fimc-core.h> 43#include <plat/fimc-core.h>
44#include <plat/samsung-time.h>
45#include <plat/camport.h> 44#include <plat/camport.h>
46 45
47#include <mach/map.h> 46#include <mach/map.h>
@@ -1094,7 +1093,7 @@ static void __init universal_map_io(void)
1094{ 1093{
1095 exynos_init_io(NULL, 0); 1094 exynos_init_io(NULL, 0);
1096 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); 1095 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
1097 samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); 1096 exynos_set_timer_source(BIT(2) | BIT(4));
1098 xxti_f = 0; 1097 xxti_f = 0;
1099 xusbxti_f = 24000000; 1098 xusbxti_f = 24000000;
1100} 1099}
@@ -1154,7 +1153,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
1154 .map_io = universal_map_io, 1153 .map_io = universal_map_io,
1155 .init_machine = universal_machine_init, 1154 .init_machine = universal_machine_init,
1156 .init_late = exynos_init_late, 1155 .init_late = exynos_init_late,
1157 .init_time = samsung_timer_init, 1156 .init_time = exynos_init_time,
1158 .reserve = &universal_reserve, 1157 .reserve = &universal_reserve,
1159 .restart = exynos4_restart, 1158 .restart = exynos4_restart,
1160MACHINE_END 1159MACHINE_END
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 30c2fe243f76..0f9c3f431a5f 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -311,9 +311,9 @@ struct platform_device s5p_device_jpeg = {
311#ifdef CONFIG_S5P_DEV_FIMD0 311#ifdef CONFIG_S5P_DEV_FIMD0
312static struct resource s5p_fimd0_resource[] = { 312static struct resource s5p_fimd0_resource[] = {
313 [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K), 313 [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K),
314 [1] = DEFINE_RES_IRQ(IRQ_FIMD0_VSYNC), 314 [1] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_VSYNC, "vsync"),
315 [2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO), 315 [2] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_FIFO, "fifo"),
316 [3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM), 316 [3] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_SYSTEM, "lcd_sys"),
317}; 317};
318 318
319struct platform_device s5p_device_fimd0 = { 319struct platform_device s5p_device_fimd0 = {