* [U-Boot] [PATCH] mvsata_ide: add delay after EDMA port reset
@ 2011-10-30 23:32 Albert ARIBAUD
2011-10-31 0:38 ` [U-Boot] [PATCH V2] " Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: Albert ARIBAUD @ 2011-10-30 23:32 UTC (permalink / raw)
To: u-boot
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);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH V2] mvsata_ide: add delay after EDMA port reset
2011-10-30 23:32 [U-Boot] [PATCH] mvsata_ide: add delay after EDMA port reset Albert ARIBAUD
@ 2011-10-31 0:38 ` Albert ARIBAUD
2011-10-31 1:34 ` [U-Boot] [PATCH V2] mvsata_ide: add delay after EDMA port reset -- PLEASE DISREGARD Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: Albert ARIBAUD @ 2011-10-31 0:38 UTC (permalink / raw)
To: u-boot
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 <albert.u.boot@aribaud.net>
---
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);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH V2] mvsata_ide: add delay after EDMA port reset -- PLEASE DISREGARD.
2011-10-31 0:38 ` [U-Boot] [PATCH V2] " Albert ARIBAUD
@ 2011-10-31 1:34 ` Albert ARIBAUD
0 siblings, 0 replies; 3+ messages in thread
From: Albert ARIBAUD @ 2011-10-31 1:34 UTC (permalink / raw)
To: u-boot
Le 31/10/2011 01:38, Albert ARIBAUD a ?crit :
> 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<albert.u.boot@aribaud.net>
Please disregard my fit of 'post hoc ergo propter hoc' -- actually, IDE
works just fine on Orion without this "fix" of mine; the issues I have
with IDE sometimes not responding are due to some meddling from a CPLD
on the ED Mini V2, not to any timing associated with this patch.
I've marked V1 and V2 as Rejected in patchwork.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-31 1:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-30 23:32 [U-Boot] [PATCH] mvsata_ide: add delay after EDMA port reset Albert ARIBAUD
2011-10-31 0:38 ` [U-Boot] [PATCH V2] " Albert ARIBAUD
2011-10-31 1:34 ` [U-Boot] [PATCH V2] mvsata_ide: add delay after EDMA port reset -- PLEASE DISREGARD Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox