From patchwork Sat Nov 3 16:17:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Yanok X-Patchwork-Id: 196881 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 566722C00B4 for ; Sun, 4 Nov 2012 03:19:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B86734A17C; Sat, 3 Nov 2012 17:18:45 +0100 (CET) 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 iK77AiU5Ggrq; Sat, 3 Nov 2012 17:18:45 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B6314A151; Sat, 3 Nov 2012 17:17:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 953094A0EB for ; Sat, 3 Nov 2012 17:17:44 +0100 (CET) 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 oTH4aqnExR1G for ; Sat, 3 Nov 2012 17:17:43 +0100 (CET) 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 mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by theia.denx.de (Postfix) with ESMTPS id 7F3B94A0C6 for ; Sat, 3 Nov 2012 17:17:24 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id d4so2573914eek.3 for ; Sat, 03 Nov 2012 09:17:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ouNAWPUskqKAiWke4pJLek7WMLXJh5il467BObTOR3U=; b=EoJOknTdNAQDudX4DAF0KPR7u5uHFDU4o345NBHrw2/aHKGxsvnn0jTJXe+nMUp9Me PgImU7RKQX4yMzNwL+SS1aTWoEDxH7NpKEnRc6Nx6lC/lcMAw3hEE1VVwsOdWH4AOn+F iu8NtSO4Kec9g1oWy97VkDUiFkvwPW9lf0T1VoBtwX1a7cZcbP6x7l047w+sNjVQiE0a hOtoHhilLQjb12uEOJdZbtW+BfkNUZuxFhjklMHQSVGhRFmKLp5nIeedu5Hu9guB2FLc +VY39pZ/+HFk6MiOxTO8sFk0akqYlmUQJDhDJ80kASl9gu0TIKUAxyv3bEL5SvvxhV5M fzqw== Received: by 10.14.172.195 with SMTP id t43mr18426481eel.17.1351959444343; Sat, 03 Nov 2012 09:17:24 -0700 (PDT) Received: from chekhov.mobile.usilu.net (nat184.lu.usi.ch. [195.176.178.184]) by mx.google.com with ESMTPS id c6sm32657069eep.17.2012.11.03.09.17.23 (version=SSLv3 cipher=OTHER); Sat, 03 Nov 2012 09:17:23 -0700 (PDT) From: Ilya Yanok To: u-boot@lists.denx.de, Marek Vasut , Tom Rini Date: Sat, 3 Nov 2012 17:17:07 +0100 Message-Id: <1351959428-13024-13-git-send-email-ilya.yanok@cogentembedded.com> X-Mailer: git-send-email 1.7.10.2 (Apple Git-33) In-Reply-To: <1351959428-13024-1-git-send-email-ilya.yanok@cogentembedded.com> References: <1351959428-13024-1-git-send-email-ilya.yanok@cogentembedded.com> X-Gm-Message-State: ALoCoQlwxeLuXCb3HL047r3EkLAE8h7gc6/ltk2X87vEfh7CybK/g0Oj3Oc1aRTfDKUIx4ACsv1K Cc: Ilya Yanok Subject: [U-Boot] [PATCH v4 12/13] omap3_beagle: add musb-new init 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 Add initialization for new MUSB framework. Signed-off-by: Ilya Yanok --- board/ti/beagle/beagle.c | 43 ++++++++++++++++++++++++++++++++++++++++ include/configs/omap3_beagle.h | 2 ++ 2 files changed, 45 insertions(+) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 6175e1d..f20ebed 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -42,6 +42,11 @@ #include #include #include +#include +#include +#include +#include +#include #include "beagle.h" #include @@ -285,6 +290,33 @@ static void beagle_dvi_pup(void) } #endif +#ifdef CONFIG_USB_MUSB_OMAP2PLUS +static struct musb_hdrc_config musb_config = { + .multipoint = 1, + .dyn_fifo = 1, + .num_eps = 16, + .ram_bits = 12, +}; + +static struct omap_musb_board_data musb_board_data = { + .interface_type = MUSB_INTERFACE_ULPI, +}; + +static struct musb_hdrc_platform_data musb_plat = { +#if defined(CONFIG_MUSB_HOST) + .mode = MUSB_HOST, +#elif defined(CONFIG_MUSB_GADGET) + .mode = MUSB_PERIPHERAL, +#else +#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET" +#endif + .config = &musb_config, + .power = 100, + .platform_ops = &omap2430_ops, + .board_data = &musb_board_data, +}; +#endif + /* * Routine: misc_init_r * Description: Configure board specific parts @@ -466,6 +498,10 @@ int misc_init_r(void) omap3_dss_enable(); #endif +#ifdef CONFIG_USB_MUSB_OMAP2PLUS + musb_register(&musb_plat, &musb_board_data, (void *)MUSB_BASE); +#endif + return 0; } @@ -513,3 +549,10 @@ int ehci_hcd_stop(int index) } #endif /* CONFIG_USB_EHCI */ + +#if defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET) +int board_eth_init(bd_t *bis) +{ + return usb_eth_initialize(bis); +} +#endif diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index f79f996..e3ed8ea 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -120,6 +120,8 @@ #define CONFIG_MUSB_UDC 1 #define CONFIG_USB_OMAP3 1 #define CONFIG_TWL4030_USB 1 +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETHER_RNDIS /* USB device configuration */ #define CONFIG_USB_DEVICE 1