[PATCH 10/31] swim: Add track zero recalibration delay

From: Finn Thain

Date: Thu Jul 16 2026 - 06:31:39 EST


The UPD72070 spec indicates that the track zero sensor can take 3 ms
to stabilize following a STEP command so add a call to msleep().
Remove the duplicate swim_readbit() call as there's no need for that
once the sensor signal has stabilized.

Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
---
drivers/block/swim.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 76f6cfa68432..9755b86d4dd4 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -402,16 +402,15 @@ static inline int swim_track00(struct swim __iomem *base)
for (try = 0; try < 100; try++) {

swim_select(base, RELAX);
+ msleep(3);
+
if (swim_readbit(base, TRACK_ZERO))
- break;
+ return 0;

if (swim_step(base))
- return -1;
+ break;
}

- if (swim_readbit(base, TRACK_ZERO))
- return 0;
-
pr_err("swim: track zero recalibration failed\n");
return -1;
}
--
2.52.0