diff options
-rw-r--r-- | drivers/dma/amba-pl08x.c | 16 | ||||
-rw-r--r-- | include/linux/amba/pl08x.h | 5 |
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 707fa081c9fa..fada97873d7d 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -107,7 +107,7 @@ struct vendor_data { | |||
107 | * An LLI struct - see PL08x TRM. Note that next uses bit[0] as a bus bit, | 107 | * An LLI struct - see PL08x TRM. Note that next uses bit[0] as a bus bit, |
108 | * start & end do not - their bus bit info is in cctl. | 108 | * start & end do not - their bus bit info is in cctl. |
109 | */ | 109 | */ |
110 | struct lli { | 110 | struct pl08x_lli { |
111 | dma_addr_t src; | 111 | dma_addr_t src; |
112 | dma_addr_t dst; | 112 | dma_addr_t dst; |
113 | dma_addr_t next; | 113 | dma_addr_t next; |
@@ -160,7 +160,7 @@ struct pl08x_driver_data { | |||
160 | 160 | ||
161 | /* Maximum times we call dma_pool_alloc on this pool without freeing */ | 161 | /* Maximum times we call dma_pool_alloc on this pool without freeing */ |
162 | #define PL08X_MAX_ALLOCS 0x40 | 162 | #define PL08X_MAX_ALLOCS 0x40 |
163 | #define MAX_NUM_TSFR_LLIS (PL08X_LLI_TSFR_SIZE/sizeof(struct lli)) | 163 | #define MAX_NUM_TSFR_LLIS (PL08X_LLI_TSFR_SIZE/sizeof(struct pl08x_lli)) |
164 | #define PL08X_ALIGN 8 | 164 | #define PL08X_ALIGN 8 |
165 | 165 | ||
166 | static inline struct pl08x_dma_chan *to_pl08x_chan(struct dma_chan *chan) | 166 | static inline struct pl08x_dma_chan *to_pl08x_chan(struct dma_chan *chan) |
@@ -354,8 +354,8 @@ static u32 pl08x_getbytes_chan(struct pl08x_dma_chan *plchan) | |||
354 | * currently active transaction. | 354 | * currently active transaction. |
355 | */ | 355 | */ |
356 | if (ch && txd) { | 356 | if (ch && txd) { |
357 | struct lli *llis_va = txd->llis_va; | 357 | struct pl08x_lli *llis_va = txd->llis_va; |
358 | struct lli *llis_bus = (struct lli *) txd->llis_bus; | 358 | struct pl08x_lli *llis_bus = (struct pl08x_lli *) txd->llis_bus; |
359 | u32 clli = readl(ch->base + PL080_CH_LLI); | 359 | u32 clli = readl(ch->base + PL080_CH_LLI); |
360 | 360 | ||
361 | /* First get the bytes in the current active LLI */ | 361 | /* First get the bytes in the current active LLI */ |
@@ -558,8 +558,8 @@ static int pl08x_fill_lli_for_desc(struct pl08x_driver_data *pl08x, | |||
558 | struct pl08x_txd *txd, int num_llis, int len, | 558 | struct pl08x_txd *txd, int num_llis, int len, |
559 | u32 cctl, u32 *remainder) | 559 | u32 cctl, u32 *remainder) |
560 | { | 560 | { |
561 | struct lli *llis_va = txd->llis_va; | 561 | struct pl08x_lli *llis_va = txd->llis_va; |
562 | struct lli *llis_bus = (struct lli *) txd->llis_bus; | 562 | struct pl08x_lli *llis_bus = (struct pl08x_lli *) txd->llis_bus; |
563 | 563 | ||
564 | BUG_ON(num_llis >= MAX_NUM_TSFR_LLIS); | 564 | BUG_ON(num_llis >= MAX_NUM_TSFR_LLIS); |
565 | 565 | ||
@@ -620,8 +620,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, | |||
620 | u32 cctl; | 620 | u32 cctl; |
621 | int max_bytes_per_lli; | 621 | int max_bytes_per_lli; |
622 | int total_bytes = 0; | 622 | int total_bytes = 0; |
623 | struct lli *llis_va; | 623 | struct pl08x_lli *llis_va; |
624 | struct lli *llis_bus; | 624 | struct pl08x_lli *llis_bus; |
625 | 625 | ||
626 | txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, | 626 | txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, |
627 | &txd->llis_bus); | 627 | &txd->llis_bus); |
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h index 4ae62b4684f9..3ecc20fce26a 100644 --- a/include/linux/amba/pl08x.h +++ b/include/linux/amba/pl08x.h | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <linux/dmaengine.h> | 22 | #include <linux/dmaengine.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | 24 | ||
25 | struct pl08x_lli; | ||
26 | struct pl08x_driver_data; | ||
27 | |||
25 | /** | 28 | /** |
26 | * struct pl08x_channel_data - data structure to pass info between | 29 | * struct pl08x_channel_data - data structure to pass info between |
27 | * platform and PL08x driver regarding channel configuration | 30 | * platform and PL08x driver regarding channel configuration |
@@ -179,7 +182,7 @@ struct pl08x_dma_chan { | |||
179 | struct pl08x_txd *at; | 182 | struct pl08x_txd *at; |
180 | unsigned long lockflags; | 183 | unsigned long lockflags; |
181 | spinlock_t lock; | 184 | spinlock_t lock; |
182 | void *host; | 185 | struct pl08x_driver_data *host; |
183 | enum pl08x_dma_chan_state state; | 186 | enum pl08x_dma_chan_state state; |
184 | bool slave; | 187 | bool slave; |
185 | struct pl08x_txd *waiting; | 188 | struct pl08x_txd *waiting; |