Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipod6g: Wrap more DMA functionality with HAVE_ATA_DMA

No functional change.

We always have it turned in for ipod6g, but this makes some of the
flow/logic easier to follow.

Change-Id: I3abeace4f70afb197e819e0944e0e76f4edc4800

+8 -4
+8 -4
firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c
··· 71 71 static uint32_t log_sector_size; 72 72 static struct mutex ata_mutex; 73 73 static struct semaphore ata_wakeup; 74 - static uint32_t ata_dma_flags; 75 74 static long ata_last_activity_value = -1; 76 75 static long ata_sleep_timeout = 7 * HZ; 77 76 static bool ata_powered; ··· 79 78 static struct semaphore mmc_wakeup; 80 79 static struct semaphore mmc_comp_wakeup; 81 80 static int spinup_time = 0; 81 + #ifdef HAVE_ATA_DMA 82 82 static int dma_mode = 0; 83 + static uint32_t ata_dma_flags; 84 + #endif 83 85 84 86 static const int ata_retries = ATA_RETRIES; 85 87 static const bool ata_error_srst = true; ··· 656 658 if (ceata) { 657 659 ata_lba48 = true; 658 660 ata_dma = true; 661 + #ifdef HAVE_ATA_DMA 659 662 dma_mode = 0xff; /* Canary */ 663 + #endif 660 664 PCON(8) = 0x33333333; 661 665 PCON(9) = 0x00000033; 662 666 PCON(11) |= 0xf; ··· 711 715 ATA_PIO_TIME = piotime; 712 716 713 717 uint32_t param = 0; 714 - ata_dma_flags = 0; 715 718 #ifdef HAVE_ATA_DMA 719 + ata_dma_flags = 0; 716 720 if ((identify_info[53] & BIT(2)) && (identify_info[88] & BITRANGE(0, 4))) /* Any UDMA */ 717 721 { 718 722 int max_udma = ATA_MAX_UDMA; ··· 730 734 ATA_MDMA_TIME = mwdmatimes[param & 0xf]; 731 735 ata_dma_flags = BIT(3) | BIT(10); 732 736 } 737 + dma_mode = param; 733 738 #endif /* HAVE_ATA_DMA */ 734 739 ata_dma = param ? true : false; 735 - dma_mode = param; 736 740 PASS_RC(ata_set_feature(0x03, param), 3, 4); /* Transfer mode */ 737 741 738 742 /* SET_FEATURE only supported on PATA, not CE-ATA */ ··· 1145 1149 1146 1150 /* get identify_info */ 1147 1151 mutex_lock(&ata_mutex); 1148 - int rc = ata_power_up(); /* Include identify() call */ 1152 + int rc = ata_power_up(); /* Includes identify() call */ 1149 1153 mutex_unlock(&ata_mutex); 1150 1154 if (IS_ERR(rc)) 1151 1155 return rc;