From 8001d4ed8b1c894f2d4cffe15d93ebd74c1e7901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=A1lvez?= Date: Fri, 14 Dec 2018 11:36:57 +0100 Subject: [PATCH] Correct speed setting in ACP_CONFIG register Using a negative number to set the device as not existing was incorrect, we set the device as a slow device (3) and set the "not wait" bit like BaS CodeWarrior does. --- sys/ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ide.c b/sys/ide.c index abead7f..951692d 100644 --- a/sys/ide.c +++ b/sys/ide.c @@ -165,6 +165,6 @@ void set_ide_access_mode(void) pio_cycle_time = test_drive(IDE_2ND_INTERFACE); speed = get_speed(pio_cycle_time); #endif - speed = 0x0f; /* -1 (drive or card not present) */ + speed = 11; /* 0b1011 (default access (3) mode not wait (+8)) */ ACP_CONFIG_REG = (ACP_CONFIG_REG & 0xff0fffff) | (speed << 20); };