diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 14 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/ata-nand-telechips.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/imx233/nand-imx233.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/pp/ata-sd-pp.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/ata-nand-rk27xx.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/sd-rk27xx.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/sd-s3c2440.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/ata-nand-s5l8700.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/sd-tcc780x.c | 4 | ||||
-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 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/sdmmc-dm320.c | 4 |
15 files changed, 52 insertions, 52 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c index 5bed36e51e..c80c7f7491 100644 --- a/firmware/target/arm/as3525/sd-as3525.c +++ b/firmware/target/arm/as3525/sd-as3525.c | |||
@@ -693,7 +693,7 @@ static int sd_select_bank(signed char bank) | |||
693 | return 0; | 693 | return 0; |
694 | } | 694 | } |
695 | 695 | ||
696 | static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, | 696 | static int sd_transfer_sectors(IF_MD(int drive,) unsigned long start, |
697 | int count, void* buf, const bool write) | 697 | int count, void* buf, const bool write) |
698 | { | 698 | { |
699 | #ifndef HAVE_MULTIDRIVE | 699 | #ifndef HAVE_MULTIDRIVE |
@@ -887,19 +887,19 @@ sd_transfer_error_nodma: | |||
887 | return ret; | 887 | return ret; |
888 | } | 888 | } |
889 | 889 | ||
890 | int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, | 890 | int sd_read_sectors(IF_MD(int drive,) unsigned long start, int count, |
891 | void* buf) | 891 | void* buf) |
892 | { | 892 | { |
893 | int ret; | 893 | int ret; |
894 | 894 | ||
895 | mutex_lock(&sd_mtx); | 895 | mutex_lock(&sd_mtx); |
896 | ret = sd_transfer_sectors(IF_MD2(drive,) start, count, buf, false); | 896 | ret = sd_transfer_sectors(IF_MD(drive,) start, count, buf, false); |
897 | mutex_unlock(&sd_mtx); | 897 | mutex_unlock(&sd_mtx); |
898 | 898 | ||
899 | return ret; | 899 | return ret; |
900 | } | 900 | } |
901 | 901 | ||
902 | int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 902 | int sd_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
903 | const void* buf) | 903 | const void* buf) |
904 | { | 904 | { |
905 | #ifdef VERIFY_WRITE | 905 | #ifdef VERIFY_WRITE |
@@ -911,7 +911,7 @@ int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | |||
911 | 911 | ||
912 | mutex_lock(&sd_mtx); | 912 | mutex_lock(&sd_mtx); |
913 | 913 | ||
914 | ret = sd_transfer_sectors(IF_MD2(drive,) start, count, (void*)buf, true); | 914 | ret = sd_transfer_sectors(IF_MD(drive,) start, count, (void*)buf, true); |
915 | 915 | ||
916 | #ifdef VERIFY_WRITE | 916 | #ifdef VERIFY_WRITE |
917 | if (ret) { | 917 | if (ret) { |
@@ -928,10 +928,10 @@ int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | |||
928 | if(transfer > UNALIGNED_NUM_SECTORS) | 928 | if(transfer > UNALIGNED_NUM_SECTORS) |
929 | transfer = UNALIGNED_NUM_SECTORS; | 929 | transfer = UNALIGNED_NUM_SECTORS; |
930 | 930 | ||
931 | sd_transfer_sectors(IF_MD2(drive,) start, transfer, aligned_buffer, false); | 931 | sd_transfer_sectors(IF_MD(drive,) start, transfer, aligned_buffer, false); |
932 | if (memcmp(buf, aligned_buffer, transfer * 512) != 0) { | 932 | if (memcmp(buf, aligned_buffer, transfer * 512) != 0) { |
933 | /* try the write again in the hope to repair the damage */ | 933 | /* try the write again in the hope to repair the damage */ |
934 | sd_transfer_sectors(IF_MD2(drive,) saved_start, saved_count, saved_buf, true); | 934 | sd_transfer_sectors(IF_MD(drive,) saved_start, saved_count, saved_buf, true); |
935 | panicf("sd: verify failed: sec=%ld n=%d!", start, transfer); | 935 | panicf("sd: verify failed: sec=%ld n=%d!", start, transfer); |
936 | } | 936 | } |
937 | 937 | ||
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 9edc598edf..ae3dde4495 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c | |||
@@ -773,7 +773,7 @@ int sd_init(void) | |||
773 | return 0; | 773 | return 0; |
774 | } | 774 | } |
775 | 775 | ||
776 | static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, | 776 | static int sd_transfer_sectors(IF_MD(int drive,) unsigned long start, |
777 | int count, void* buf, bool write) | 777 | int count, void* buf, bool write) |
778 | { | 778 | { |
779 | unsigned long response; | 779 | unsigned long response; |
@@ -969,16 +969,16 @@ sd_transfer_error_no_dma: | |||
969 | } | 969 | } |
970 | } | 970 | } |
971 | 971 | ||
972 | int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, | 972 | int sd_read_sectors(IF_MD(int drive,) unsigned long start, int count, |
973 | void* buf) | 973 | void* buf) |
974 | { | 974 | { |
975 | return sd_transfer_sectors(IF_MD2(drive,) start, count, buf, false); | 975 | return sd_transfer_sectors(IF_MD(drive,) start, count, buf, false); |
976 | } | 976 | } |
977 | 977 | ||
978 | int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 978 | int sd_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
979 | const void* buf) | 979 | const void* buf) |
980 | { | 980 | { |
981 | return sd_transfer_sectors(IF_MD2(drive,) start, count, (void*)buf, true); | 981 | return sd_transfer_sectors(IF_MD(drive,) start, count, (void*)buf, true); |
982 | } | 982 | } |
983 | 983 | ||
984 | #ifndef BOOTLOADER | 984 | #ifndef BOOTLOADER |
diff --git a/firmware/target/arm/ata-nand-telechips.c b/firmware/target/arm/ata-nand-telechips.c index 2ae425f4c6..fe1314d35a 100644 --- a/firmware/target/arm/ata-nand-telechips.c +++ b/firmware/target/arm/ata-nand-telechips.c | |||
@@ -800,7 +800,7 @@ static void read_inplace_writes_cache(int bank, int phys_segment) | |||
800 | } | 800 | } |
801 | 801 | ||
802 | 802 | ||
803 | int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int incount, | 803 | int nand_read_sectors(IF_MD(int drive,) unsigned long start, int incount, |
804 | void* inbuf) | 804 | void* inbuf) |
805 | { | 805 | { |
806 | #ifdef HAVE_MULTIDRIVE | 806 | #ifdef HAVE_MULTIDRIVE |
@@ -855,7 +855,7 @@ nand_read_error: | |||
855 | return ret; | 855 | return ret; |
856 | } | 856 | } |
857 | 857 | ||
858 | int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 858 | int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
859 | const void* outbuf) | 859 | const void* outbuf) |
860 | { | 860 | { |
861 | #ifdef HAVE_MULTIDRIVE | 861 | #ifdef HAVE_MULTIDRIVE |
@@ -877,7 +877,7 @@ int nand_flush(void) | |||
877 | #endif | 877 | #endif |
878 | 878 | ||
879 | #ifdef STORAGE_GET_INFO | 879 | #ifdef STORAGE_GET_INFO |
880 | void nand_get_info(IF_MD2(int drive,) struct storage_info *info) | 880 | void nand_get_info(IF_MD(int drive,) struct storage_info *info) |
881 | { | 881 | { |
882 | #ifdef HAVE_MULTIDRIVE | 882 | #ifdef HAVE_MULTIDRIVE |
883 | (void)drive; /* unused for now */ | 883 | (void)drive; /* unused for now */ |
diff --git a/firmware/target/arm/imx233/nand-imx233.c b/firmware/target/arm/imx233/nand-imx233.c index ec584b5869..22c4fc2748 100644 --- a/firmware/target/arm/imx233/nand-imx233.c +++ b/firmware/target/arm/imx233/nand-imx233.c | |||
@@ -36,13 +36,13 @@ int nand_init(void) | |||
36 | { | 36 | { |
37 | return -1; | 37 | return -1; |
38 | } | 38 | } |
39 | int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int count, | 39 | int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, |
40 | void* buf) | 40 | void* buf) |
41 | { | 41 | { |
42 | return -1; | 42 | return -1; |
43 | } | 43 | } |
44 | 44 | ||
45 | int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 45 | int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
46 | const void* buf) | 46 | const void* buf) |
47 | { | 47 | { |
48 | return -1; | 48 | return -1; |
@@ -54,7 +54,7 @@ int nand_num_drives(int first_drive) | |||
54 | return 1; | 54 | return 1; |
55 | } | 55 | } |
56 | 56 | ||
57 | void nand_get_info(IF_MD2(int drive,) struct storage_info *info) | 57 | void nand_get_info(IF_MD(int drive,) struct storage_info *info) |
58 | { | 58 | { |
59 | IF_MD((void)drive); | 59 | IF_MD((void)drive); |
60 | info->sector_size = SECTOR_SIZE; | 60 | info->sector_size = SECTOR_SIZE; |
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index c389a1d2c8..e520fcc6e6 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -845,7 +845,7 @@ void sd_enable(bool on) | |||
845 | (void) on; | 845 | (void) on; |
846 | } | 846 | } |
847 | 847 | ||
848 | int sd_read_sectors(IF_MD2(int sd_drive,) unsigned long start, int count, void *buf) | 848 | int sd_read_sectors(IF_MD(int sd_drive,) unsigned long start, int count, void *buf) |
849 | { | 849 | { |
850 | #ifndef HAVE_MULTIDRIVE | 850 | #ifndef HAVE_MULTIDRIVE |
851 | int sd_drive = 0; | 851 | int sd_drive = 0; |
@@ -853,7 +853,7 @@ int sd_read_sectors(IF_MD2(int sd_drive,) unsigned long start, int count, void * | |||
853 | return transfer_sectors(sd_map[sd_drive], start, count, buf, true); | 853 | return transfer_sectors(sd_map[sd_drive], start, count, buf, true); |
854 | } | 854 | } |
855 | 855 | ||
856 | int sd_write_sectors(IF_MD2(int sd_drive,) unsigned long start, int count, const void* buf) | 856 | int sd_write_sectors(IF_MD(int sd_drive,) unsigned long start, int count, const void* buf) |
857 | { | 857 | { |
858 | #ifndef HAVE_MULTIDRIVE | 858 | #ifndef HAVE_MULTIDRIVE |
859 | int sd_drive = 0; | 859 | int sd_drive = 0; |
@@ -878,7 +878,7 @@ int mmc_init(void) | |||
878 | return 0; | 878 | return 0; |
879 | } | 879 | } |
880 | 880 | ||
881 | void mmc_get_info(IF_MD2(int mmc_drive,) struct storage_info *info) | 881 | void mmc_get_info(IF_MD(int mmc_drive,) struct storage_info *info) |
882 | { | 882 | { |
883 | #ifndef HAVE_MULTIDRIVE | 883 | #ifndef HAVE_MULTIDRIVE |
884 | int mmc_drive = 0; | 884 | int mmc_drive = 0; |
@@ -968,7 +968,7 @@ int mmc_spinup_time(void) | |||
968 | return 0; | 968 | return 0; |
969 | } | 969 | } |
970 | 970 | ||
971 | int mmc_read_sectors(IF_MD2(int mmc_drive,) unsigned long start, int count, void *buf) | 971 | int mmc_read_sectors(IF_MD(int mmc_drive,) unsigned long start, int count, void *buf) |
972 | { | 972 | { |
973 | #ifndef HAVE_MULTIDRIVE | 973 | #ifndef HAVE_MULTIDRIVE |
974 | int mmc_drive = 0; | 974 | int mmc_drive = 0; |
@@ -976,7 +976,7 @@ int mmc_read_sectors(IF_MD2(int mmc_drive,) unsigned long start, int count, void | |||
976 | return transfer_sectors(mmc_map[mmc_drive], start, count, buf, true); | 976 | return transfer_sectors(mmc_map[mmc_drive], start, count, buf, true); |
977 | } | 977 | } |
978 | 978 | ||
979 | int mmc_write_sectors(IF_MD2(int mmc_drive,) unsigned long start, int count, const void* buf) | 979 | int mmc_write_sectors(IF_MD(int mmc_drive,) unsigned long start, int count, const void* buf) |
980 | { | 980 | { |
981 | #ifndef HAVE_MULTIDRIVE | 981 | #ifndef HAVE_MULTIDRIVE |
982 | int mmc_drive = 0; | 982 | int mmc_drive = 0; |
diff --git a/firmware/target/arm/pp/ata-sd-pp.c b/firmware/target/arm/pp/ata-sd-pp.c index f83bb60566..bcf8a660c2 100644 --- a/firmware/target/arm/pp/ata-sd-pp.c +++ b/firmware/target/arm/pp/ata-sd-pp.c | |||
@@ -864,7 +864,7 @@ static void sd_select_device(int card_no) | |||
864 | 864 | ||
865 | /* API Functions */ | 865 | /* API Functions */ |
866 | 866 | ||
867 | int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int incount, | 867 | int sd_read_sectors(IF_MD(int drive,) unsigned long start, int incount, |
868 | void* inbuf) | 868 | void* inbuf) |
869 | { | 869 | { |
870 | #ifndef HAVE_MULTIDRIVE | 870 | #ifndef HAVE_MULTIDRIVE |
@@ -981,7 +981,7 @@ sd_read_error: | |||
981 | } | 981 | } |
982 | } | 982 | } |
983 | 983 | ||
984 | int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 984 | int sd_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
985 | const void* outbuf) | 985 | const void* outbuf) |
986 | { | 986 | { |
987 | /* Write support is not finished yet */ | 987 | /* Write support is not finished yet */ |
diff --git a/firmware/target/arm/rk27xx/ata-nand-rk27xx.c b/firmware/target/arm/rk27xx/ata-nand-rk27xx.c index fc150ecf52..a32963b44d 100644 --- a/firmware/target/arm/rk27xx/ata-nand-rk27xx.c +++ b/firmware/target/arm/rk27xx/ata-nand-rk27xx.c | |||
@@ -35,14 +35,14 @@ | |||
35 | static bool initialized = false; | 35 | static bool initialized = false; |
36 | 36 | ||
37 | /* API Functions */ | 37 | /* API Functions */ |
38 | int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int incount, | 38 | int nand_read_sectors(IF_MD(int drive,) unsigned long start, int incount, |
39 | void* inbuf) | 39 | void* inbuf) |
40 | { | 40 | { |
41 | (void)drive; | 41 | (void)drive; |
42 | return ftl_read(start, incount, inbuf); | 42 | return ftl_read(start, incount, inbuf); |
43 | } | 43 | } |
44 | 44 | ||
45 | int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 45 | int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
46 | const void* outbuf) | 46 | const void* outbuf) |
47 | { | 47 | { |
48 | (void)drive; | 48 | (void)drive; |
@@ -74,7 +74,7 @@ void nand_enable(bool on) | |||
74 | (void)on; | 74 | (void)on; |
75 | } | 75 | } |
76 | 76 | ||
77 | void nand_get_info(IF_MD2(int drive,) struct storage_info *info) | 77 | void nand_get_info(IF_MD(int drive,) struct storage_info *info) |
78 | { | 78 | { |
79 | (void)drive; | 79 | (void)drive; |
80 | uint32_t ppb = ftl_banks * (*ftl_nand_type).pagesperblock; | 80 | uint32_t ppb = ftl_banks * (*ftl_nand_type).pagesperblock; |
diff --git a/firmware/target/arm/rk27xx/sd-rk27xx.c b/firmware/target/arm/rk27xx/sd-rk27xx.c index cb870c9e38..ef9845d696 100644 --- a/firmware/target/arm/rk27xx/sd-rk27xx.c +++ b/firmware/target/arm/rk27xx/sd-rk27xx.c | |||
@@ -495,7 +495,7 @@ static inline void write_sd_data(unsigned char **src) | |||
495 | *src += 512; | 495 | *src += 512; |
496 | } | 496 | } |
497 | 497 | ||
498 | int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, | 498 | int sd_read_sectors(IF_MD(int drive,) unsigned long start, int count, |
499 | void* buf) | 499 | void* buf) |
500 | { | 500 | { |
501 | #ifdef HAVE_MULTIDRIVE | 501 | #ifdef HAVE_MULTIDRIVE |
@@ -618,7 +618,7 @@ int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, | |||
618 | } | 618 | } |
619 | 619 | ||
620 | /* Not tested */ | 620 | /* Not tested */ |
621 | int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 621 | int sd_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
622 | const void* buf) | 622 | const void* buf) |
623 | { | 623 | { |
624 | #ifdef HAVE_MULTIDRIVE | 624 | #ifdef HAVE_MULTIDRIVE |
diff --git a/firmware/target/arm/s3c2440/sd-s3c2440.c b/firmware/target/arm/s3c2440/sd-s3c2440.c index 8695b65fa5..6658fa1515 100644 --- a/firmware/target/arm/s3c2440/sd-s3c2440.c +++ b/firmware/target/arm/s3c2440/sd-s3c2440.c | |||
@@ -847,7 +847,7 @@ sd_transfer_error: | |||
847 | return ret; | 847 | return ret; |
848 | } | 848 | } |
849 | 849 | ||
850 | int sd_read_sectors(IF_MD2(int card_no,) unsigned long start, int incount, | 850 | int sd_read_sectors(IF_MD(int card_no,) unsigned long start, int incount, |
851 | void* inbuf) | 851 | void* inbuf) |
852 | { | 852 | { |
853 | int ret; | 853 | int ret; |
@@ -868,7 +868,7 @@ int sd_read_sectors(IF_MD2(int card_no,) unsigned long start, int incount, | |||
868 | } | 868 | } |
869 | 869 | ||
870 | /*****************************************************************************/ | 870 | /*****************************************************************************/ |
871 | int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 871 | int sd_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
872 | const void* outbuf) | 872 | const void* outbuf) |
873 | { | 873 | { |
874 | #ifdef BOOTLOADER /* we don't need write support in bootloader */ | 874 | #ifdef BOOTLOADER /* we don't need write support in bootloader */ |
diff --git a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c index a5dcb4b874..227f6b703b 100644 --- a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c +++ b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c | |||
@@ -33,13 +33,13 @@ | |||
33 | static bool initialized = false; | 33 | static bool initialized = false; |
34 | 34 | ||
35 | /* API Functions */ | 35 | /* API Functions */ |
36 | int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int incount, | 36 | int nand_read_sectors(IF_MD(int drive,) unsigned long start, int incount, |
37 | void* inbuf) | 37 | void* inbuf) |
38 | { | 38 | { |
39 | return ftl_read(start, incount, inbuf); | 39 | return ftl_read(start, incount, inbuf); |
40 | } | 40 | } |
41 | 41 | ||
42 | int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 42 | int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
43 | const void* outbuf) | 43 | const void* outbuf) |
44 | { | 44 | { |
45 | return ftl_write(start, count, outbuf); | 45 | return ftl_write(start, count, outbuf); |
@@ -70,7 +70,7 @@ void nand_enable(bool on) | |||
70 | (void)on; | 70 | (void)on; |
71 | } | 71 | } |
72 | 72 | ||
73 | void nand_get_info(IF_MD2(int drive,) struct storage_info *info) | 73 | void nand_get_info(IF_MD(int drive,) struct storage_info *info) |
74 | { | 74 | { |
75 | uint32_t ppb = ftl_banks * (*ftl_nand_type).pagesperblock; | 75 | uint32_t ppb = ftl_banks * (*ftl_nand_type).pagesperblock; |
76 | (*info).sector_size = SECTOR_SIZE; | 76 | (*info).sector_size = SECTOR_SIZE; |
diff --git a/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c index dbf0ce9dd4..395c0f49e6 100644 --- a/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c | |||
@@ -962,7 +962,7 @@ int ata_soft_reset(void) | |||
962 | return rc; | 962 | return rc; |
963 | } | 963 | } |
964 | 964 | ||
965 | int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int incount, | 965 | int ata_read_sectors(IF_MD(int drive,) unsigned long start, int incount, |
966 | void* inbuf) | 966 | void* inbuf) |
967 | { | 967 | { |
968 | mutex_lock(&ata_mutex); | 968 | mutex_lock(&ata_mutex); |
@@ -971,7 +971,7 @@ int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int incount, | |||
971 | return rc; | 971 | return rc; |
972 | } | 972 | } |
973 | 973 | ||
974 | int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | 974 | int ata_write_sectors(IF_MD(int drive,) unsigned long start, int count, |
975 | const void* outbuf) | 975 | const void* outbuf) |
976 | { | 976 | { |
977 | mutex_lock(&ata_mutex); | 977 | mutex_lock(&ata_mutex); |
@@ -1007,7 +1007,7 @@ void ata_spin(void) | |||
1007 | ata_set_active(); | 1007 | ata_set_active(); |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | void ata_get_info(IF_MD2(int drive,) struct storage_info *info) | 1010 | void ata_get_info(IF_MD(int drive,) struct storage_info *info) |
1011 | { | 1011 | { |
1012 | (*info).sector_size = SECTOR_SIZE; | 1012 | (*info).sector_size = SECTOR_SIZE; |
1013 | #ifdef ATA_HAVE_BBT | 1013 | #ifdef ATA_HAVE_BBT |
diff --git a/firmware/target/arm/tcc780x/sd-tcc780x.c b/firmware/target/arm/tcc780x/sd-tcc780x.c index 3b67d21958..55ae4e7c70 100644 --- a/firmware/target/arm/tcc780x/sd-tcc780x.c +++ b/firmware/target/arm/tcc780x/sd-tcc780x.c | |||
@@ -398,7 +398,7 @@ static void sd_select_device(int card_no) | |||
398 | } | 398 | } |
399 | } | 399 | } |
400 | 400 | ||
401 | int sd_read_sectors(IF_MD2(int card_no,) unsigned long start, int incount, | 401 | int sd_read_sectors(IF_MD(int card_no,) unsigned long start, int incount, |
402 | void* inbuf) | 402 | void* inbuf) |
403 | { | 403 | { |
404 | #ifndef HAVE_MULTIDRIVE | 404 | #ifndef HAVE_MULTIDRIVE |
@@ -512,7 +512,7 @@ sd_read_error: | |||
512 | } | 512 | } |
513 | } | 513 | } |
514 | 514 | ||
515 | int sd_write_sectors(IF_MD2(int card_no,) unsigned long start, int count, | 515 | int sd_write_sectors(IF_MD(int card_no,) unsigned long start, int count, |
516 | const void* outbuf) | 516 | const void* outbuf) |
517 | { | 517 | { |
518 | /* Write support is not finished yet */ | 518 | /* Write support is not finished yet */ |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c index 4ff39e2a9e..f13904628d 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c | |||
@@ -126,8 +126,8 @@ void GIO2(void) | |||
126 | 126 | ||
127 | #define VFAT_SECTOR_SIZE(x) ( (x)/0x8000 ) /* 1GB array requires 80kB of RAM */ | 127 | #define VFAT_SECTOR_SIZE(x) ( (x)/0x8000 ) /* 1GB array requires 80kB of RAM */ |
128 | 128 | ||
129 | extern int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); | 129 | extern int ata_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf); |
130 | extern int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); | 130 | extern int ata_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf); |
131 | 131 | ||
132 | struct main_header | 132 | struct main_header |
133 | { | 133 | { |
@@ -396,14 +396,14 @@ static inline unsigned long map_sector(unsigned long sector) | |||
396 | return cfs_start+sectors[sector/64]*64+sector%64; | 396 | return cfs_start+sectors[sector/64]*64+sector%64; |
397 | } | 397 | } |
398 | 398 | ||
399 | int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf) | 399 | int ata_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf) |
400 | { | 400 | { |
401 | if(!cfs_inited) | 401 | if(!cfs_inited) |
402 | cfs_init(); | 402 | cfs_init(); |
403 | 403 | ||
404 | /* Check if count is lesser than or equal to 1 native CFS sector */ | 404 | /* Check if count is lesser than or equal to 1 native CFS sector */ |
405 | if(count <= 64) | 405 | if(count <= 64) |
406 | return _ata_read_sectors(IF_MD2(drive,) map_sector(start), count, buf); | 406 | return _ata_read_sectors(IF_MD(drive,) map_sector(start), count, buf); |
407 | else | 407 | else |
408 | { | 408 | { |
409 | int i; | 409 | int i; |
@@ -412,7 +412,7 @@ int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* bu | |||
412 | /* Read sectors in parts of 0x8000 */ | 412 | /* Read sectors in parts of 0x8000 */ |
413 | for(i=0; i<count; i+=64) | 413 | for(i=0; i<count; i+=64) |
414 | { | 414 | { |
415 | int ret = _ata_read_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest); | 415 | int ret = _ata_read_sectors(IF_MD(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest); |
416 | if(ret != 0) | 416 | if(ret != 0) |
417 | return ret; | 417 | return ret; |
418 | 418 | ||
@@ -423,7 +423,7 @@ int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* bu | |||
423 | } | 423 | } |
424 | } | 424 | } |
425 | 425 | ||
426 | int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf) | 426 | int ata_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf) |
427 | { | 427 | { |
428 | if(!cfs_inited) | 428 | if(!cfs_inited) |
429 | cfs_init(); | 429 | cfs_init(); |
@@ -431,7 +431,7 @@ int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const v | |||
431 | #if 0 /* Disabled for now */ | 431 | #if 0 /* Disabled for now */ |
432 | /* Check if count is lesser than or equal to 1 native CFS sector */ | 432 | /* Check if count is lesser than or equal to 1 native CFS sector */ |
433 | if(count <= 64) | 433 | if(count <= 64) |
434 | return _ata_write_sectors(IF_MD2(drive,) map_sector(start), count, buf); | 434 | return _ata_write_sectors(IF_MD(drive,) map_sector(start), count, buf); |
435 | else | 435 | else |
436 | { | 436 | { |
437 | int i, ret; | 437 | int i, ret; |
@@ -440,7 +440,7 @@ int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const v | |||
440 | /* Read sectors in parts of 0x8000 */ | 440 | /* Read sectors in parts of 0x8000 */ |
441 | for(i=0; i<count; i+=64) | 441 | for(i=0; i<count; i+=64) |
442 | { | 442 | { |
443 | ret = _ata_write_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (const void*)dest); | 443 | ret = _ata_write_sectors(IF_MD(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (const void*)dest); |
444 | if(ret != 0) | 444 | if(ret != 0) |
445 | return ret; | 445 | return ret; |
446 | 446 | ||
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h index 5b66d192a5..d0aa12e040 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | |||
@@ -36,8 +36,8 @@ | |||
36 | /* Nasty hack, but Creative is nasty... */ | 36 | /* Nasty hack, but Creative is nasty... */ |
37 | #define ata_read_sectors _ata_read_sectors | 37 | #define ata_read_sectors _ata_read_sectors |
38 | #define ata_write_sectors _ata_write_sectors | 38 | #define ata_write_sectors _ata_write_sectors |
39 | extern int _ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); | 39 | extern int _ata_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf); |
40 | extern int _ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); | 40 | extern int _ata_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf); |
41 | 41 | ||
42 | /* General purpose memory region #1 */ | 42 | /* General purpose memory region #1 */ |
43 | #define ATA_IOBASE 0x50FEE000 | 43 | #define ATA_IOBASE 0x50FEE000 |
diff --git a/firmware/target/arm/tms320dm320/sdmmc-dm320.c b/firmware/target/arm/tms320dm320/sdmmc-dm320.c index 2a7e1739eb..284061e1ad 100644 --- a/firmware/target/arm/tms320dm320/sdmmc-dm320.c +++ b/firmware/target/arm/tms320dm320/sdmmc-dm320.c | |||
@@ -849,7 +849,7 @@ sd_transfer_error: | |||
849 | } | 849 | } |
850 | } | 850 | } |
851 | 851 | ||
852 | int sd_read_sectors(IF_MD2(int card_no,) unsigned long start, int incount, | 852 | int sd_read_sectors(IF_MD(int card_no,) unsigned long start, int incount, |
853 | void* inbuf) | 853 | void* inbuf) |
854 | { | 854 | { |
855 | #ifndef HAVE_MULTIDRIVE | 855 | #ifndef HAVE_MULTIDRIVE |
@@ -858,7 +858,7 @@ int sd_read_sectors(IF_MD2(int card_no,) unsigned long start, int incount, | |||
858 | return sd_transfer_sectors(card_no, start, incount, inbuf, false); | 858 | return sd_transfer_sectors(card_no, start, incount, inbuf, false); |
859 | } | 859 | } |
860 | 860 | ||
861 | int sd_write_sectors(IF_MD2(int card_no,) unsigned long start, int count, | 861 | int sd_write_sectors(IF_MD(int card_no,) unsigned long start, int count, |
862 | const void* outbuf) | 862 | const void* outbuf) |
863 | { | 863 | { |
864 | #ifndef BOOTLOADER | 864 | #ifndef BOOTLOADER |