From patchwork Wed Apr 25 10:40:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donghwa Lee X-Patchwork-Id: 154872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 18AA9B6FA3 for ; Wed, 25 Apr 2012 20:41:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 057AE28213; Wed, 25 Apr 2012 12:41:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dAksDGa35xM1; Wed, 25 Apr 2012 12:41:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B83C628214; Wed, 25 Apr 2012 12:41:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F7A628214 for ; Wed, 25 Apr 2012 12:41:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VW1gpeKZPQde for ; Wed, 25 Apr 2012 12:41:15 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id 166F228213 for ; Wed, 25 Apr 2012 12:41:13 +0200 (CEST) Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M3100CHM6ZS5LS0@mailout2.samsung.com> for u-boot@lists.denx.de; Wed, 25 Apr 2012 19:40:48 +0900 (KST) X-AuditID: cbfee61a-b7b8eae00000534b-f9-4f97d4b07f9b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id 91.2D.21323.0B4D79F4; Wed, 25 Apr 2012 19:40:48 +0900 (KST) Received: from [165.213.219.92] by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M3100E99700EG60@mmp1.samsung.com> for u-boot@lists.denx.de; Wed, 25 Apr 2012 19:40:48 +0900 (KST) Message-id: <4F97D4B0.4060102@samsung.com> Date: Wed, 25 Apr 2012 19:40:48 +0900 From: Donghwa Lee User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-version: 1.0 To: u-boot@lists.denx.de, mk7.kang@samsung.com, Anatolij Gustschin , Kyungmin Park , Donghwa Lee X-Brightmail-Tracker: AAAAAA== X-TM-AS-MML: No Subject: [U-Boot] [PATCH] TRATS: initialize panel_info data structure in board file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de panel_info data structure is global variable, so, I have initialized it in board file. If it is initialized in init_panel_info() like existing, it can't be used in drv_lcd_init() in common/lcd.c because init_panel_info() is called after drv_lcd_init(). Signed-off-by: Donghwa Lee Signed-off-by: Kyungmin Park --- board/samsung/trats/trats.c | 72 ++++++++++++++++++++++-------------------- drivers/video/exynos_fb.c | 3 -- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 3085de1..a569c83 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -455,43 +455,47 @@ static int mipi_power(void) return 0; } -void init_panel_info(vidinfo_t *vid) -{ - vid->vl_freq = 60; - vid->vl_col = 720; - vid->vl_row = 1280; - vid->vl_width = 720; - vid->vl_height = 1280; - vid->vl_clkp = CONFIG_SYS_HIGH; - vid->vl_hsp = CONFIG_SYS_LOW; - vid->vl_vsp = CONFIG_SYS_LOW; - vid->vl_dp = CONFIG_SYS_LOW; - - vid->vl_bpix = 5; - vid->dual_lcd_enabled = 0; +vidinfo_t panel_info = { + .vl_freq = 60, + .vl_col = 720, + .vl_row = 1280, + .vl_width = 720, + .vl_height = 1280, + .vl_clkp = CONFIG_SYS_HIGH, + .vl_hsp = CONFIG_SYS_LOW, + .vl_vsp = CONFIG_SYS_LOW, + .vl_dp = CONFIG_SYS_LOW, + + .vl_bpix = 5, /* Bits per pixel, 2^5 = 32 */ /* s6e8ax0 Panel */ - vid->vl_hspw = 5; - vid->vl_hbpd = 10; - vid->vl_hfpd = 10; - - vid->vl_vspw = 2; - vid->vl_vbpd = 1; - vid->vl_vfpd = 13; - vid->vl_cmd_allow_len = 0xf; - - vid->win_id = 3; - vid->cfg_gpio = NULL; - vid->backlight_on = NULL; - vid->lcd_power_on = NULL; /* lcd_power_on in mipi dsi driver */ - vid->reset_lcd = lcd_reset; - - vid->init_delay = 0; - vid->power_on_delay = 0; - vid->reset_delay = 0; - vid->interface_mode = FIMD_RGB_INTERFACE; - vid->mipi_enabled = 1; + .vl_hspw = 5, + .vl_hbpd = 10, + .vl_hfpd = 10, + + .vl_vspw = 2, + .vl_vbpd = 1, + .vl_vfpd = 13, + .vl_cmd_allow_len = 0xf, + + .win_id = 3, + .cfg_gpio = NULL, + .backlight_on = NULL, + .lcd_power_on = NULL, /* lcd_power_on in mipi dsi driver */ + .reset_lcd = lcd_reset, + + .init_delay = 0, + .power_on_delay = 0, + .reset_delay = 0, + .interface_mode = FIMD_RGB_INTERFACE, + .mipi_enabled = 1, + .boot_logo_on = 1, + .logo_height = TIZEN_LOGO_HEIGHT, + .logo_width = TIZEN_LOGO_WIDTH, +}; +void init_panel_info(vidinfo_t *vid) +{ strcpy(s6e8ax0_platform_data.lcd_panel_name, mipi_lcd_device.name); s6e8ax0_platform_data.lcd_power = lcd_power; s6e8ax0_platform_data.mipi_power = mipi_power; diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index a1cf449..96a8ec1 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -44,9 +44,6 @@ short console_row; static unsigned int panel_width, panel_height; -/* LCD Panel data */ -vidinfo_t panel_info; - static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid) { unsigned long palette_size;