[U-Boot] mvsata_ide: add delay after EDMA port reset

Message ID 1320017547-22299-1-git-send-email-albert.u.boot@aribaud.net
State Rejected
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Albert ARIBAUD Oct. 30, 2011, 11:32 p.m.
Although fast SoCs like kirkwood can cope without it,
this delay is required by slower chips like orion5x.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
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);