summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sd-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sd-as3525.c')
-rw-r--r--firmware/target/arm/as3525/sd-as3525.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c
index 6e5845cf0a..35cb997629 100644
--- a/firmware/target/arm/as3525/sd-as3525.c
+++ b/firmware/target/arm/as3525/sd-as3525.c
@@ -564,8 +564,8 @@ int sd_init(void)
564 bitset32(&CGU_PERI, CGU_NAF_CLOCK_ENABLE); 564 bitset32(&CGU_PERI, CGU_NAF_CLOCK_ENABLE);
565#ifdef HAVE_MULTIDRIVE 565#ifdef HAVE_MULTIDRIVE
566 bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE); 566 bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE);
567 CCU_IO &= ~(1<<3); /* bits 3:2 = 01, xpd is SD interface */ 567 bitclr32(&CCU_IO, 1<<3); /* bits 3:2 = 01, xpd is SD interface */
568 CCU_IO |= (1<<2); 568 bitset32(&CCU_IO, 1<<2);
569#endif 569#endif
570 570
571 wakeup_init(&transfer_completion_signal); 571 wakeup_init(&transfer_completion_signal);
@@ -968,7 +968,7 @@ void sd_enable(bool on)
968#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) 968#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
969 /* buttonlight AMSes need a bit of special handling for the buttonlight 969 /* buttonlight AMSes need a bit of special handling for the buttonlight
970 * here due to the dual mapping of GPIOD and XPD */ 970 * here due to the dual mapping of GPIOD and XPD */
971 CCU_IO |= (1<<2); /* XPD is SD-MCI interface (b3:2 = 01) */ 971 bitset32(&CCU_IO, 1<<2); /* XPD is SD-MCI interface (b3:2 = 01) */
972 if (buttonlight_is_on) 972 if (buttonlight_is_on)
973 GPIOD_DIR &= ~(1<<7); 973 GPIOD_DIR &= ~(1<<7);
974 else 974 else
@@ -994,7 +994,7 @@ void sd_enable(bool on)
994#endif /* defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) */ 994#endif /* defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) */
995 995
996#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) 996#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
997 CCU_IO &= ~(1<<2); /* XPD is general purpose IO (b3:2 = 00) */ 997 bitclr32(&CCU_IO, 1<<2); /* XPD is general purpose IO (b3:2 = 00) */
998 if (buttonlight_is_on) 998 if (buttonlight_is_on)
999 _buttonlight_on(); 999 _buttonlight_on();
1000#endif 1000#endif