summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sd-as3525v2.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-06-06 13:20:47 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-06-06 13:20:47 +0000
commit9c43b2ce17cbc1f88b825ab8a5021575cee46dd7 (patch)
tree8d96e95861b3b0df1a7efa6b660395c317ecb475 /firmware/target/arm/as3525/sd-as3525v2.c
parent4a2cab6aa1008a4f5ac05dac44c99b7f1a05e8f4 (diff)
downloadrockbox-9c43b2ce17cbc1f88b825ab8a5021575cee46dd7.tar.gz
rockbox-9c43b2ce17cbc1f88b825ab8a5021575cee46dd7.zip
Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sd-as3525v2.c')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index ccc88be25d..1a555e745d 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -731,6 +731,9 @@ int sd_init(void)
731 GPIOA_IS &= ~EXT_SD_BITS; 731 GPIOA_IS &= ~EXT_SD_BITS;
732 /* detect both raising and falling edges */ 732 /* detect both raising and falling edges */
733 GPIOA_IBE |= EXT_SD_BITS; 733 GPIOA_IBE |= EXT_SD_BITS;
734 /* enable the card detect interrupt */
735 GPIOA_IE |= EXT_SD_BITS;
736
734 /* Configure XPD for SD-MCI interface */ 737 /* Configure XPD for SD-MCI interface */
735 CCU_IO |= (1<<2); 738 CCU_IO |= (1<<2);
736#endif 739#endif
@@ -989,14 +992,6 @@ void sd_gpioa_isr(void)
989 /* acknowledge interrupt */ 992 /* acknowledge interrupt */
990 GPIOA_IC = EXT_SD_BITS; 993 GPIOA_IC = EXT_SD_BITS;
991} 994}
992
993void card_enable_monitoring_target(bool on)
994{
995 if (on) /* enable interrupt */
996 GPIOA_IE |= EXT_SD_BITS;
997 else /* disable interrupt */
998 GPIOA_IE &= ~EXT_SD_BITS;
999}
1000#endif /* HAVE_HOTSWAP */ 995#endif /* HAVE_HOTSWAP */
1001 996
1002#ifdef CONFIG_STORAGE_MULTI 997#ifdef CONFIG_STORAGE_MULTI