1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-27 16:51:53 +02:00

ubb-vga.c: moved some DMA settings from per-line to per-session setup

- ubb-vga.c (setup_noirq, line): moved DMA channel command setting to
  per-session setup
- ubb-vga.c (setup_noirq, line): moved DMA request type setting to
  per-session setup
- ubb-vga.c (line): added commend that the target address needs to be
  set for each transfer, even if it doesn't change
This commit is contained in:
Werner Almesberger 2011-05-01 13:54:54 -03:00
parent b273f27c07
commit 9fb5c6f3f4

View File

@ -249,6 +249,11 @@ static void setup_noirq(void)
DMAC = 1; DMAC = 1;
DCS(DMA) = (1 << 3) | (1 << 2); DCS(DMA) = (1 << 3) | (1 << 2);
DCS(DMA) = 0; DCS(DMA) = 0;
DCM(DMA) =
(1 << 23) | /* source address increment */
(4 << 8); /* transfer size is 32 bytes */
DRT(DMA) = 26; /* MSC transmit-fifo-empty transfer request */
} }
@ -269,12 +274,8 @@ static void line(unsigned long line)
// DCS(DMA) = (1 << 31) | (1 << 3) | (1 << 2); // DCS(DMA) = (1 << 31) | (1 << 3) | (1 << 2);
DCS(DMA) = 1 << 31; DCS(DMA) = 1 << 31;
DSA(DMA) = line; DSA(DMA) = line;
DTA(DMA) = REG_PADDR(MSC_TXFIFO); DTA(DMA) = REG_PADDR(MSC_TXFIFO); /* MUST set this each time */
DTC(DMA) = mode->xres >> 6; DTC(DMA) = mode->xres >> 6;
DCM(DMA) =
(1 << 23) | /* source address increment */
(4 << 8); /* transfer size is 32 bytes */
DRT(DMA) = 26; /* MSC transmit-fifo-empty transfer request */
until(US(0.79)); until(US(0.79));