From patchwork Mon Dec 17 11:24:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13624 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5993C23E11 for ; Mon, 17 Dec 2012 11:31:48 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id F3746A1970B for ; Mon, 17 Dec 2012 11:31:47 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so5141256iag.11 for ; Mon, 17 Dec 2012 03:31:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=3NauMGJ9QooMIS7srPP6OMqjG+ZMJcPb5f7NSPYMoF4=; b=cLyeXJaleJTMDaYjTdT0TZsV8NVK2s1JXNf5YOB2AstHnFY3epm5ReqLdm5rV2UisV S0czv2RHFVW3Vf690jrWbzFGaWnUTW2ewrJbxWN5HlKRqIJ5WCCtHtH6TWZi8t2HIYm9 VA1l02ZmK4U6sPWatHSH5sj8lA9yrPdC/qbl17dmQx99pu30v7JowNZmh8aWFzlcWPuR 8WkSqYPkkvC98NLTWH7kb7DiBFIAriIXpV7sfoUEbSOEZ0oe7CPsd5dEdZRvPjYzXm2q eFx4gEs6bU225FTLfc8Kx0QflV6E27DI2a134rEMdniBjNUEDlUDwTlf2TeBQxZPBqQx qifg== Received: by 10.42.48.147 with SMTP id s19mr3690782icf.18.1355743907354; Mon, 17 Dec 2012 03:31:47 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp67832igt; Mon, 17 Dec 2012 03:31:46 -0800 (PST) Received: by 10.68.223.131 with SMTP id qu3mr42416748pbc.89.1355743906531; Mon, 17 Dec 2012 03:31:46 -0800 (PST) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx.google.com with ESMTPS id qu6si12735127pbc.345.2012.12.17.03.31.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 03:31:46 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f54.google.com with SMTP id wz12so3577677pbc.41 for ; Mon, 17 Dec 2012 03:31:46 -0800 (PST) Received: by 10.66.90.1 with SMTP id bs1mr41752413pab.19.1355743906129; Mon, 17 Dec 2012 03:31:46 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kn3sm300177pbc.3.2012.12.17.03.31.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 03:31:45 -0800 (PST) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, patches@linaro.org, sachin.kamat@linaro.org Subject: [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Date: Mon, 17 Dec 2012 16:54:19 +0530 Message-Id: <1355743461-21535-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnykvGfXzZ69QszYWes3rTLoPE9mIz5WK5gNOS7HMOvF6/X8xiWcKcugjK3N6SKAPFunnA3 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 --- arch/arm/mach-exynos/mach-origen.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index e6f4191..5e34b9c 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