From patchwork Mon Jan 16 08:08:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert ARIBAUD X-Patchwork-Id: 136253 X-Patchwork-Delegate: albert.aribaud@free.fr 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 0C142B6EFF for ; Mon, 16 Jan 2012 19:09:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8BA002818B; Mon, 16 Jan 2012 09:09:21 +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 t6b17he5U8jn; Mon, 16 Jan 2012 09:09:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4DBA828168; Mon, 16 Jan 2012 09:09:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9BF8028179 for ; Mon, 16 Jan 2012 09:09:12 +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 utLKUhUyggTH for ; Mon, 16 Jan 2012 09:09:12 +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 smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by theia.denx.de (Postfix) with ESMTP id 6D98328189 for ; Mon, 16 Jan 2012 09:09:10 +0100 (CET) Received: from lilith.aribaud.net (unknown [82.235.144.2]) by smtp4-g21.free.fr (Postfix) with ESMTP id A5E604C8347; Mon, 16 Jan 2012 09:09:06 +0100 (CET) From: Albert ARIBAUD To: u-boot@lists.denx.de Date: Mon, 16 Jan 2012 09:08:40 +0100 Message-Id: <1326701321-28185-4-git-send-email-albert.u.boot@aribaud.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1326701321-28185-3-git-send-email-albert.u.boot@aribaud.net> References: <1326701321-28185-1-git-send-email-albert.u.boot@aribaud.net> <1326701321-28185-2-git-send-email-albert.u.boot@aribaud.net> <1326701321-28185-3-git-send-email-albert.u.boot@aribaud.net> Subject: [U-Boot] [PATCH 3/4] orion5x: add USB host ehci-marvell support 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 Signed-off-by: Albert ARIBAUD --- arch/arm/include/asm/arch-orion5x/orion5x.h | 12 ++++++++++++ drivers/usb/host/ehci-marvell.c | 5 +++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-orion5x/orion5x.h b/arch/arm/include/asm/arch-orion5x/orion5x.h index 18225b9..b0d3368 100644 --- a/arch/arm/include/asm/arch-orion5x/orion5x.h +++ b/arch/arm/include/asm/arch-orion5x/orion5x.h @@ -58,6 +58,18 @@ #define MAX_MVGBE_DEVS 1 #define MVGBE0_BASE ORION5X_EGIGA_BASE +/* Orion5x USB Host controller is port 1 */ +#define MVUSB0_BASE ORION5X_USB20_HOST_PORT_BASE +#define MVUSB0_CPU_ATTR_DRAM_CS0 ORION5X_ATTR_DRAM_CS0 +#define MVUSB0_CPU_ATTR_DRAM_CS1 ORION5X_ATTR_DRAM_CS1 +#define MVUSB0_CPU_ATTR_DRAM_CS2 ORION5X_ATTR_DRAM_CS2 +#define MVUSB0_CPU_ATTR_DRAM_CS3 ORION5X_ATTR_DRAM_CS3 + +/* Kirkwood CPU memory windows */ +#define MVCPU_WIN_CTRL_DATA ORION5X_CPU_WIN_CTRL_DATA +#define MVCPU_WIN_ENABLE ORION5X_WIN_ENABLE +#define MVCPU_WIN_DISABLE ORION5X_WIN_DISABLE + #define CONFIG_MAX_RAM_BANK_SIZE (64*1024*1024) /* include here SoC variants. 5181, 5281, 6183 should go here when diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index e342d78..89c8af7 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -28,7 +28,12 @@ #include "ehci.h" #include "ehci-core.h" #include + +#if defined(CONFIG_KIRKWOOD) #include +#elif defined(CONFIG_ORION5X) +#include +#endif DECLARE_GLOBAL_DATA_PTR;