From 9c43b2ce17cbc1f88b825ab8a5021575cee46dd7 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sun, 6 Jun 2010 13:20:47 +0000 Subject: 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 --- firmware/target/arm/as3525/sd-as3525v2.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'firmware/target/arm/as3525/sd-as3525v2.c') 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) GPIOA_IS &= ~EXT_SD_BITS; /* detect both raising and falling edges */ GPIOA_IBE |= EXT_SD_BITS; + /* enable the card detect interrupt */ + GPIOA_IE |= EXT_SD_BITS; + /* Configure XPD for SD-MCI interface */ CCU_IO |= (1<<2); #endif @@ -989,14 +992,6 @@ void sd_gpioa_isr(void) /* acknowledge interrupt */ GPIOA_IC = EXT_SD_BITS; } - -void card_enable_monitoring_target(bool on) -{ - if (on) /* enable interrupt */ - GPIOA_IE |= EXT_SD_BITS; - else /* disable interrupt */ - GPIOA_IE &= ~EXT_SD_BITS; -} #endif /* HAVE_HOTSWAP */ #ifdef CONFIG_STORAGE_MULTI -- cgit v1.2.3