aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-06-14 19:53:54 -0400
committerOlof Johansson <olof@lixom.net>2013-06-14 19:53:54 -0400
commit2c3165ebb641e0ff3faf1c87ed1c8fbd85871da0 (patch)
treeecf0bef4ee0b56029d0f08aed941aca78da99424
parent0d86331b4cc9b0c52d41bbe78cb4b75f40b7381c (diff)
parent499c2bc3cc89dcbbf08aa526cd4a984b92a4d2a8 (diff)
Merge tag 'ux500-dma40-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers
From Linus Walleij: Second set of DMA40 changes: refactorings and device tree support for the DMA40. Now with MUSB and some platform data removal. * tag 'ux500-dma40-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: dmaengine: ste_dma40: Fetch disabled channels from DT dmaengine: ste_dma40: Fetch the number of physical channels from DT ARM: ux500: Stop passing DMA platform data though AUXDATA dmaengine: ste_dma40: Allow memcpy channels to be configured from DT dmaengine: ste_dma40_ll: Replace meaningless register set with comment dmaengine: ste_dma40: Convert data_width from register bit format to value dmaengine: ste_dma40_ll: Use the BIT macro to replace ugly '(1 << x)'s ARM: ux500: Remove recently unused stedma40_xfer_dir enums dmaengine: ste_dma40: Replace ST-E's home-brew DMA direction defs with generic ones ARM: ux500: Replace ST-E's home-brew DMA direction definition with the generic one dmaengine: ste_dma40: Use the BIT macro to replace ugly '(1 << x)'s ARM: ux500: Remove empty function u8500_of_init_devices() ARM: ux500: Remove ux500-musb platform registation when booting with DT usb: musb: ux500: add device tree probing support usb: musb: ux500: attempt to find channels by name before using pdata usb: musb: ux500: harden checks for platform data usb: musb: ux500: take the dma_mask from coherent_dma_mask usb: musb: ux500: move the MUSB HDRC configuration into the driver usb: musb: ux500: move channel number knowledge into the driver
-rw-r--r--Documentation/devicetree/bindings/dma/ste-dma40.txt4
-rw-r--r--Documentation/devicetree/bindings/usb/ux500-usb.txt50
-rw-r--r--arch/arm/mach-ux500/board-mop500-audio.c12
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c16
-rw-r--r--arch/arm/mach-ux500/board-mop500.c22
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c19
-rw-r--r--arch/arm/mach-ux500/usb.c29
-rw-r--r--drivers/dma/ste_dma40.c199
-rw-r--r--drivers/dma/ste_dma40_ll.c117
-rw-r--r--drivers/usb/musb/ux500.c61
-rw-r--r--drivers/usb/musb/ux500_dma.c59
-rw-r--r--include/linux/platform_data/dma-ste-dma40.h21
-rw-r--r--include/linux/platform_data/usb-musb-ux500.h5
-rw-r--r--sound/soc/ux500/ux500_pcm.c10
14 files changed, 374 insertions, 250 deletions
diff --git a/Documentation/devicetree/bindings/dma/ste-dma40.txt b/Documentation/devicetree/bindings/dma/ste-dma40.txt
index 2679a873522d..bea5b73a7390 100644
--- a/Documentation/devicetree/bindings/dma/ste-dma40.txt
+++ b/Documentation/devicetree/bindings/dma/ste-dma40.txt
@@ -6,10 +6,12 @@ Required properties:
6- reg-names: Names of the above areas to use during resource look-up 6- reg-names: Names of the above areas to use during resource look-up
7- interrupt: Should contain the DMAC interrupt number 7- interrupt: Should contain the DMAC interrupt number
8- #dma-cells: must be <3> 8- #dma-cells: must be <3>
9- memcpy-channels: Channels to be used for memcpy
9 10
10Optional properties: 11Optional properties:
11- dma-channels: Number of channels supported by hardware - if not present 12- dma-channels: Number of channels supported by hardware - if not present
12 the driver will attempt to obtain the information from H/W 13 the driver will attempt to obtain the information from H/W
14- disabled-channels: Channels which can not be used
13 15
14Example: 16Example:
15 17
@@ -21,6 +23,8 @@ Example:
21 interrupts = <0 25 0x4>; 23 interrupts = <0 25 0x4>;
22 24
23 #dma-cells = <2>; 25 #dma-cells = <2>;
26 memcpy-channels = <56 57 58 59 60>;
27 disabled-channels = <12>;
24 dma-channels = <8>; 28 dma-channels = <8>;
25 }; 29 };
26 30
diff --git a/Documentation/devicetree/bindings/usb/ux500-usb.txt b/Documentation/devicetree/bindings/usb/ux500-usb.txt
new file mode 100644
index 000000000000..330d6ec15401
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ux500-usb.txt
@@ -0,0 +1,50 @@
1Ux500 MUSB
2
3Required properties:
4 - compatible : Should be "stericsson,db8500-musb"
5 - reg : Offset and length of registers
6 - interrupts : Interrupt; mode, number and trigger
7 - dr_mode : Dual-role; either host mode "host", peripheral mode "peripheral"
8 or both "otg"
9
10Optional properties:
11 - dmas : A list of dma channels;
12 dma-controller, event-line, fixed-channel, flags
13 - dma-names : An ordered list of channel names affiliated to the above
14
15Example:
16
17usb_per5@a03e0000 {
18 compatible = "stericsson,db8500-musb", "mentor,musb";
19 reg = <0xa03e0000 0x10000>;
20 interrupts = <0 23 0x4>;
21 interrupt-names = "mc";
22
23 dr_mode = "otg";
24
25 dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
26 <&dma 38 0 0x0>, /* Logical - MemToDev */
27 <&dma 37 0 0x2>, /* Logical - DevToMem */
28 <&dma 37 0 0x0>, /* Logical - MemToDev */
29 <&dma 36 0 0x2>, /* Logical - DevToMem */
30 <&dma 36 0 0x0>, /* Logical - MemToDev */
31 <&dma 19 0 0x2>, /* Logical - DevToMem */
32 <&dma 19 0 0x0>, /* Logical - MemToDev */
33 <&dma 18 0 0x2>, /* Logical - DevToMem */
34 <&dma 18 0 0x0>, /* Logical - MemToDev */
35 <&dma 17 0 0x2>, /* Logical - DevToMem */
36 <&dma 17 0 0x0>, /* Logical - MemToDev */
37 <&dma 16 0 0x2>, /* Logical - DevToMem */
38 <&dma 16 0 0x0>, /* Logical - MemToDev */
39 <&dma 39 0 0x2>, /* Logical - DevToMem */
40 <&dma 39 0 0x0>; /* Logical - MemToDev */
41
42 dma-names = "iep_1_9", "oep_1_9",
43 "iep_2_10", "oep_2_10",
44 "iep_3_11", "oep_3_11",
45 "iep_4_12", "oep_4_12",
46 "iep_5_13", "oep_5_13",
47 "iep_6_14", "oep_6_14",
48 "iep_7_15", "oep_7_15",
49 "iep_8", "oep_8";
50};
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c
index ec872622340f..bfe443daf4b0 100644
--- a/arch/arm/mach-ux500/board-mop500-audio.c
+++ b/arch/arm/mach-ux500/board-mop500-audio.c
@@ -21,13 +21,13 @@
21 21
22static struct stedma40_chan_cfg msp0_dma_rx = { 22static struct stedma40_chan_cfg msp0_dma_rx = {
23 .high_priority = true, 23 .high_priority = true,
24 .dir = STEDMA40_PERIPH_TO_MEM, 24 .dir = DMA_DEV_TO_MEM,
25 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0, 25 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
26}; 26};
27 27
28static struct stedma40_chan_cfg msp0_dma_tx = { 28static struct stedma40_chan_cfg msp0_dma_tx = {
29 .high_priority = true, 29 .high_priority = true,
30 .dir = STEDMA40_MEM_TO_PERIPH, 30 .dir = DMA_MEM_TO_DEV,
31 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0, 31 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
32}; 32};
33 33
@@ -39,13 +39,13 @@ struct msp_i2s_platform_data msp0_platform_data = {
39 39
40static struct stedma40_chan_cfg msp1_dma_rx = { 40static struct stedma40_chan_cfg msp1_dma_rx = {
41 .high_priority = true, 41 .high_priority = true,
42 .dir = STEDMA40_PERIPH_TO_MEM, 42 .dir = DMA_DEV_TO_MEM,
43 .dev_type = DB8500_DMA_DEV30_MSP3, 43 .dev_type = DB8500_DMA_DEV30_MSP3,
44}; 44};
45 45
46static struct stedma40_chan_cfg msp1_dma_tx = { 46static struct stedma40_chan_cfg msp1_dma_tx = {
47 .high_priority = true, 47 .high_priority = true,
48 .dir = STEDMA40_MEM_TO_PERIPH, 48 .dir = DMA_MEM_TO_DEV,
49 .dev_type = DB8500_DMA_DEV30_MSP1, 49 .dev_type = DB8500_DMA_DEV30_MSP1,
50}; 50};
51 51
@@ -57,13 +57,13 @@ struct msp_i2s_platform_data msp1_platform_data = {
57 57
58static struct stedma40_chan_cfg msp2_dma_rx = { 58static struct stedma40_chan_cfg msp2_dma_rx = {
59 .high_priority = true, 59 .high_priority = true,
60 .dir = STEDMA40_PERIPH_TO_MEM, 60 .dir = DMA_DEV_TO_MEM,
61 .dev_type = DB8500_DMA_DEV14_MSP2, 61 .dev_type = DB8500_DMA_DEV14_MSP2,
62}; 62};
63 63
64static struct stedma40_chan_cfg msp2_dma_tx = { 64static struct stedma40_chan_cfg msp2_dma_tx = {
65 .high_priority = true, 65 .high_priority = true,
66 .dir = STEDMA40_MEM_TO_PERIPH, 66 .dir = DMA_MEM_TO_DEV,
67 .dev_type = DB8500_DMA_DEV14_MSP2, 67 .dev_type = DB8500_DMA_DEV14_MSP2,
68 .use_fixed_channel = true, 68 .use_fixed_channel = true,
69 .phy_channel = 1, 69 .phy_channel = 1,
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 29be714b8a73..e6891d1933fa 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -34,13 +34,13 @@
34#ifdef CONFIG_STE_DMA40 34#ifdef CONFIG_STE_DMA40
35struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = { 35struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = {
36 .mode = STEDMA40_MODE_LOGICAL, 36 .mode = STEDMA40_MODE_LOGICAL,
37 .dir = STEDMA40_PERIPH_TO_MEM, 37 .dir = DMA_DEV_TO_MEM,
38 .dev_type = DB8500_DMA_DEV29_SD_MM0, 38 .dev_type = DB8500_DMA_DEV29_SD_MM0,
39}; 39};
40 40
41static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { 41static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
42 .mode = STEDMA40_MODE_LOGICAL, 42 .mode = STEDMA40_MODE_LOGICAL,
43 .dir = STEDMA40_MEM_TO_PERIPH, 43 .dir = DMA_MEM_TO_DEV,
44 .dev_type = DB8500_DMA_DEV29_SD_MM0,