From patchwork Fri Jan 28 04:10:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti de Araujo X-Patchwork-Id: 80802 X-Patchwork-Delegate: tim.gardner@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 295B6B70E9 for ; Fri, 28 Jan 2011 19:39:17 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PijrC-0004of-Ej; Fri, 28 Jan 2011 08:39:02 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Piffb-0006yF-1S for kernel-team@lists.ubuntu.com; Fri, 28 Jan 2011 04:10:47 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Piffa-0004cU-Vb; Fri, 28 Jan 2011 04:10:46 +0000 Received: from [201.82.64.149] (helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Piffa-00026O-FZ; Fri, 28 Jan 2011 04:10:46 +0000 From: Ricardo Salveti de Araujo To: kernel-team@lists.ubuntu.com Subject: [Natty] [PATCH 1/2] omap3: beaglexm: fix DVI initialization Date: Fri, 28 Jan 2011 02:10:37 -0200 Message-Id: <1296187838-23021-2-git-send-email-ricardo.salveti@canonical.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1296187838-23021-1-git-send-email-ricardo.salveti@canonical.com> References: <1296187838-23021-1-git-send-email-ricardo.salveti@canonical.com> X-Mailman-Approved-At: Fri, 28 Jan 2011 08:39:01 +0000 Cc: Ricardo Salveti de Araujo X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Function beagle_twl_gpio_setup is called after beagle_display_init, what makes lets reset_gpio with an invalid value at the time it request the gpio. As a side effect the DVI reset GPIO is not properly set. Also removing old code that power down DVI in a hardcoded way, as it's not necessary anymore. Tested with Beagle-xM and C4. Signed-off-by: Ricardo Salveti de Araujo --- arch/arm/mach-omap2/board-omap3beagle.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 685ac06..c8ab478 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -248,6 +248,12 @@ static void __init beagle_display_init(void) { int r; + /* DVI reset GPIO is different between beagle revisions */ + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) + beagle_dvi_device.reset_gpio = 129; + else + beagle_dvi_device.reset_gpio = 170; + r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset"); if (r < 0) { printk(KERN_ERR "Unable to get DVI reset GPIO\n"); @@ -324,12 +330,6 @@ static int beagle_twl_gpio_setup(struct device *dev, else gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); - /* DVI reset GPIO is different between beagle revisions */ - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) - beagle_dvi_device.reset_gpio = 129; - else - beagle_dvi_device.reset_gpio = 170; - /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; @@ -620,11 +620,6 @@ static void __init omap3_beagle_init(void) ARRAY_SIZE(omap3_beagle_devices)); omap_serial_init(); - omap_mux_init_gpio(170, OMAP_PIN_INPUT); - gpio_request(170, "DVI_nPD"); - /* REVISIT leave DVI powered down until it's needed ... */ - gpio_direction_output(170, true); - usb_musb_init(&musb_board_data); usb_ehci_init(&ehci_pdata); omap3beagle_flash_init();