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.
This commit is contained in:
David Gálvez
2018-12-14 11:36:57 +01:00
committed by Markus
parent 7a11f284d7
commit 8001d4ed8b

View File

@@ -165,6 +165,6 @@ void set_ide_access_mode(void)
pio_cycle_time = test_drive(IDE_2ND_INTERFACE); pio_cycle_time = test_drive(IDE_2ND_INTERFACE);
speed = get_speed(pio_cycle_time); speed = get_speed(pio_cycle_time);
#endif #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); ACP_CONFIG_REG = (ACP_CONFIG_REG & 0xff0fffff) | (speed << 20);
}; };