From patchwork Sun Oct 30 23:32:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert ARIBAUD X-Patchwork-Id: 122693 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 DF25BB6F6F for ; Mon, 31 Oct 2011 10:32:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F0D8C289FB; Mon, 31 Oct 2011 00:32: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 VjblOhVcqvzp; Mon, 31 Oct 2011 00:32:45 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 54F832897B; Mon, 31 Oct 2011 00:32:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8BE722897B for ; Mon, 31 Oct 2011 00:32:42 +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 i3hzsCE02Srl for ; Mon, 31 Oct 2011 00:32:42 +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 7F3C328978 for ; Mon, 31 Oct 2011 00:32:39 +0100 (CET) Received: from lilith.aribaud.net (unknown [82.235.144.2]) by smtp4-g21.free.fr (Postfix) with ESMTP id 79D364C80E8; Mon, 31 Oct 2011 00:32:36 +0100 (CET) From: Albert ARIBAUD To: u-boot@lists.denx.de Date: Mon, 31 Oct 2011 00:32:27 +0100 Message-Id: <1320017547-22299-1-git-send-email-albert.u.boot@aribaud.net> X-Mailer: git-send-email 1.7.5.4 Subject: [U-Boot] [PATCH] 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 slower chips like orion5x. Signed-off-by: Albert ARIBAUD --- 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..75defe7 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(1); /* 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);