From ade7ffbb9b6f2ab65e69496bc4076e215e2cd8ba Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 6 Dec 2012 17:02:44 +0900 Subject: ARM: EXYNOS: fix build error when MFC is not selected This fixes following: arch/arm/mach-exynos/built-in.o: In function `exynos5_reserve': arch/arm/mach-exynos/mach-exynos5-dt.c:177: undefined reference to `s5p_fdt_find_mfc_mem' arch/arm/mach-exynos/mach-exynos5-dt.c:177: undefined reference to `s5p_fdt_find_mfc_mem' arch/arm/mach-exynos/mach-exynos5-dt.c:178: undefined reference to `s5p_mfc_reserve_mem' Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index f038c8cadca4..e99d3d8f2bcf 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -163,6 +163,7 @@ static char const *exynos5_dt_compat[] __initdata = { static void __init exynos5_reserve(void) { +#ifdef CONFIG_S5P_DEV_MFC struct s5p_mfc_dt_meminfo mfc_mem; /* Reserve memory for MFC only if it's available */ @@ -170,6 +171,7 @@ static void __init exynos5_reserve(void) if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, mfc_mem.lsize); +#endif } DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") -- cgit v1.2.3 From 12fee1949e2b302009026ce28e4ef6fac721d7ea Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 6 Dec 2012 15:31:10 +0900 Subject: ARM: EXYNOS: fix GIC using for EXYNOS5440 Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index ddd4b72c6f9a..d6d0dc651089 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -679,7 +679,8 @@ void __init exynos5_init_irq(void) * Theses parameters should be NULL and 0 because EXYNOS4 * uses GIC instead of VIC. */ - s5p_init_irq(NULL, 0); + if (!of_machine_is_compatible("samsung,exynos5440")) + s5p_init_irq(NULL, 0); gic_arch_extn.irq_set_wake = s3c_irq_wake; } -- cgit v1.2.3 From 83e877a334eb5ff14f6e822b6f3d8d31b5057be2 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 6 Dec 2012 15:32:14 +0900 Subject: ARM: EXYNOS: fix skip scu_enable() for EXYNOS5440 Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 4ca8ff14a5bf..c5c840e947b8 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -198,7 +198,7 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) { int i; - if (!soc_is_exynos5250()) + if (!(soc_is_exynos5250() || soc_is_exynos5440())) scu_enable(scu_base_addr()); /* -- cgit v1.2.3 From d5c1b541baa43d09206a1f6bcad6b32f50deb8be Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Mon, 10 Dec 2012 10:08:00 +0900 Subject: ARM: SAMSUNG: Add missing include guard to gpio-core.h Signed-off-by: Michael Spang Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/include/plat/gpio-core.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index dfd8b7af8c7a..f7a3ea2c498a 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h @@ -11,6 +11,9 @@ * published by the Free Software Foundation. */ +#ifndef __PLAT_SAMSUNG_GPIO_CORE_H +#define __PLAT_SAMSUNG_GPIO_CORE_H + #define GPIOCON_OFF (0x00) #define GPIODAT_OFF (0x04) @@ -124,3 +127,5 @@ extern struct samsung_gpio_pm samsung_gpio_pm_4bit; /* locking wrappers to deal with multiple access to the same gpio bank */ #define samsung_gpio_lock(_oc, _fl) spin_lock_irqsave(&(_oc)->lock, _fl) #define samsung_gpio_unlock(_oc, _fl) spin_unlock_irqrestore(&(_oc)->lock, _fl) + +#endif /* __PLAT_SAMSUNG_GPIO_CORE_H */ -- cgit v1.2.3 From 479dda22188220acb000310759ed0470b58573e4 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 18 Dec 2012 08:55:12 -0800 Subject: ARM: EXYNOS: Fix NULL pointer dereference bug in Origen When DRM support for Samsung SoC and Samsung S3C framebuffer support are selected, the kernel crashes as it does not get the required platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD to fix this. Without this patch the following crash occurs during bootup: Unable to handle kernel NULL pointer dereference at virtual address 00000000 PC is at 0x0 LR is at s3c_fb_probe+0x198/0x788 [] (s3c_fb_probe+0x198/0x788) from [] (platform_drv_probe+0x18/0x1c) [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x70/0x1f0) [] (driver_probe_device+0x70/0x1f0) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x50/0x7c) [] (bus_for_each_dev+0x50/0x7c) from [] (bus_add_driver+0x170/0x23c) [] (bus_add_driver+0x170/0x23c) from [] (driver_register+0x78/0x144) [] (driver_register+0x78/0x144) from [] (do_one_initcall+0x34/0x174) [] (do_one_initcall+0x34/0x174) from [] (kernel_init+0x100/0x2a0) [] (kernel_init+0x100/0x2a0) from [] (ret_from_fork+0x14/0x3c) Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/mach-origen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index e6f4191cd14c..5e34b9c16196 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -621,7 +621,7 @@ static struct pwm_lookup origen_pwm_lookup[] = { PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL), }; -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD static struct exynos_drm_fimd_pdata drm_fimd_pdata = { .panel = { .timing = { @@ -793,7 +793,7 @@ static void __init origen_machine_init(void) s5p_i2c_hdmiphy_set_platdata(NULL); s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else -- cgit v1.2.3 From bdd1853212609ef1b1826ffc8b43439b0c54b2eb Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 18 Dec 2012 08:55:17 -0800 Subject: ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12 When DRM support for Samsung SoC and Samsung S3C framebuffer support are selected, the kernel crashes as it does not get the required platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD to fix this. Fixes the following boot time crash: Unable to handle kernel NULL pointer dereference at virtual address 00000000 PC is at 0x0 LR is at s3c_fb_probe+0x198/0x788 [] (s3c_fb_probe+0x198/0x788) from [] (platform_drv_probe+0x18/0x1c) [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x70/0x1f0) [] (driver_probe_device+0x70/0x1f0) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x50/0x7c) [] (bus_for_each_dev+0x50/0x7c) from [] (bus_add_driver+0x170/0x23c) [] (bus_add_driver+0x170/0x23c) from [] (driver_register+0x78/0x144) [] (driver_register+0x78/0x144) from [] (do_one_initcall+0x34/0x174) [] (do_one_initcall+0x34/0x174) from [] (kernel_init+0x100/0x2a0) [] (kernel_init+0x100/0x2a0) from [] (ret_from_fork+0x14/0x3c) Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/mach-smdk4x12.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index a1555a73c7af..ae6da40c2aa9 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -246,7 +246,7 @@ static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = { .cols = 8, }; -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD static struct exynos_drm_fimd_pdata drm_fimd_pdata = { .panel = { .timing = { @@ -360,7 +360,7 @@ static void __init smdk4x12_machine_init(void) s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata); -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else -- cgit v1.2.3 From 873673d302e48051c5b90c6e27f86400bdd366ba Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 18 Dec 2012 08:55:20 -0800 Subject: ARM: EXYNOS: Fix NULL pointer dereference bug in SMDKV310 When DRM support for Samsung SoC and Samsung S3C framebuffer support are selected, the kernel crashes as it does not get the required platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD to fix this. Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/mach-smdkv310.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index b7384241fb03..35548e3c097d 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -159,7 +159,7 @@ static struct platform_device smdkv310_lcd_lte480wv = { .dev.platform_data = &smdkv310_lcd_lte480wv_data, }; -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD static struct exynos_drm_fimd_pdata drm_fimd_pdata = { .panel = { .timing = { @@ -402,7 +402,7 @@ static void __init smdkv310_machine_init(void) samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup)); -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else -- cgit v1.2.3 From 454696fdc864aacaab978755d44d73d418c59788 Mon Sep 17 00:00:00 2001 From: Dongjin Kim Date: Tue, 18 Dec 2012 08:57:06 -0800 Subject: ARM: EXYNOS: Fix MSHC clocks instance names Replace clock instance name of MSHC controller for BIC and CIU of Exynos4412. Signed-off-by: Dongjin Kim Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/clock-exynos4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c index efead60b9436..bbcb3dea0d40 100644 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ b/arch/arm/mach-exynos/clock-exynos4.c @@ -529,7 +529,7 @@ static struct clk exynos4_init_clocks_off[] = { .enable = exynos4_clk_ip_fsys_ctrl, .ctrlbit = (1 << 8), }, { - .name = "dwmmc", + .name = "biu", .parent = &exynos4_clk_aclk_133.clk, .enable = exynos4_clk_ip_fsys_ctrl, .ctrlbit = (1 << 9), @@ -1134,7 +1134,7 @@ static struct clksrc_clk exynos4_clksrcs[] = { .reg_div = { .reg = EXYNOS4_CLKDIV_MFC, .shift = 0, .size = 4 }, }, { .clk = { - .name = "sclk_dwmmc", + .name = "ciu", .parent = &exynos4_clk_dout_mmc4.clk, .enable = exynos4_clksrc_mask_fsys_ctrl, .ctrlbit = (1 << 16), -- cgit v1.2.3