From patchwork Sat Apr 20 16:42:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Dunn X-Patchwork-Id: 238157 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 282E32C0158 for ; Sun, 21 Apr 2013 02:43:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7BBC74A33B; Sat, 20 Apr 2013 18:43:00 +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 XZaD-T7usItX; Sat, 20 Apr 2013 18:42:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4F564A294; Sat, 20 Apr 2013 18:42:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 45F454A294 for ; Sat, 20 Apr 2013 18:42:57 +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 WG+XvySMZLEh for ; Sat, 20 Apr 2013 18:42:54 +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 56C284A289 for ; Sat, 20 Apr 2013 18:42:51 +0200 (CEST) Received: from localhost.localdomain (29.sub-70-199-128.myvzw.com [70.199.128.29]) by smtp.newsguy.com (8.14.3/8.14.3) with ESMTP id r3KGgf4R085183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Apr 2013 09:42:42 -0700 (PDT) (envelope-from mikedunn@newsguy.com) From: Mike Dunn To: u-boot@lists.denx.de Date: Sat, 20 Apr 2013 09:42:44 -0700 Message-Id: <1366476164-2270-1-git-send-email-mikedunn@newsguy.com> X-Mailer: git-send-email 1.7.8.6 Cc: Marek Vasut , Tomas Cech , Haojian Zhuang Subject: [U-Boot] [PATCH RESEND] 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 --- 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 udc 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(); }