diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-01-22 02:29:18 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2008-01-22 02:29:18 -0500 |
commit | 2047e40d724d42928c0b5994a1568c1b738efdb7 (patch) | |
tree | 5653e4003441a8b22b1e9cad674c725a53f38f1f | |
parent | 4521ef42de8dbaa9bce3f60bbb5868564f752e98 (diff) |
[Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
-rw-r--r-- | arch/blackfin/kernel/bfin_dma_5xx.c | 4 | ||||
-rw-r--r-- | drivers/serial/bfin_5xx.c | 6 | ||||
-rw-r--r-- | drivers/video/bf54x-lq043fb.c | 3 | ||||
-rw-r--r-- | include/asm-blackfin/dma.h | 6 |
4 files changed, 13 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index b54446055a43..fa9debe8d5f4 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -339,13 +339,13 @@ EXPORT_SYMBOL(set_dma_config); | |||
339 | 339 | ||
340 | unsigned short | 340 | unsigned short |
341 | set_bfin_dma_config(char direction, char flow_mode, | 341 | set_bfin_dma_config(char direction, char flow_mode, |
342 | char intr_mode, char dma_mode, char width) | 342 | char intr_mode, char dma_mode, char width, char syncmode) |
343 | { | 343 | { |
344 | unsigned short config; | 344 | unsigned short config; |
345 | 345 | ||
346 | config = | 346 | config = |
347 | ((direction << 1) | (width << 2) | (dma_mode << 4) | | 347 | ((direction << 1) | (width << 2) | (dma_mode << 4) | |
348 | (intr_mode << 6) | (flow_mode << 12) | RESTART); | 348 | (intr_mode << 6) | (flow_mode << 12) | (syncmode << 5)); |
349 | return config; | 349 | return config; |
350 | } | 350 | } |
351 | EXPORT_SYMBOL(set_bfin_dma_config); | 351 | EXPORT_SYMBOL(set_bfin_dma_config); |
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 6f475b609864..ac2a3ef28d55 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -442,7 +442,8 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) | |||
442 | set_bfin_dma_config(DIR_READ, DMA_FLOW_STOP, | 442 | set_bfin_dma_config(DIR_READ, DMA_FLOW_STOP, |
443 | INTR_ON_BUF, | 443 | INTR_ON_BUF, |
444 | DIMENSION_LINEAR, | 444 | DIMENSION_LINEAR, |
445 | DATA_SIZE_8)); | 445 | DATA_SIZE_8, |
446 | DMA_SYNC_RESTART)); | ||
446 | set_dma_start_addr(uart->tx_dma_channel, (unsigned long)(xmit->buf+xmit->tail)); | 447 | set_dma_start_addr(uart->tx_dma_channel, (unsigned long)(xmit->buf+xmit->tail)); |
447 | set_dma_x_count(uart->tx_dma_channel, uart->tx_count); | 448 | set_dma_x_count(uart->tx_dma_channel, uart->tx_count); |
448 | set_dma_x_modify(uart->tx_dma_channel, 1); | 449 | set_dma_x_modify(uart->tx_dma_channel, 1); |
@@ -689,7 +690,8 @@ static int bfin_serial_startup(struct uart_port *port) | |||
689 | set_dma_config(uart->rx_dma_channel, | 690 | set_dma_config(uart->rx_dma_channel, |
690 | set_bfin_dma_config(DIR_WRITE, DMA_FLOW_AUTO, | 691 | set_bfin_dma_config(DIR_WRITE, DMA_FLOW_AUTO, |
691 | INTR_ON_ROW, DIMENSION_2D, | 692 | INTR_ON_ROW, DIMENSION_2D, |
692 | DATA_SIZE_8)); | 693 | DATA_SIZE_8, |
694 | DMA_SYNC_RESTART)); | ||
693 | set_dma_x_count(uart->rx_dma_channel, DMA_RX_XCOUNT); | 695 | set_dma_x_count(uart->rx_dma_channel, DMA_RX_XCOUNT); |
694 | set_dma_x_modify(uart->rx_dma_channel, 1); | 696 | set_dma_x_modify(uart->rx_dma_channel, 1); |
695 | set_dma_y_count(uart->rx_dma_channel, DMA_RX_YCOUNT); | 697 | set_dma_y_count(uart->rx_dma_channel, DMA_RX_YCOUNT); |
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index 74d11c318987..1b7e54de0d76 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c | |||
@@ -224,7 +224,8 @@ static int config_dma(struct bfin_bf54xfb_info *fbi) | |||
224 | set_dma_config(CH_EPPI0, | 224 | set_dma_config(CH_EPPI0, |
225 | set_bfin_dma_config(DIR_READ, DMA_FLOW_AUTO, | 225 | set_bfin_dma_config(DIR_READ, DMA_FLOW_AUTO, |
226 | INTR_DISABLE, DIMENSION_2D, | 226 | INTR_DISABLE, DIMENSION_2D, |
227 | DATA_SIZE_32)); | 227 | DATA_SIZE_32, |
228 | DMA_NOSYNC_KEEP_DMA_BUF)); | ||
228 | set_dma_x_count(CH_EPPI0, (LCD_X_RES * LCD_BPP) / DMA_BUS_SIZE); | 229 | set_dma_x_count(CH_EPPI0, (LCD_X_RES * LCD_BPP) / DMA_BUS_SIZE); |
229 | set_dma_x_modify(CH_EPPI0, DMA_BUS_SIZE / 8); | 230 | set_dma_x_modify(CH_EPPI0, DMA_BUS_SIZE / 8); |
230 | set_dma_y_count(CH_EPPI0, LCD_Y_RES); | 231 | set_dma_y_count(CH_EPPI0, LCD_Y_RES); |
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index b469505af364..5abaa2cee8db 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h | |||
@@ -76,6 +76,9 @@ enum dma_chan_status { | |||
76 | #define INTR_ON_BUF 2 | 76 | #define INTR_ON_BUF 2 |
77 | #define INTR_ON_ROW 3 | 77 | #define INTR_ON_ROW 3 |
78 | 78 | ||
79 | #define DMA_NOSYNC_KEEP_DMA_BUF 0 | ||
80 | #define DMA_SYNC_RESTART 1 | ||
81 | |||
79 | struct dmasg { | 82 | struct dmasg { |
80 | unsigned long next_desc_addr; | 83 | unsigned long next_desc_addr; |
81 | unsigned long start_addr; | 84 | unsigned long start_addr; |
@@ -157,7 +160,8 @@ void set_dma_y_count(unsigned int channel, unsigned short y_count); | |||
157 | void set_dma_y_modify(unsigned int channel, short y_modify); | 160 | void set_dma_y_modify(unsigned int channel, short y_modify); |
158 | void set_dma_config(unsigned int channel, unsigned short config); | 161 | void set_dma_config(unsigned int channel, unsigned short config); |
159 | unsigned short set_bfin_dma_config(char direction, char flow_mode, | 162 | unsigned short set_bfin_dma_config(char direction, char flow_mode, |
160 | char intr_mode, char dma_mode, char width); | 163 | char intr_mode, char dma_mode, char width, |
164 | char syncmode); | ||
161 | void set_dma_curr_addr(unsigned int channel, unsigned long addr); | 165 | void set_dma_curr_addr(unsigned int channel, unsigned long addr); |
162 | 166 | ||
163 | /* get curr status for polling */ | 167 | /* get curr status for polling */ |