From patchwork Fri Apr 12 18:59:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Dunn X-Patchwork-Id: 236178 X-Patchwork-Delegate: marek.vasut@gmail.com 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 AE4972C00B0 for ; Sat, 13 Apr 2013 05:00:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B6A7F4A047; Fri, 12 Apr 2013 21:00:17 +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 9CeQsS3GbIRg; Fri, 12 Apr 2013 21:00:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A0E44A095; Fri, 12 Apr 2013 20:59:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C881A4A040 for ; Fri, 12 Apr 2013 20:59:33 +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 jvciEtPuZiKc for ; Fri, 12 Apr 2013 20:59:27 +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 smtp.newsguy.com (smtp.newsguy.com [74.209.136.69]) by theia.denx.de (Postfix) with ESMTPS id BD31E4A02D for ; Fri, 12 Apr 2013 20:59:25 +0200 (CEST) Received: from localhost.localdomain (83.sub-70-199-131.myvzw.com [70.199.131.83]) by smtp.newsguy.com (8.14.3/8.14.3) with ESMTP id r3CIxDWa073542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Apr 2013 11:59:19 -0700 (PDT) (envelope-from mikedunn@newsguy.com) From: Mike Dunn To: u-boot@lists.denx.de Date: Fri, 12 Apr 2013 11:59:16 -0700 Message-Id: <1365793160-18247-5-git-send-email-mikedunn@newsguy.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1365793160-18247-1-git-send-email-mikedunn@newsguy.com> References: <1365793160-18247-1-git-send-email-mikedunn@newsguy.com> Cc: Marek Vasut , Tomas Cech , Haojian Zhuang Subject: [U-Boot] [PATCH v3 4/8] arm: bootm: call udc_disable() before booting linux 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On the pxa270, if the udc device is not disabled before jumping to linux, the device fails to initialize in linux because it was left in a running state, and the linux driver assumes that it is in a disabled state. Signed-off-by: Mike Dunn Acked-By: Albert ARIBAUD --- Changelog: v3: no change v2: no change Arguably, this is a bug in the linux driver, but it seemed pretty simple and benign to just disable it in u-boot. I'll also send a patch to upstream kernel to fix its driver. arch/arm/include/asm/bootm.h | 1 + arch/arm/lib/bootm.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/bootm.h b/arch/arm/include/asm/bootm.h index db2ff94..68189cc 100644 --- a/arch/arm/include/asm/bootm.h +++ b/arch/arm/include/asm/bootm.h @@ -21,6 +21,7 @@ #ifdef CONFIG_USB_DEVICE extern void udc_disconnect(void); +extern void udc_disable(void); #endif #endif diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index f3b30c5..6daa7bf 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -105,6 +105,7 @@ static void announce_and_cleanup(void) #ifdef CONFIG_USB_DEVICE udc_disconnect(); + udc_disable(); #endif cleanup_before_linux(); }