1
0
Fork 0
forked from len0rd/rockbox

Commit the common portion of FS#9708: ATA (IDE) DMA by Boris Gjenero with a couple cosmetic tweaks and without the inclusion of 'FS#9721: No error check after writes in ata.c'changes (which can be done separately). No code is changed for targets without HAVE_ATA_DMA defined other than to not display DMA modes in the View Disk Info debug screen if not using DMA (Gigabeat F/X/S were). No target uses the code yet but Gigabeat S use will follow shortly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20298 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2009-03-12 02:01:25 +00:00
parent 01c390d5c5
commit bc8cab4c24
3 changed files with 229 additions and 59 deletions

View file

@ -60,5 +60,17 @@ bool ata_present(IF_MV_NONVOID(int drive));
long ata_last_disk_activity(void);
int ata_spinup_time(void); /* ticks */
#ifdef HAVE_ATA_DMA
/* Needed to allow updating while waiting for DMA to complete */
void ata_keep_active(void);
/* Returns current DMA mode */
int ata_get_dma_mode(void);
/* Set DMA mode for ATA interface */
void ata_dma_set_mode(unsigned char mode);
/* Sets up DMA transfer */
bool ata_dma_setup(void *addr, unsigned long bytes, bool write);
/* Waits for DMA transfer completion */
bool ata_dma_finish(void);
#endif /* HAVE_ATA_DMA */
#endif
#endif /* __ATA_H__ */