3 #include <linux/kernel.h>
6 #include <hwregs/reg_map.h>
8 #include <hwregs/marb_defs.h>
10 #include <hwregs/strmux_defs.h>
11 #include <linux/errno.h>
33 if (used_dma_channels[dmanr]) {
34 spin_unlock_irqrestore(&dma_lock, flags);
37 "already allocated by %s\n",
40 used_dma_channels_users[dmanr]);
43 panic(
"request_dma error!");
44 spin_unlock_irqrestore(&dma_lock, flags);
71 #if MAX_DMA_CHANNELS-1 != 11
75 spin_unlock_irqrestore(&dma_lock, flags);
82 panic(
"request_dma error!");
93 panic(
"Invalid DMA channel for eth\n");
101 panic(
"Invalid DMA channel for ser0\n");
109 panic(
"Invalid DMA channel for ser3\n");
117 panic(
"Invalid DMA channel for strp\n");
125 panic(
"Invalid DMA channel for ser1\n");
133 panic(
"Invalid DMA channel for iop\n");
141 panic(
"Invalid DMA channel for ser2\n");
149 panic(
"Invalid DMA channel for sser\n");
155 panic(
"Invalid DMA channel for ser4\n");
161 panic(
"Invalid DMA channel for JPEG\n");
167 panic(
"Invalid DMA channel for H264\n");
171 used_dma_channels[dmanr] = 1;
172 used_dma_channels_users[dmanr] =
device_id;
175 spin_unlock_irqrestore(&dma_lock, flags);
181 spin_lock(&dma_lock);
182 used_dma_channels[dmanr] = 0;
183 spin_unlock(&dma_lock);