3 #include <linux/kernel.h>
6 #include <hwregs/reg_map.h>
8 #include <hwregs/marb_defs.h>
9 #include <hwregs/config_defs.h>
10 #include <hwregs/strmux_defs.h>
11 #include <linux/errno.h>
12 #include <mach/arbiter.h>
35 if (used_dma_channels[dmanr]) {
36 spin_unlock_irqrestore(&dma_lock, flags);
39 "already allocated by %s\n",
42 used_dma_channels_users[dmanr]);
45 panic(
"request_dma error!");
46 spin_unlock_irqrestore(&dma_lock, flags);
73 #if MAX_DMA_CHANNELS-1 != 9
77 spin_unlock_irqrestore(&dma_lock, flags);
85 panic(
"request_dma error!");
96 panic(
"Invalid DMA channel for eth0\n");
104 panic(
"Invalid DMA channel for eth1\n");
112 panic(
"Invalid DMA channel for iop0\n");
120 panic(
"Invalid DMA channel for iop1\n");
128 panic(
"Invalid DMA channel for ser0\n");
136 panic(
"Invalid DMA channel for ser1\n");
144 panic(
"Invalid DMA channel for ser2\n");
152 panic(
"Invalid DMA channel for ser3\n");
160 panic(
"Invalid DMA channel for sser0\n");
168 panic(
"Invalid DMA channel for sser1\n");
176 panic(
"Invalid DMA channel for ata\n");
184 panic(
"Invalid DMA channel for strp\n");
190 panic(
"Invalid DMA channel for ext0\n");
196 panic(
"Invalid DMA channel for ext1\n");
204 panic(
"Invalid DMA channel for ext2\n");
212 panic(
"Invalid DMA channel for ext2\n");
216 used_dma_channels[dmanr] = 1;
217 used_dma_channels_users[dmanr] =
device_id;
220 spin_unlock_irqrestore(&dma_lock, flags);
226 spin_lock(&dma_lock);
227 used_dma_channels[dmanr] = 0;
228 spin_unlock(&dma_lock);