diff options
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/dma.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/dma.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/dma.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/dma.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/dma.c | 10 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/dma.h | 9 | ||||
-rw-r--r-- | arch/arm/plat-samsung/s3c-dma-ops.c | 5 | ||||
-rw-r--r-- | drivers/mmc/host/s3cmci.c | 6 |
9 files changed, 22 insertions, 28 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h index 4e485bab66de..ae8e482b6427 100644 --- a/arch/arm/mach-s3c2410/include/mach/dma.h +++ b/arch/arm/mach-s3c2410/include/mach/dma.h | |||
@@ -174,7 +174,7 @@ struct s3c2410_dma_chan { | |||
174 | struct s3c2410_dma_client *client; | 174 | struct s3c2410_dma_client *client; |
175 | 175 | ||
176 | /* channel configuration */ | 176 | /* channel configuration */ |
177 | enum s3c2410_dmasrc source; | 177 | enum dma_data_direction source; |
178 | enum dma_ch req_ch; | 178 | enum dma_ch req_ch; |
179 | unsigned long dev_addr; | 179 | unsigned long dev_addr; |
180 | unsigned long load_timeout; | 180 | unsigned long load_timeout; |
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index 7abecfca0b7e..b4fc3ba367d6 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c | |||
@@ -148,11 +148,11 @@ static struct s3c24xx_dma_map __initdata s3c2412_dma_mappings[] = { | |||
148 | 148 | ||
149 | static void s3c2412_dma_direction(struct s3c2410_dma_chan *chan, | 149 | static void s3c2412_dma_direction(struct s3c2410_dma_chan *chan, |
150 | struct s3c24xx_dma_map *map, | 150 | struct s3c24xx_dma_map *map, |
151 | enum s3c2410_dmasrc dir) | 151 | enum dma_data_direction dir) |
152 | { | 152 | { |
153 | unsigned long chsel; | 153 | unsigned long chsel; |
154 | 154 | ||
155 | if (dir == S3C2410_DMASRC_HW) | 155 | if (dir == DMA_FROM_DEVICE) |
156 | chsel = map->channels_rx[0]; | 156 | chsel = map->channels_rx[0]; |
157 | else | 157 | else |
158 | chsel = map->channels[0]; | 158 | chsel = map->channels[0]; |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 204bfafe4bfc..67c97fab62fd 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -147,14 +147,14 @@ static void s3c64xx_dma_fill_lli(struct s3c2410_dma_chan *chan, | |||
147 | u32 control0, control1; | 147 | u32 control0, control1; |
148 | 148 | ||
149 | switch (chan->source) { | 149 | switch (chan->source) { |
150 | case S3C2410_DMASRC_HW: | 150 | case DMA_FROM_DEVICE: |
151 | src = chan->dev_addr; | 151 | src = chan->dev_addr; |
152 | dst = data; | 152 | dst = data; |
153 | control0 = PL080_CONTROL_SRC_AHB2; | 153 | control0 = PL080_CONTROL_SRC_AHB2; |
154 | control0 |= PL080_CONTROL_DST_INCR; | 154 | control0 |= PL080_CONTROL_DST_INCR; |
155 | break; | 155 | break; |
156 | 156 | ||
157 | case S3C2410_DMASRC_MEM: | 157 | case DMA_TO_DEVICE: |
158 | src = data; | 158 | src = data; |
159 | dst = chan->dev_addr; | 159 | dst = chan->dev_addr; |
160 | control0 = PL080_CONTROL_DST_AHB2; | 160 | control0 = PL080_CONTROL_DST_AHB2; |
@@ -416,7 +416,7 @@ EXPORT_SYMBOL(s3c2410_dma_enqueue); | |||
416 | 416 | ||
417 | 417 | ||
418 | int s3c2410_dma_devconfig(enum dma_ch channel, | 418 | int s3c2410_dma_devconfig(enum dma_ch channel, |
419 | enum s3c2410_dmasrc source, | 419 | enum dma_data_direction source, |
420 | unsigned long devaddr) | 420 | unsigned long devaddr) |
421 | { | 421 | { |
422 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); | 422 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); |
@@ -437,11 +437,11 @@ int s3c2410_dma_devconfig(enum dma_ch channel, | |||
437 | pr_debug("%s: peripheral %d\n", __func__, peripheral); | 437 | pr_debug("%s: peripheral %d\n", __func__, peripheral); |
438 | 438 | ||
439 | switch (source) { | 439 | switch (source) { |
440 | case S3C2410_DMASRC_HW: | 440 | case DMA_FROM_DEVICE: |
441 | config = 2 << PL080_CONFIG_FLOW_CONTROL_SHIFT; | 441 | config = 2 << PL080_CONFIG_FLOW_CONTROL_SHIFT; |
442 | config |= peripheral << PL080_CONFIG_SRC_SEL_SHIFT; | 442 | config |= peripheral << PL080_CONFIG_SRC_SEL_SHIFT; |
443 | break; | 443 | break; |
444 | case S3C2410_DMASRC_MEM: | 444 | case DMA_TO_DEVICE: |
445 | config = 1 << PL080_CONFIG_FLOW_CONTROL_SHIFT; | 445 | config = 1 << PL080_CONFIG_FLOW_CONTROL_SHIFT; |
446 | config |= peripheral << PL080_CONFIG_DST_SEL_SHIFT; | 446 | config |= peripheral << PL080_CONFIG_DST_SEL_SHIFT; |
447 | break; | 447 | break; |
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c64xx/include/mach/dma.h index 74fdf25c9042..fe1a98cf0e4c 100644 --- a/arch/arm/mach-s3c64xx/include/mach/dma.h +++ b/arch/arm/mach-s3c64xx/include/mach/dma.h | |||
@@ -99,7 +99,7 @@ struct s3c2410_dma_chan { | |||
99 | unsigned char peripheral; | 99 | unsigned char peripheral; |
100 | 100 | ||
101 | unsigned int flags; | 101 | unsigned int flags; |
102 | enum s3c2410_dmasrc source; | 102 | enum dma_data_direction source; |
103 | 103 | ||
104 | 104 | ||
105 | dma_addr_t dev_addr; | 105 | dma_addr_t dev_addr; |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 539bd0e3defd..53754bcf15a7 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1094,14 +1094,14 @@ EXPORT_SYMBOL(s3c2410_dma_config); | |||
1094 | * | 1094 | * |
1095 | * configure the dma source/destination hardware type and address | 1095 | * configure the dma source/destination hardware type and address |
1096 | * | 1096 | * |
1097 | * source: S3C2410_DMASRC_HW: source is hardware | 1097 | * source: DMA_FROM_DEVICE: source is hardware |
1098 | * S3C2410_DMASRC_MEM: source is memory | 1098 | * DMA_TO_DEVICE: source is memory |
1099 | * | 1099 | * |
1100 | * devaddr: physical address of the source | 1100 | * devaddr: physical address of the source |
1101 | */ | 1101 | */ |
1102 | 1102 | ||
1103 | int s3c2410_dma_devconfig(enum dma_ch channel, | 1103 | int s3c2410_dma_devconfig(enum dma_ch channel, |
1104 | enum s3c2410_dmasrc source, | 1104 | enum dma_data_direction source, |
1105 | unsigned long devaddr) | 1105 | unsigned long devaddr) |
1106 | { | 1106 | { |
1107 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); | 1107 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); |
@@ -1131,7 +1131,7 @@ int s3c2410_dma_devconfig(enum dma_ch channel, | |||
1131 | hwcfg |= S3C2410_DISRCC_INC; | 1131 | hwcfg |= S3C2410_DISRCC_INC; |
1132 | 1132 | ||
1133 | switch (source) { | 1133 | switch (source) { |
1134 | case S3C2410_DMASRC_HW: | 1134 | case DMA_FROM_DEVICE: |
1135 | /* source is hardware */ | 1135 | /* source is hardware */ |
1136 | pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n", | 1136 | pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n", |
1137 | __func__, devaddr, hwcfg); | 1137 | __func__, devaddr, hwcfg); |
@@ -1142,7 +1142,7 @@ int s3c2410_dma_devconfig(enum dma_ch channel, | |||
1142 | chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DIDST); | 1142 | chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DIDST); |
1143 | break; | 1143 | break; |
1144 | 1144 | ||
1145 | case S3C2410_DMASRC_MEM: | 1145 | case DMA_TO_DEVICE: |
1146 | /* source is memory */ | 1146 | /* source is memory */ |
1147 | pr_debug("%s: mem source, devaddr=%08lx, hwcfg=%d\n", | 1147 | pr_debug("%s: mem source, devaddr=%08lx, hwcfg=%d\n", |
1148 | __func__, devaddr, hwcfg); | 1148 | __func__, devaddr, hwcfg); |
diff --git a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h index 336d5ac02035..19828296a562 100644 --- a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h +++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | |||
@@ -47,7 +47,7 @@ struct s3c24xx_dma_selection { | |||
47 | 47 | ||
48 | void (*direction)(struct s3c2410_dma_chan *chan, | 48 | void (*direction)(struct s3c2410_dma_chan *chan, |
49 | struct s3c24xx_dma_map *map, | 49 | struct s3c24xx_dma_map *map, |
50 | enum s3c2410_dmasrc dir); | 50 | enum dma_data_direction dir); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | 53 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); |
diff --git a/arch/arm/plat-samsung/include/plat/dma.h b/arch/arm/plat-samsung/include/plat/dma.h index 361076060744..b9061128abde 100644 --- a/arch/arm/plat-samsung/include/plat/dma.h +++ b/arch/arm/plat-samsung/include/plat/dma.h | |||
@@ -10,17 +10,14 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/dma-mapping.h> | ||
14 | |||
13 | enum s3c2410_dma_buffresult { | 15 | enum s3c2410_dma_buffresult { |
14 | S3C2410_RES_OK, | 16 | S3C2410_RES_OK, |
15 | S3C2410_RES_ERR, | 17 | S3C2410_RES_ERR, |
16 | S3C2410_RES_ABORT | 18 | S3C2410_RES_ABORT |
17 | }; | 19 | }; |
18 | 20 | ||
19 | enum s3c2410_dmasrc { | ||
20 | S3C2410_DMASRC_HW, /* source is memory */ | ||
21 | S3C2410_DMASRC_MEM /* source is hardware */ | ||
22 | }; | ||
23 | |||
24 | /* enum s3c2410_chan_op | 21 | /* enum s3c2410_chan_op |
25 | * | 22 | * |
26 | * operation codes passed to the DMA code by the user, and also used | 23 | * operation codes passed to the DMA code by the user, and also used |
@@ -112,7 +109,7 @@ extern int s3c2410_dma_config(enum dma_ch channel, int xferunit); | |||
112 | */ | 109 | */ |
113 | 110 | ||
114 | extern int s3c2410_dma_devconfig(enum dma_ch channel, | 111 | extern int s3c2410_dma_devconfig(enum dma_ch channel, |
115 | enum s3c2410_dmasrc source, unsigned long devaddr); | 112 | enum dma_data_direction source, unsigned long devaddr); |
116 | 113 | ||
117 | /* s3c2410_dma_getposition | 114 | /* s3c2410_dma_getposition |
118 | * | 115 | * |
diff --git a/arch/arm/plat-samsung/s3c-dma-ops.c b/arch/arm/plat-samsung/s3c-dma-ops.c index 33ab3241268d..582333c70585 100644 --- a/arch/arm/plat-samsung/s3c-dma-ops.c +++ b/arch/arm/plat-samsung/s3c-dma-ops.c | |||
@@ -48,10 +48,7 @@ static unsigned s3c_dma_request(enum dma_ch dma_ch, | |||
48 | data->ch = dma_ch; | 48 | data->ch = dma_ch; |
49 | list_add_tail(&data->node, &dma_list); | 49 | list_add_tail(&data->node, &dma_list); |
50 | 50 | ||
51 | if (info->direction == DMA_FROM_DEVICE) | 51 | s3c2410_dma_devconfig(dma_ch, info->direction, info->fifo); |
52 | s3c2410_dma_devconfig(dma_ch, S3C2410_DMASRC_HW, info->fifo); | ||
53 | else | ||
54 | s3c2410_dma_devconfig(dma_ch, S3C2410_DMASRC_MEM, info->fifo); | ||
55 | 52 | ||
56 | if (info->cap == DMA_CYCLIC) | 53 | if (info->cap == DMA_CYCLIC) |
57 | s3c2410_dma_setflags(dma_ch, S3C2410_DMAF_CIRCULAR); | 54 | s3c2410_dma_setflags(dma_ch, S3C2410_DMAF_CIRCULAR); |
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index a04f87d7ee3d..03cfdab99c8f 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c | |||
@@ -913,9 +913,9 @@ request_done: | |||
913 | } | 913 | } |
914 | 914 | ||
915 | static void s3cmci_dma_setup(struct s3cmci_host *host, | 915 | static void s3cmci_dma_setup(struct s3cmci_host *host, |
916 | enum s3c2410_dmasrc source) | 916 | enum dma_data_direction source) |
917 | { | 917 | { |
918 | static enum s3c2410_dmasrc last_source = -1; | 918 | static enum dma_data_direction last_source = -1; |
919 | static int setup_ok; | 919 | static int setup_ok; |
920 | 920 | ||
921 | if (last_source == source) | 921 | if (last_source == source) |
@@ -1087,7 +1087,7 @@ static int s3cmci_prepare_dma(struct s3cmci_host *host, struct mmc_data *data) | |||
1087 | 1087 | ||
1088 | BUG_ON((data->flags & BOTH_DIR) == BOTH_DIR); | 1088 | BUG_ON((data->flags & BOTH_DIR) == BOTH_DIR); |
1089 | 1089 | ||
1090 | s3cmci_dma_setup(host, rw ? S3C2410_DMASRC_MEM : S3C2410_DMASRC_HW); | 1090 | s3cmci_dma_setup(host, rw ? DMA_TO_DEVICE : DMA_FROM_DEVICE); |
1091 | s3c2410_dma_ctrl(host->dma, S3C2410_DMAOP_FLUSH); | 1091 | s3c2410_dma_ctrl(host->dma, S3C2410_DMAOP_FLUSH); |
1092 | 1092 | ||
1093 | dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, | 1093 | dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, |