From 69028d5d31384a0a97bd42081cacb01eb5d52793 Mon Sep 17 00:00:00 2001 From: Tobias Diedrich Date: Thu, 17 Jun 2010 19:14:42 +0000 Subject: sd-as3525 was calling dma_release() without calling dma_retain() first, if no card is in the sd slot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26896 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/dma-pl081.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'firmware/target/arm/as3525/dma-pl081.c') diff --git a/firmware/target/arm/as3525/dma-pl081.c b/firmware/target/arm/as3525/dma-pl081.c index 43f6162e38..149488c7d1 100644 --- a/firmware/target/arm/as3525/dma-pl081.c +++ b/firmware/target/arm/as3525/dma-pl081.c @@ -45,6 +45,8 @@ void dma_release(void) DMAC_CONFIGURATION &= ~(1<<0); CGU_PERI &= ~CGU_DMA_CLOCK_ENABLE; } + if (dma_used < 0) + panicf("dma_used < 0!"); } void dma_init(void) -- cgit v1.2.3