forked from len0rd/rockbox
pp5020: Use DMA Writes by default for SSDs
It is likely that these things accept data far faster than the spinning rust drives ever would, and while there is a question about PIO timings, DMA timings seem to be solid. Change-Id: I70644e0ad85a6ed429c8704e66ca7af91d78765c
This commit is contained in:
parent
886060475e
commit
4b423e21f6
1 changed files with 4 additions and 6 deletions
|
@ -173,15 +173,13 @@ bool ata_dma_setup(void *addr, unsigned long bytes, bool write) {
|
|||
return false;
|
||||
|
||||
/* Writes only need to be word-aligned, but by default DMA
|
||||
* is not used for writing as it appears to be slower.
|
||||
* is not used for writing on non-SSDs as it appears to be slower.
|
||||
*/
|
||||
#ifdef ATA_DMA_WRITES
|
||||
if (!ata_disk_isssd())
|
||||
return false;
|
||||
|
||||
if (write && ((unsigned long)addr & 3))
|
||||
return false;
|
||||
#else
|
||||
if (write)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#if ATA_MAX_UDMA > 2
|
||||
if (dma_needs_boost && !dma_boosted) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue