From da848576312800dc229624e928d132d0702c1854 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Tue, 28 Dec 2004 22:16:07 +0000 Subject: prepared to mount multiple partitions into one logical file system (most useful for Ondio, internal memory + external MMC) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/ata.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'firmware/drivers/ata.c') diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 9a0476f5cc..349ba077dd 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -310,7 +310,8 @@ static void copy_read_sectors(unsigned char* buf, int wordcount) #endif } -int ata_read_sectors(unsigned long start, +int ata_read_sectors(IF_MV((int drive,)) + unsigned long start, int incount, void* inbuf) { @@ -576,7 +577,8 @@ static void copy_write_sectors(const unsigned char* buf, int wordcount) #endif } -int ata_write_sectors(unsigned long start, +int ata_write_sectors(IF_MV((int drive,)) + unsigned long start, int count, const void* buf) { @@ -669,6 +671,8 @@ int ata_write_sectors(unsigned long start, return ret; } +/* schedule a single sector write, executed with the the next spinup + (volume 0 only, used for config sector) */ extern void ata_delayed_write(unsigned long sector, const void* buf) { memcpy(delayed_sector, buf, SECTOR_SIZE); @@ -676,12 +680,13 @@ extern void ata_delayed_write(unsigned long sector, const void* buf) delayed_write = true; } +/* write the delayed sector to volume 0 */ extern void ata_flush(void) { if ( delayed_write ) { DEBUGF("ata_flush()\n"); delayed_write = false; - ata_write_sectors(delayed_sector_num, 1, delayed_sector); + ata_write_sectors(IF_MV2(0,) delayed_sector_num, 1, delayed_sector); } } -- cgit v1.2.3