15 #include <linux/kernel.h>
17 #include <linux/device.h>
18 #include <linux/serial_core.h>
27 #include <mach/regs-gpio.h>
30 #include <mach/regs-mem.h>
31 #include <mach/regs-lcd.h>
36 #define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID }
41 .channels =
MAP(S3C2412_DMAREQSEL_XDREQ0),
42 .channels_rx =
MAP(S3C2412_DMAREQSEL_XDREQ0),
46 .channels =
MAP(S3C2412_DMAREQSEL_XDREQ1),
47 .channels_rx =
MAP(S3C2412_DMAREQSEL_XDREQ1),
51 .channels =
MAP(S3C2412_DMAREQSEL_SDI),
52 .channels_rx =
MAP(S3C2412_DMAREQSEL_SDI),
56 .channels =
MAP(S3C2412_DMAREQSEL_SPI0TX),
57 .channels_rx =
MAP(S3C2412_DMAREQSEL_SPI0RX),
61 .channels =
MAP(S3C2412_DMAREQSEL_SPI1TX),
62 .channels_rx =
MAP(S3C2412_DMAREQSEL_SPI1RX),
66 .channels =
MAP(S3C2412_DMAREQSEL_UART0_0),
67 .channels_rx =
MAP(S3C2412_DMAREQSEL_UART0_0),
71 .channels =
MAP(S3C2412_DMAREQSEL_UART1_0),
72 .channels_rx =
MAP(S3C2412_DMAREQSEL_UART1_0),
76 .channels =
MAP(S3C2412_DMAREQSEL_UART2_0),
77 .channels_rx =
MAP(S3C2412_DMAREQSEL_UART2_0),
81 .channels =
MAP(S3C2412_DMAREQSEL_UART0_1),
82 .channels_rx =
MAP(S3C2412_DMAREQSEL_UART0_1),
86 .channels =
MAP(S3C2412_DMAREQSEL_UART1_1),
87 .channels_rx =
MAP(S3C2412_DMAREQSEL_UART1_1),
91 .channels =
MAP(S3C2412_DMAREQSEL_UART2_1),
92 .channels_rx =
MAP(S3C2412_DMAREQSEL_UART2_1),
96 .channels =
MAP(S3C2412_DMAREQSEL_TIMER),
97 .channels_rx =
MAP(S3C2412_DMAREQSEL_TIMER),
101 .channels =
MAP(S3C2412_DMAREQSEL_I2SRX),
102 .channels_rx =
MAP(S3C2412_DMAREQSEL_I2SRX),
106 .channels =
MAP(S3C2412_DMAREQSEL_I2STX),
107 .channels_rx =
MAP(S3C2412_DMAREQSEL_I2STX),
111 .channels =
MAP(S3C2412_DMAREQSEL_USBEP1),
112 .channels_rx =
MAP(S3C2412_DMAREQSEL_USBEP1),
116 .channels =
MAP(S3C2412_DMAREQSEL_USBEP2),
117 .channels_rx =
MAP(S3C2412_DMAREQSEL_USBEP2),
121 .channels =
MAP(S3C2412_DMAREQSEL_USBEP3),
122 .channels_rx =
MAP(S3C2412_DMAREQSEL_USBEP3),
126 .channels =
MAP(S3C2412_DMAREQSEL_USBEP4),
127 .channels_rx =
MAP(S3C2412_DMAREQSEL_USBEP4),
143 chsel |= S3C2412_DMAREQSEL_HW;
151 s3c2412_dma_direction(chan, map, chan->
source);
155 .select = s3c2412_dma_select,
156 .direction = s3c2412_dma_direction,
158 .map = s3c2412_dma_mappings,
170 .name =
"s3c2412_dma",
172 .add_dev = s3c2412_dma_add,
175 static int __init s3c2412_dma_init(
void)