diff options
Diffstat (limited to 'firmware/target/arm/imx233/sdmmc-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index 32d0013574..17b37821b2 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -502,13 +502,6 @@ static int __xfer_sectors(int drive, unsigned long start, int count, void *buf, | |||
502 | return ret; | 502 | return ret; |
503 | } | 503 | } |
504 | 504 | ||
505 | static void do_led(int delta) | ||
506 | { | ||
507 | static int level = 0; | ||
508 | level += delta; | ||
509 | led(level > 0); | ||
510 | } | ||
511 | |||
512 | static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) | 505 | static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) |
513 | { | 506 | { |
514 | int ret = 0; | 507 | int ret = 0; |
@@ -520,7 +513,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf | |||
520 | mutex_lock(&mutex[drive]); | 513 | mutex_lock(&mutex[drive]); |
521 | 514 | ||
522 | /* update led status */ | 515 | /* update led status */ |
523 | do_led(1); | 516 | led(true); |
524 | 517 | ||
525 | /* for SD cards, init if necessary */ | 518 | /* for SD cards, init if necessary */ |
526 | #if CONFIG_STORAGE & STORAGE_SD | 519 | #if CONFIG_STORAGE & STORAGE_SD |
@@ -553,7 +546,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf | |||
553 | goto Ldeselect; | 546 | goto Ldeselect; |
554 | 547 | ||
555 | /** | 548 | /** |
556 | * NOTE: we need to make sure dma transfers are aligned. This handled | 549 | * NOTE: we need to make sure dma transfers are aligned. This is handled |
557 | * differently for read and write transfers. We do not repeat it each | 550 | * differently for read and write transfers. We do not repeat it each |
558 | * time but it should be noted that all transfers are limited by | 551 | * time but it should be noted that all transfers are limited by |
559 | * IMX233_MAX_SINGLE_DMA_XFER_SIZE and thus need to be split if needed. | 552 | * IMX233_MAX_SINGLE_DMA_XFER_SIZE and thus need to be split if needed. |
@@ -616,7 +609,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf | |||
616 | ret = -23; | 609 | ret = -23; |
617 | Lend: | 610 | Lend: |
618 | /* update led status */ | 611 | /* update led status */ |
619 | do_led(-1); | 612 | led(false); |
620 | /* release per-drive mutex */ | 613 | /* release per-drive mutex */ |
621 | mutex_unlock(&mutex[drive]); | 614 | mutex_unlock(&mutex[drive]); |
622 | return ret; | 615 | return ret; |