diff options
author | Tomasz Moń <desowin@gmail.com> | 2021-06-09 20:50:30 +0200 |
---|---|---|
committer | Tomasz Moń <desowin@gmail.com> | 2021-06-09 20:52:36 +0200 |
commit | 163e3507f87b7de7b9e1bdfc7b2c5d5e0357da51 (patch) | |
tree | 78c666fe344cb9491870a1162fd69dd3bf25a58e /firmware/target/arm/tms320dm320/sdmmc-dm320.c | |
parent | a11c88e0df66b4020ef4d9025b9fb07f04402852 (diff) | |
download | rockbox-163e3507f87b7de7b9e1bdfc7b2c5d5e0357da51.tar.gz rockbox-163e3507f87b7de7b9e1bdfc7b2c5d5e0357da51.zip |
Sansa Connect: Working USB Mass Storage
Acknowledge SYS_USB_CONNECTED in all queues so USB task can gain
exclusive access to the storage.
Reduce CPPI requeue timeout to speed up disk access.
Change-Id: I322aae4cac679696bb8186ccacf838a18f0715e9
Diffstat (limited to 'firmware/target/arm/tms320dm320/sdmmc-dm320.c')
-rw-r--r-- | firmware/target/arm/tms320dm320/sdmmc-dm320.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/firmware/target/arm/tms320dm320/sdmmc-dm320.c b/firmware/target/arm/tms320dm320/sdmmc-dm320.c index fdc3e041a0..cc5c4a822e 100644 --- a/firmware/target/arm/tms320dm320/sdmmc-dm320.c +++ b/firmware/target/arm/tms320dm320/sdmmc-dm320.c | |||
@@ -781,20 +781,10 @@ int sd_read_sectors(IF_MD(int card_no,) unsigned long start, int incount, | |||
781 | int sd_write_sectors(IF_MD(int card_no,) unsigned long start, int count, | 781 | int sd_write_sectors(IF_MD(int card_no,) unsigned long start, int count, |
782 | const void* outbuf) | 782 | const void* outbuf) |
783 | { | 783 | { |
784 | #ifndef BOOTLOADER | ||
785 | #ifndef HAVE_MULTIDRIVE | 784 | #ifndef HAVE_MULTIDRIVE |
786 | const int card_no = 0; | 785 | const int card_no = 0; |
787 | #endif | 786 | #endif |
788 | return sd_transfer_sectors(card_no, start, count, (void*)outbuf, true); | 787 | return sd_transfer_sectors(card_no, start, count, (void*)outbuf, true); |
789 | #else /* we don't need write support in bootloader */ | ||
790 | #ifdef HAVE_MULTIDRIVE | ||
791 | (void)card_no; | ||
792 | #endif | ||
793 | (void)start; | ||
794 | (void)count; | ||
795 | (void)outbuf; | ||
796 | return 0; | ||
797 | #endif | ||
798 | } | 788 | } |
799 | 789 | ||
800 | int sd_init(void) | 790 | int sd_init(void) |
@@ -809,9 +799,7 @@ int sd_init(void) | |||
809 | 799 | ||
810 | mutex_lock(&sd_mtx); | 800 | mutex_lock(&sd_mtx); |
811 | 801 | ||
812 | #ifndef BOOTLOADER | ||
813 | enable_controller(false); | 802 | enable_controller(false); |
814 | #endif | ||
815 | 803 | ||
816 | /* based on linux/drivers/mmc/dm320mmc.c | 804 | /* based on linux/drivers/mmc/dm320mmc.c |
817 | Copyright (C) 2006 ZSI, All Rights Reserved. | 805 | Copyright (C) 2006 ZSI, All Rights Reserved. |
@@ -859,8 +847,6 @@ int sd_init(void) | |||
859 | #endif | 847 | #endif |
860 | #endif | 848 | #endif |
861 | 849 | ||
862 | sd_select_device(1); | ||
863 | |||
864 | /* Disable Memory Card CLK - it is enabled on demand by TMS320DM320 */ | 850 | /* Disable Memory Card CLK - it is enabled on demand by TMS320DM320 */ |
865 | bitclr16(&IO_MMC_MEM_CLK_CONTROL, (1 << 8)); | 851 | bitclr16(&IO_MMC_MEM_CLK_CONTROL, (1 << 8)); |
866 | mutex_unlock(&sd_mtx); | 852 | mutex_unlock(&sd_mtx); |