diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/sd-s3c2440.c')
-rw-r--r-- | firmware/target/arm/s3c2440/sd-s3c2440.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/firmware/target/arm/s3c2440/sd-s3c2440.c b/firmware/target/arm/s3c2440/sd-s3c2440.c index 6213cbd003..8aa53d8891 100644 --- a/firmware/target/arm/s3c2440/sd-s3c2440.c +++ b/firmware/target/arm/s3c2440/sd-s3c2440.c | |||
@@ -494,6 +494,17 @@ static int sd_init_card(const int card_no) | |||
494 | Generic functions | 494 | Generic functions |
495 | *****************************************************************************/ | 495 | *****************************************************************************/ |
496 | 496 | ||
497 | static inline bool card_detect_target(void) | ||
498 | { | ||
499 | /* TODO - use interrupt on change? */ | ||
500 | #ifdef MINI2440 | ||
501 | return (GPGDAT & SD_CD) == 0; | ||
502 | #else | ||
503 | #error Unsupported target | ||
504 | #endif | ||
505 | } | ||
506 | |||
507 | |||
497 | /*****************************************************************************/ | 508 | /*****************************************************************************/ |
498 | #ifdef HAVE_HOTSWAP | 509 | #ifdef HAVE_HOTSWAP |
499 | 510 | ||
@@ -512,16 +523,6 @@ static int sd1_oneshot_callback(struct timeout *tmo) | |||
512 | return 0; | 523 | return 0; |
513 | } | 524 | } |
514 | 525 | ||
515 | bool card_detect_target(void) | ||
516 | { | ||
517 | /* TODO - use interrupt on change? */ | ||
518 | #ifdef MINI2440 | ||
519 | return (GPGDAT & SD_CD) == 0; | ||
520 | #else | ||
521 | #error Unsupported target | ||
522 | #endif | ||
523 | } | ||
524 | |||
525 | void card_enable_monitoring_target(bool on) | 526 | void card_enable_monitoring_target(bool on) |
526 | { | 527 | { |
527 | if (on) | 528 | if (on) |
@@ -570,12 +571,6 @@ bool sd_present(IF_MD_NONVOID(int card_no)) | |||
570 | /*****************************************************************************/ | 571 | /*****************************************************************************/ |
571 | #else | 572 | #else |
572 | 573 | ||
573 | bool card_detect_target(void) | ||
574 | { | ||
575 | /* not applicable */ | ||
576 | return false; | ||
577 | } | ||
578 | |||
579 | bool sd_removable(IF_MD_NONVOID(int card_no)) | 574 | bool sd_removable(IF_MD_NONVOID(int card_no)) |
580 | { | 575 | { |
581 | #ifndef HAVE_MULTIDRIVE | 576 | #ifndef HAVE_MULTIDRIVE |