diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-16 11:44:11 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-16 11:47:43 -0400 |
commit | 95d6c74627c7a27fe9f5244fcdd9265722c80268 (patch) | |
tree | 9387224915e39bf37a14214f29fe92ee2bc0ba92 | |
parent | 9049d30da9af88c6afde5a057a824e5b5d4034b2 (diff) | |
download | rockbox-95d6c74627.tar.gz rockbox-95d6c74627.zip |
ata: Use PIO0 when ATA_SET_PIO_TIMING is not defined
If we have no way to tell the controller what timing to use, go with
the slowest possible speed.
Change-Id: I1ed3474d8bfecc08cfe4a9e7667f57775fef4d43
-rw-r--r-- | firmware/drivers/ata.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index d82fb173cc..93d53cbfce 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -1102,8 +1102,10 @@ static int set_features(void) { 82, 6, 0xaa, 0 }, /* enable read look-ahead */ }; int i; - int pio_mode = 2; /* Lowest */ + int pio_mode = 0; +#ifdef ATA_SET_PIO_TIMING + pio_mode = 2; /* Find out the highest supported PIO mode */ if (identify_info[53] & (1<<1)) { /* Is word 64 valid? */ if (identify_info[64] & 2) @@ -1111,6 +1113,7 @@ static int set_features(void) else if(identify_info[64] & 1) pio_mode = 3; } +#endif /* Update the table: set highest supported pio mode that we also support */ features[0].parameter = 8 + pio_mode; |