summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c')
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c16
1 files changed, 8 insertions, 8 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
128extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); 128extern int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
129extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); 129extern int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
130 130
131struct main_header 131struct 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
381int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf) 381int 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
408int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf) 408int 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