diff options
Diffstat (limited to 'firmware/target/arm/as3525/ata_sd_as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 8ec90c5ced..a6265b37f4 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -122,7 +122,7 @@ static volatile bool retry; | |||
122 | static inline void mci_delay(void) { int i = 0xffff; while(i--) ; } | 122 | static inline void mci_delay(void) { int i = 0xffff; while(i--) ; } |
123 | 123 | ||
124 | #ifdef HAVE_HOTSWAP | 124 | #ifdef HAVE_HOTSWAP |
125 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) | 125 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) |
126 | static int sd1_oneshot_callback(struct timeout *tmo) | 126 | static int sd1_oneshot_callback(struct timeout *tmo) |
127 | { | 127 | { |
128 | (void)tmo; | 128 | (void)tmo; |
@@ -146,7 +146,7 @@ void INT_GPIOA(void) | |||
146 | GPIOA_IC = (1<<2); | 146 | GPIOA_IC = (1<<2); |
147 | timeout_register(&sd1_oneshot, sd1_oneshot_callback, (3*HZ/10), 0); | 147 | timeout_register(&sd1_oneshot, sd1_oneshot_callback, (3*HZ/10), 0); |
148 | } | 148 | } |
149 | #endif /* defined(SANSA_E200V2) || defined(SANSA_FUZE) */ | 149 | #endif /* defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) */ |
150 | #endif /* HAVE_HOTSWAP */ | 150 | #endif /* HAVE_HOTSWAP */ |
151 | 151 | ||
152 | void INT_NAND(void) | 152 | void INT_NAND(void) |
@@ -437,7 +437,7 @@ static void init_pl180_controller(const int drive) | |||
437 | VIC_INT_ENABLE |= | 437 | VIC_INT_ENABLE |= |
438 | (drive == INTERNAL_AS3525) ? INTERRUPT_NAND : INTERRUPT_MCI0; | 438 | (drive == INTERNAL_AS3525) ? INTERRUPT_NAND : INTERRUPT_MCI0; |
439 | 439 | ||
440 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) | 440 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) |
441 | /* setup isr for microsd monitoring */ | 441 | /* setup isr for microsd monitoring */ |
442 | VIC_INT_ENABLE |= (INTERRUPT_GPIOA); | 442 | VIC_INT_ENABLE |= (INTERRUPT_GPIOA); |
443 | /* clear previous irq */ | 443 | /* clear previous irq */ |
@@ -886,13 +886,12 @@ tCardInfo *card_get_info_target(int card_no) | |||
886 | 886 | ||
887 | bool card_detect_target(void) | 887 | bool card_detect_target(void) |
888 | { | 888 | { |
889 | #ifdef HAVE_HOTSWAP | 889 | #if defined(HAVE_HOTSWAP) && \ |
890 | /* TODO: add e200/c200 */ | 890 | (defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2)) |
891 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) | ||
892 | return !(GPIOA_PIN(2)); | 891 | return !(GPIOA_PIN(2)); |
893 | #endif | 892 | #else |
894 | #endif | ||
895 | return false; | 893 | return false; |
894 | #endif | ||
896 | } | 895 | } |
897 | 896 | ||
898 | #ifdef HAVE_HOTSWAP | 897 | #ifdef HAVE_HOTSWAP |
@@ -901,14 +900,14 @@ void card_enable_monitoring_target(bool on) | |||
901 | if (on) | 900 | if (on) |
902 | { | 901 | { |
903 | /* add e200v2/c200v2 here */ | 902 | /* add e200v2/c200v2 here */ |
904 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) | 903 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) |
905 | /* enable isr*/ | 904 | /* enable isr*/ |
906 | GPIOA_IE |= (1<<2); | 905 | GPIOA_IE |= (1<<2); |
907 | #endif | 906 | #endif |
908 | } | 907 | } |
909 | else | 908 | else |
910 | { | 909 | { |
911 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) | 910 | #if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) |
912 | /* edisable isr*/ | 911 | /* edisable isr*/ |
913 | GPIOA_IE &= ~(1<<2); | 912 | GPIOA_IE &= ~(1<<2); |
914 | #endif | 913 | #endif |