Commit 81c0d904 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'samsung-fixes-3' of...

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
parents f4ae176c 15f504f0
...@@ -497,6 +497,21 @@ usb@12120000 { ...@@ -497,6 +497,21 @@ usb@12120000 {
clock-names = "usbhost"; clock-names = "usbhost";
}; };
usbphy@12130000 {
compatible = "samsung,exynos5250-usb2phy";
reg = <0x12130000 0x100>;
clocks = <&clock 1>, <&clock 285>;
clock-names = "ext_xtal", "usbhost";
#address-cells = <1>;
#size-cells = <1>;
ranges;
usbphy-sys {
reg = <0x10040704 0x8>,
<0x10050230 0x4>;
};
};
amba { amba {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
......
...@@ -250,6 +250,7 @@ config MACH_ARMLEX4210 ...@@ -250,6 +250,7 @@ config MACH_ARMLEX4210
config MACH_UNIVERSAL_C210 config MACH_UNIVERSAL_C210
bool "Mobile UNIVERSAL_C210 Board" bool "Mobile UNIVERSAL_C210 Board"
select CLKSRC_MMIO select CLKSRC_MMIO
select CLKSRC_SAMSUNG_PWM
select CPU_EXYNOS4210 select CPU_EXYNOS4210
select EXYNOS4_SETUP_FIMC select EXYNOS4_SETUP_FIMC
select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_FIMD0
...@@ -281,7 +282,6 @@ config MACH_UNIVERSAL_C210 ...@@ -281,7 +282,6 @@ config MACH_UNIVERSAL_C210
select S5P_DEV_TV select S5P_DEV_TV
select S5P_GPIO_INT select S5P_GPIO_INT
select S5P_SETUP_MIPIPHY select S5P_SETUP_MIPIPHY
select SAMSUNG_HRT
help help
Machine support for Samsung Mobile Universal S5PC210 Reference Machine support for Samsung Mobile Universal S5PC210 Reference
Board. Board.
...@@ -410,6 +410,7 @@ config MACH_EXYNOS4_DT ...@@ -410,6 +410,7 @@ config MACH_EXYNOS4_DT
depends on ARCH_EXYNOS4 depends on ARCH_EXYNOS4
select ARM_AMBA select ARM_AMBA
select CLKSRC_OF select CLKSRC_OF
select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
select CPU_EXYNOS4210 select CPU_EXYNOS4210
select KEYBOARD_SAMSUNG if INPUT_KEYBOARD select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
select PINCTRL select PINCTRL
......
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <clocksource/samsung_pwm.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -302,6 +304,13 @@ static struct map_desc exynos5440_iodesc0[] __initdata = { ...@@ -302,6 +304,13 @@ static struct map_desc exynos5440_iodesc0[] __initdata = {
}, },
}; };
static struct samsung_pwm_variant exynos4_pwm_variant = {
.bits = 32,
.div_base = 0,
.has_tint_cstat = true,
.tclk_mask = 0,
};
void exynos4_restart(char mode, const char *cmd) void exynos4_restart(char mode, const char *cmd)
{ {
__raw_writel(0x1, S5P_SWRESET); __raw_writel(0x1, S5P_SWRESET);
...@@ -317,9 +326,16 @@ void exynos5_restart(char mode, const char *cmd) ...@@ -317,9 +326,16 @@ void exynos5_restart(char mode, const char *cmd)
val = 0x1; val = 0x1;
addr = EXYNOS_SWRESET; addr = EXYNOS_SWRESET;
} else if (of_machine_is_compatible("samsung,exynos5440")) { } else if (of_machine_is_compatible("samsung,exynos5440")) {
u32 status;
np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"); np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
addr = of_iomap(np, 0) + 0xbc;
status = __raw_readl(addr);
addr = of_iomap(np, 0) + 0xcc; addr = of_iomap(np, 0) + 0xcc;
val = (0xfff << 20) | (0x1 << 16); val = __raw_readl(addr);
val = (val & 0xffff0000) | (status & 0xffff);
} else { } else {
pr_err("%s: cannot support non-DT\n", __func__); pr_err("%s: cannot support non-DT\n", __func__);
return; return;
...@@ -442,8 +458,20 @@ static void __init exynos5440_map_io(void) ...@@ -442,8 +458,20 @@ static void __init exynos5440_map_io(void)
iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
} }
void __init exynos_set_timer_source(u8 channels)
{
exynos4_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
exynos4_pwm_variant.output_mask &= ~channels;
}
void __init exynos_init_time(void) void __init exynos_init_time(void)
{ {
unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
EXYNOS4_IRQ_TIMER0_VIC, EXYNOS4_IRQ_TIMER1_VIC,
EXYNOS4_IRQ_TIMER2_VIC, EXYNOS4_IRQ_TIMER3_VIC,
EXYNOS4_IRQ_TIMER4_VIC,
};
if (of_have_populated_dt()) { if (of_have_populated_dt()) {
#ifdef CONFIG_OF #ifdef CONFIG_OF
of_clk_init(NULL); of_clk_init(NULL);
...@@ -455,7 +483,14 @@ void __init exynos_init_time(void) ...@@ -455,7 +483,14 @@ void __init exynos_init_time(void)
exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1); exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1);
exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
#endif #endif
mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1); #ifdef CONFIG_CLKSRC_SAMSUNG_PWM
if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
samsung_pwm_clocksource_init(S3C_VA_TIMER,
timer_irqs, &exynos4_pwm_variant);
else
#endif
mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0,
EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1);
} }
} }
......
...@@ -32,6 +32,8 @@ void exynos4_clk_register_fixed_ext(unsigned long, unsigned long); ...@@ -32,6 +32,8 @@ void exynos4_clk_register_fixed_ext(unsigned long, unsigned long);
void exynos_firmware_init(void); void exynos_firmware_init(void);
void exynos_set_timer_source(u8 channels);
#ifdef CONFIG_PM_GENERIC_DOMAINS #ifdef CONFIG_PM_GENERIC_DOMAINS
int exynos_pm_late_initcall(void); int exynos_pm_late_initcall(void);
#else #else
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <plat/mfc.h> #include <plat/mfc.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/fimc-core.h> #include <plat/fimc-core.h>
#include <plat/samsung-time.h>
#include <plat/camport.h> #include <plat/camport.h>
#include <mach/map.h> #include <mach/map.h>
...@@ -1094,7 +1093,7 @@ static void __init universal_map_io(void) ...@@ -1094,7 +1093,7 @@ static void __init universal_map_io(void)
{ {
exynos_init_io(NULL, 0); exynos_init_io(NULL, 0);
s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); exynos_set_timer_source(BIT(2) | BIT(4));
xxti_f = 0; xxti_f = 0;
xusbxti_f = 24000000; xusbxti_f = 24000000;
} }
...@@ -1154,7 +1153,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") ...@@ -1154,7 +1153,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
.map_io = universal_map_io, .map_io = universal_map_io,
.init_machine = universal_machine_init, .init_machine = universal_machine_init,
.init_late = exynos_init_late, .init_late = exynos_init_late,
.init_time = samsung_timer_init, .init_time = exynos_init_time,
.reserve = &universal_reserve, .reserve = &universal_reserve,
.restart = exynos4_restart, .restart = exynos4_restart,
MACHINE_END MACHINE_END
...@@ -311,9 +311,9 @@ struct platform_device s5p_device_jpeg = { ...@@ -311,9 +311,9 @@ struct platform_device s5p_device_jpeg = {
#ifdef CONFIG_S5P_DEV_FIMD0 #ifdef CONFIG_S5P_DEV_FIMD0
static struct resource s5p_fimd0_resource[] = { static struct resource s5p_fimd0_resource[] = {
[0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K), [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K),
[1] = DEFINE_RES_IRQ(IRQ_FIMD0_VSYNC), [1] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_VSYNC, "vsync"),
[2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO), [2] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_FIFO, "fifo"),
[3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM), [3] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_SYSTEM, "lcd_sys"),
}; };
struct platform_device s5p_device_fimd0 = { struct platform_device s5p_device_fimd0 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment