[Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add...
authorMichael Hennerich <michael.hennerich@analog.com>
Tue, 22 Jan 2008 07:29:18 +0000 (15:29 +0800)
committerBryan Wu <bryan.wu@analog.com>
Tue, 22 Jan 2008 07:29:18 +0000 (15:29 +0800)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/kernel/bfin_dma_5xx.c
drivers/serial/bfin_5xx.c
drivers/video/bf54x-lq043fb.c
include/asm-blackfin/dma.h

index b54446055a43c3360ba8551ef5a80e1205664d4e..fa9debe8d5f4e7dff0581851dddda87ed27cc93e 100644 (file)
@@ -339,13 +339,13 @@ EXPORT_SYMBOL(set_dma_config);
 
 unsigned short
 set_bfin_dma_config(char direction, char flow_mode,
-                   char intr_mode, char dma_mode, char width)
+                   char intr_mode, char dma_mode, char width, char syncmode)
 {
        unsigned short config;
 
        config =
            ((direction << 1) | (width << 2) | (dma_mode << 4) |
-            (intr_mode << 6) | (flow_mode << 12) | RESTART);
+            (intr_mode << 6) | (flow_mode << 12) | (syncmode << 5));
        return config;
 }
 EXPORT_SYMBOL(set_bfin_dma_config);
index 6f475b6098643751cf630dd7e26cb3294645182c..ac2a3ef28d55435d3673a8909e01ee27c77ebd82 100644 (file)
@@ -442,7 +442,8 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
                set_bfin_dma_config(DIR_READ, DMA_FLOW_STOP,
                        INTR_ON_BUF,
                        DIMENSION_LINEAR,
-                       DATA_SIZE_8));
+                       DATA_SIZE_8,
+                       DMA_SYNC_RESTART));
        set_dma_start_addr(uart->tx_dma_channel, (unsigned long)(xmit->buf+xmit->tail));
        set_dma_x_count(uart->tx_dma_channel, uart->tx_count);
        set_dma_x_modify(uart->tx_dma_channel, 1);
@@ -689,7 +690,8 @@ static int bfin_serial_startup(struct uart_port *port)
        set_dma_config(uart->rx_dma_channel,
                set_bfin_dma_config(DIR_WRITE, DMA_FLOW_AUTO,
                                INTR_ON_ROW, DIMENSION_2D,
-                               DATA_SIZE_8));
+                               DATA_SIZE_8,
+                               DMA_SYNC_RESTART));
        set_dma_x_count(uart->rx_dma_channel, DMA_RX_XCOUNT);
        set_dma_x_modify(uart->rx_dma_channel, 1);
        set_dma_y_count(uart->rx_dma_channel, DMA_RX_YCOUNT);
index 74d11c318987d462b3ee6f6cb59e2d7b36589106..1b7e54de0d7632048d6a871252ad0f616c46143b 100644 (file)
@@ -224,7 +224,8 @@ static int config_dma(struct bfin_bf54xfb_info *fbi)
        set_dma_config(CH_EPPI0,
                       set_bfin_dma_config(DIR_READ, DMA_FLOW_AUTO,
                                           INTR_DISABLE, DIMENSION_2D,
-                                          DATA_SIZE_32));
+                                          DATA_SIZE_32,
+                                          DMA_NOSYNC_KEEP_DMA_BUF));
        set_dma_x_count(CH_EPPI0, (LCD_X_RES * LCD_BPP) / DMA_BUS_SIZE);
        set_dma_x_modify(CH_EPPI0, DMA_BUS_SIZE / 8);
        set_dma_y_count(CH_EPPI0, LCD_Y_RES);
index b469505af3642ef24c55a48bad402dd127a81c6c..5abaa2cee8dbd7da51d937ab4c77bc85daaa25e9 100644 (file)
@@ -76,6 +76,9 @@ enum dma_chan_status {
 #define INTR_ON_BUF    2
 #define INTR_ON_ROW    3
 
+#define DMA_NOSYNC_KEEP_DMA_BUF        0
+#define DMA_SYNC_RESTART       1
+
 struct dmasg {
        unsigned long next_desc_addr;
        unsigned long start_addr;
@@ -157,7 +160,8 @@ void set_dma_y_count(unsigned int channel, unsigned short y_count);
 void set_dma_y_modify(unsigned int channel, short y_modify);
 void set_dma_config(unsigned int channel, unsigned short config);
 unsigned short set_bfin_dma_config(char direction, char flow_mode,
-                                  char intr_mode, char dma_mode, char width);
+                                  char intr_mode, char dma_mode, char width,
+                                  char syncmode);
 void set_dma_curr_addr(unsigned int channel, unsigned long addr);
 
 /* get curr status for polling */