diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2009-07-17 22:28:49 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2009-07-17 22:28:49 +0000 |
commit | c0a5a67387c4eec3db3bad4da77ba5126faf03c4 (patch) | |
tree | d7e61f6287c5fcdce903489b6b72d474225b98a7 /firmware/target/arm/tms320dm320/creative-zvm | |
parent | bb3b57f64594ba517e06add4cfeff72b2b06e65b (diff) | |
download | rockbox-c0a5a67387c4eec3db3bad4da77ba5126faf03c4.tar.gz rockbox-c0a5a67387c4eec3db3bad4da77ba5126faf03c4.zip |
Commit FS#9545, storage cleanup and multi-driver support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/creative-zvm')
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c | 16 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c index f9acdf5eb2..f84d904205 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c | |||
@@ -125,8 +125,8 @@ void GIO2(void) | |||
125 | 125 | ||
126 | #define VFAT_SECTOR_SIZE(x) ( (x)/0x8000 ) /* 1GB array requires 80kB of RAM */ | 126 | #define VFAT_SECTOR_SIZE(x) ( (x)/0x8000 ) /* 1GB array requires 80kB of RAM */ |
127 | 127 | ||
128 | extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | 128 | extern int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); |
129 | extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | 129 | extern int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); |
130 | 130 | ||
131 | struct main_header | 131 | struct main_header |
132 | { | 132 | { |
@@ -378,14 +378,14 @@ static inline unsigned long map_sector(unsigned long sector) | |||
378 | return cfs_start+sectors[sector/64]*64+sector%64; | 378 | return cfs_start+sectors[sector/64]*64+sector%64; |
379 | } | 379 | } |
380 | 380 | ||
381 | int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf) | 381 | int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf) |
382 | { | 382 | { |
383 | if(!cfs_inited) | 383 | if(!cfs_inited) |
384 | cfs_init(); | 384 | cfs_init(); |
385 | 385 | ||
386 | /* Check if count is lesser than or equal to 1 native CFS sector */ | 386 | /* Check if count is lesser than or equal to 1 native CFS sector */ |
387 | if(count <= 64) | 387 | if(count <= 64) |
388 | return _ata_read_sectors(IF_MV2(drive,) map_sector(start), count, buf); | 388 | return _ata_read_sectors(IF_MD2(drive,) map_sector(start), count, buf); |
389 | else | 389 | else |
390 | { | 390 | { |
391 | int i, ret; | 391 | int i, ret; |
@@ -394,7 +394,7 @@ int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* bu | |||
394 | /* Read sectors in parts of 0x8000 */ | 394 | /* Read sectors in parts of 0x8000 */ |
395 | for(i=0; i<count; i+=64) | 395 | for(i=0; i<count; i+=64) |
396 | { | 396 | { |
397 | ret = _ata_read_sectors(IF_MV2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest); | 397 | ret = _ata_read_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest); |
398 | if(ret != 0) | 398 | if(ret != 0) |
399 | return ret; | 399 | return ret; |
400 | 400 | ||
@@ -405,7 +405,7 @@ int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* bu | |||
405 | } | 405 | } |
406 | } | 406 | } |
407 | 407 | ||
408 | int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf) | 408 | int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf) |
409 | { | 409 | { |
410 | if(!cfs_inited) | 410 | if(!cfs_inited) |
411 | cfs_init(); | 411 | cfs_init(); |
@@ -413,7 +413,7 @@ int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const v | |||
413 | #if 0 /* Disabled for now */ | 413 | #if 0 /* Disabled for now */ |
414 | /* Check if count is lesser than or equal to 1 native CFS sector */ | 414 | /* Check if count is lesser than or equal to 1 native CFS sector */ |
415 | if(count <= 64) | 415 | if(count <= 64) |
416 | return _ata_write_sectors(IF_MV2(drive,) map_sector(start), count, buf); | 416 | return _ata_write_sectors(IF_MD2(drive,) map_sector(start), count, buf); |
417 | else | 417 | else |
418 | { | 418 | { |
419 | int i, ret; | 419 | int i, ret; |
@@ -422,7 +422,7 @@ int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const v | |||
422 | /* Read sectors in parts of 0x8000 */ | 422 | /* Read sectors in parts of 0x8000 */ |
423 | for(i=0; i<count; i+=64) | 423 | for(i=0; i<count; i+=64) |
424 | { | 424 | { |
425 | ret = _ata_write_sectors(IF_MV2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (const void*)dest); | 425 | ret = _ata_write_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (const void*)dest); |
426 | if(ret != 0) | 426 | if(ret != 0) |
427 | return ret; | 427 | return ret; |
428 | 428 | ||
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h index 64c49fe68e..a1d4a90cb8 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | |||
@@ -38,8 +38,8 @@ void copy_write_sectors(const unsigned char* buf, int wordcount); | |||
38 | /* Nasty hack, but Creative is nasty... */ | 38 | /* Nasty hack, but Creative is nasty... */ |
39 | #define ata_read_sectors _ata_read_sectors | 39 | #define ata_read_sectors _ata_read_sectors |
40 | #define ata_write_sectors _ata_write_sectors | 40 | #define ata_write_sectors _ata_write_sectors |
41 | extern int _ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | 41 | extern int _ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); |
42 | extern int _ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | 42 | extern int _ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); |
43 | 43 | ||
44 | /* General purpose memory region #1 */ | 44 | /* General purpose memory region #1 */ |
45 | #define ATA_IOBASE 0x50FEE000 | 45 | #define ATA_IOBASE 0x50FEE000 |