From patchwork Mon Oct 31 00:38:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert ARIBAUD X-Patchwork-Id: 122695 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 21A71B6F67 for ; Mon, 31 Oct 2011 11:39:07 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BAC44289E6; Mon, 31 Oct 2011 01:39:05 +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 kLhtS2i7DKVm; Mon, 31 Oct 2011 01:39:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A335C289DC; Mon, 31 Oct 2011 01:39:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6A297289DC for ; Mon, 31 Oct 2011 01:38:59 +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 HtzwdqInN6Lv for ; Mon, 31 Oct 2011 01:38:58 +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 2DC9328937 for ; Mon, 31 Oct 2011 01:38:56 +0100 (CET) Received: from lilith.aribaud.net (unknown [82.235.144.2]) by smtp4-g21.free.fr (Postfix) with ESMTP id 595B34C80DE; Mon, 31 Oct 2011 01:38:53 +0100 (CET) From: Albert ARIBAUD To: u-boot@lists.denx.de Date: Mon, 31 Oct 2011 01:38:42 +0100 Message-Id: <1320021522-20525-1-git-send-email-albert.u.boot@aribaud.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1320017547-22299-1-git-send-email-albert.u.boot@aribaud.net> References: <1320017547-22299-1-git-send-email-albert.u.boot@aribaud.net> Subject: [U-Boot] [PATCH V2] mvsata_ide: add delay after EDMA port reset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Although fast SoCs like kirkwood can cope without it, this delay is required by orion5x-based chips, either because they are slower, or because they run U-Boot from NOR, or both. Signed-off-by: Albert ARIBAUD --- Patch history: V2: increase delay to 10 us for reliable ide reset from NOR FLASH V1: initial submission Commit 70c55f5ab324d43093f1c8745462d92042b7306d had introduced resetting the EDMA port on IDE reset. This obviously worked for kirkwoods, but not for orion5x Ed Mini V2, where it made ide_reset() fail. Adding a slight delay after returning port from reset to normal mode made ide_reset() work again correctly. Please check and confirm it does not break kirkwoods! drivers/block/mvsata_ide.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/block/mvsata_ide.c b/drivers/block/mvsata_ide.c index 1be395f..cd602f1 100644 --- a/drivers/block/mvsata_ide.c +++ b/drivers/block/mvsata_ide.c @@ -122,6 +122,7 @@ static int mvsata_ide_initialize_port(struct mvsata_port_registers *port) writel(MVSATA_EDMA_CMD_ATA_RST, &port->edma_cmd); udelay(25); /* taken from original marvell port */ writel(0, &port->edma_cmd); + udelay(10); /* wait after reset was acked -- required for orion5x */ /* Set control IPM to 3 (no low power) and DET to 1 (initialize) */ control = readl(&port->scontrol);