From patchwork Mon Sep 7 21:01:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: miguel.aguilar@ridgerun.com X-Patchwork-Id: 46691 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8AMe5CR019352 for ; Thu, 10 Sep 2009 22:40:06 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n87L1ggH007566; Mon, 7 Sep 2009 16:01:47 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n87L1gCD012724; Mon, 7 Sep 2009 16:01:42 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 5D05C80627; Mon, 7 Sep 2009 16:01:41 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 98E0C80626 for ; Mon, 7 Sep 2009 16:01:39 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id n87L1d9Q009519 for ; Mon, 7 Sep 2009 16:01:39 -0500 (CDT) Received: from mail151-tx2-R.bigfish.com (mail-tx2.bigfish.com [65.55.88.114]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id n87L1Y7b029000 for ; Mon, 7 Sep 2009 16:01:39 -0500 Received: from mail151-tx2 (localhost.localdomain [127.0.0.1]) by mail151-tx2-R.bigfish.com (Postfix) with ESMTP id 1D933E881AC for ; Mon, 7 Sep 2009 21:01:34 +0000 (UTC) X-SpamScore: 7 X-BigFish: vps7(zza4b1ozz1202hzzz2fh64h) X-Spam-TCS-SCL: 3:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 74.208.67.6; Service: EHS Received: by mail151-tx2 (MessageSwitch) id 1252357291871598_23665; Mon, 7 Sep 2009 21:01:31 +0000 (UCT) Received: from mail.navvo.net (mail.navvo.net [74.208.67.6]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail151-tx2.bigfish.com (Postfix) with ESMTP id BDBF4D3804F; Mon, 7 Sep 2009 21:01:31 +0000 (UTC) Received: from [201.198.127.70] (helo=localhost.localdomain) by mail.navvo.net with esmtpa (Exim 4.63) (envelope-from ) id 1MklL7-0002r6-Cq; Mon, 07 Sep 2009 16:01:30 -0500 From: miguel.aguilar@ridgerun.com To: davinci-linux-open-source@linux.davincidsp.com, nsnehaprabha@ti.com Date: Mon, 7 Sep 2009 15:01:22 -0600 Message-Id: <1252357282-29527-1-git-send-email-miguel.aguilar@ridgerun.com> X-Mailer: git-send-email 1.6.0.4 X-SA-Exim-Connect-IP: 201.198.127.70 X-SA-Exim-Mail-From: miguel.aguilar@ridgerun.com X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on mail.navvo.net X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.7-deb X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on mail.navvo.net) Cc: santiago.nunez@ridgerun.com, todd.fischer@ridgerun.com, clark.becker@ridgerun.com, Miguel Aguilar Subject: [PATCH 2/2] DaVinci: DM365: Enable USB in DM365 EVM X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Miguel Aguilar This patch was tested on a DM365 EVM rev c, in both USB modes: Host and Gadget. Signed-off-by: Miguel Aguilar --- arch/arm/mach-davinci/board-dm365-evm.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index f6adf79..3a0d404 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -38,6 +38,7 @@ #include #include #include +#include static inline int have_imager(void) @@ -270,6 +271,14 @@ static void dm365evm_mmc_configure(void) davinci_cfg_reg(DM365_SD1_DATA0); } +static void dm365evm_usb_configure(void) +{ + davinci_cfg_reg(DM365_GPIO33); + gpio_request(33, "usb"); + gpio_direction_output(33, 1); + setup_usb(500, 8); +} + static void __init evm_init_i2c(void) { davinci_init_i2c(&i2c_pdata); @@ -471,6 +480,7 @@ static __init void dm365_evm_init(void) dm365evm_emac_configure(); dm365evm_mmc_configure(); + dm365evm_usb_configure(); davinci_setup_mmc(0, &dm365evm_mmc_config);