diff options
-rw-r--r-- | Documentation/devicetree/bindings/dma/snps-dma.txt | 2 | ||||
-rw-r--r-- | arch/arc/boot/dts/abilis_tb10x.dtsi | 2 | ||||
-rw-r--r-- | arch/arm/boot/dts/spear13xx.dtsi | 4 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 2 | ||||
-rw-r--r-- | drivers/dma/dw/core.c | 3 | ||||
-rw-r--r-- | drivers/dma/dw/platform.c | 4 | ||||
-rw-r--r-- | drivers/dma/dw/regs.h | 2 | ||||
-rw-r--r-- | include/linux/platform_data/dma-dw.h | 4 |
8 files changed, 13 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index d58675ea1abf..c261598164a7 100644 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt | |||
@@ -38,7 +38,7 @@ Example: | |||
38 | chan_allocation_order = <1>; | 38 | chan_allocation_order = <1>; |
39 | chan_priority = <1>; | 39 | chan_priority = <1>; |
40 | block_size = <0xfff>; | 40 | block_size = <0xfff>; |
41 | data_width = <3 3 0 0>; | 41 | data_width = <3 3>; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | DMA clients connected to the Designware DMA controller must use the format | 44 | DMA clients connected to the Designware DMA controller must use the format |
diff --git a/arch/arc/boot/dts/abilis_tb10x.dtsi b/arch/arc/boot/dts/abilis_tb10x.dtsi index a098d7c05e96..cfb5052239a1 100644 --- a/arch/arc/boot/dts/abilis_tb10x.dtsi +++ b/arch/arc/boot/dts/abilis_tb10x.dtsi | |||
@@ -112,7 +112,7 @@ | |||
112 | chan_allocation_order = <0>; | 112 | chan_allocation_order = <0>; |
113 | chan_priority = <1>; | 113 | chan_priority = <1>; |
114 | block_size = <0x7ff>; | 114 | block_size = <0x7ff>; |
115 | data_width = <2 0 0 0>; | 115 | data_width = <2>; |
116 | clocks = <&ahb_clk>; | 116 | clocks = <&ahb_clk>; |
117 | clock-names = "hclk"; | 117 | clock-names = "hclk"; |
118 | }; | 118 | }; |
diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi index a6eb5436d26d..40accc87e3a2 100644 --- a/arch/arm/boot/dts/spear13xx.dtsi +++ b/arch/arm/boot/dts/spear13xx.dtsi | |||
@@ -117,7 +117,7 @@ | |||
117 | chan_priority = <1>; | 117 | chan_priority = <1>; |
118 | block_size = <0xfff>; | 118 | block_size = <0xfff>; |
119 | dma-masters = <2>; | 119 | dma-masters = <2>; |
120 | data_width = <3 3 0 0>; | 120 | data_width = <3 3>; |
121 | }; | 121 | }; |
122 | 122 | ||
123 | dma@eb000000 { | 123 | dma@eb000000 { |
@@ -133,7 +133,7 @@ | |||
133 | chan_allocation_order = <1>; | 133 | chan_allocation_order = <1>; |
134 | chan_priority = <1>; | 134 | chan_priority = <1>; |
135 | block_size = <0xfff>; | 135 | block_size = <0xfff>; |
136 | data_width = <3 3 0 0>; | 136 | data_width = <3 3>; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | fsmc: flash@b0000000 { | 139 | fsmc: flash@b0000000 { |
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index cc92cdb9994c..1d8b147282cf 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -607,7 +607,7 @@ static struct dw_dma_platform_data dw_dmac0_data = { | |||
607 | .nr_channels = 3, | 607 | .nr_channels = 3, |
608 | .block_size = 4095U, | 608 | .block_size = 4095U, |
609 | .nr_masters = 2, | 609 | .nr_masters = 2, |
610 | .data_width = { 2, 2, 0, 0 }, | 610 | .data_width = { 2, 2 }, |
611 | }; | 611 | }; |
612 | 612 | ||
613 | static struct resource dw_dmac0_resource[] = { | 613 | static struct resource dw_dmac0_resource[] = { |
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index fcb9a916e6f6..0469d8eda253 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c | |||
@@ -1562,7 +1562,8 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata) | |||
1562 | } | 1562 | } |
1563 | } else { | 1563 | } else { |
1564 | dw->nr_masters = pdata->nr_masters; | 1564 | dw->nr_masters = pdata->nr_masters; |
1565 | memcpy(dw->data_width, pdata->data_width, 4); | 1565 | for (i = 0; i < dw->nr_masters; i++) |
1566 | dw->data_width[i] = pdata->data_width[i]; | ||
1566 | } | 1567 | } |
1567 | 1568 | ||
1568 | /* Calculate all channel mask before DMA setup */ | 1569 | /* Calculate all channel mask before DMA setup */ |
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index a630161473a4..aaff37f53523 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c | |||
@@ -99,7 +99,7 @@ dw_dma_parse_dt(struct platform_device *pdev) | |||
99 | { | 99 | { |
100 | struct device_node *np = pdev->dev.of_node; | 100 | struct device_node *np = pdev->dev.of_node; |
101 | struct dw_dma_platform_data *pdata; | 101 | struct dw_dma_platform_data *pdata; |
102 | u32 tmp, arr[4]; | 102 | u32 tmp, arr[DW_DMA_MAX_NR_MASTERS]; |
103 | 103 | ||
104 | if (!np) { | 104 | if (!np) { |
105 | dev_err(&pdev->dev, "Missing DT data\n"); | 105 | dev_err(&pdev->dev, "Missing DT data\n"); |
@@ -126,7 +126,7 @@ dw_dma_parse_dt(struct platform_device *pdev) | |||
126 | pdata->block_size = tmp; | 126 | pdata->block_size = tmp; |
127 | 127 | ||
128 | if (!of_property_read_u32(np, "dma-masters", &tmp)) { | 128 | if (!of_property_read_u32(np, "dma-masters", &tmp)) { |
129 | if (tmp > 4) | 129 | if (tmp > DW_DMA_MAX_NR_MASTERS) |
130 | return NULL; | 130 | return NULL; |
131 | 131 | ||
132 | pdata->nr_masters = tmp; | 132 | pdata->nr_masters = tmp; |
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h index 254a1db03680..241ff2b1402b 100644 --- a/drivers/dma/dw/regs.h +++ b/drivers/dma/dw/regs.h | |||
@@ -285,7 +285,7 @@ struct dw_dma { | |||
285 | 285 | ||
286 | /* hardware configuration */ | 286 | /* hardware configuration */ |
287 | unsigned char nr_masters; | 287 | unsigned char nr_masters; |
288 | unsigned char data_width[4]; | 288 | unsigned char data_width[DW_DMA_MAX_NR_MASTERS]; |
289 | }; | 289 | }; |
290 | 290 | ||
291 | static inline struct dw_dma_regs __iomem *__dw_regs(struct dw_dma *dw) | 291 | static inline struct dw_dma_regs __iomem *__dw_regs(struct dw_dma *dw) |
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h index 359127d290e7..87ac14c584f2 100644 --- a/include/linux/platform_data/dma-dw.h +++ b/include/linux/platform_data/dma-dw.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | 15 | ||
16 | #define DW_DMA_MAX_NR_MASTERS 4 | ||
17 | |||
16 | /** | 18 | /** |
17 | * struct dw_dma_slave - Controller-specific information about a slave | 19 | * struct dw_dma_slave - Controller-specific information about a slave |
18 | * | 20 | * |
@@ -53,7 +55,7 @@ struct dw_dma_platform_data { | |||
53 | unsigned char chan_priority; | 55 | unsigned char chan_priority; |
54 | unsigned short block_size; | 56 | unsigned short block_size; |
55 | unsigned char nr_masters; | 57 | unsigned char nr_masters; |
56 | unsigned char data_width[4]; | 58 | unsigned char data_width[DW_DMA_MAX_NR_MASTERS]; |
57 | }; | 59 | }; |
58 | 60 | ||
59 | #endif /* _PLATFORM_DATA_DMA_DW_H */ | 61 | #endif /* _PLATFORM_DATA_DMA_DW_H */ |