diff options
author | Olof Johansson <olof@lixom.net> | 2013-06-14 19:53:54 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-14 19:53:54 -0400 |
commit | 2c3165ebb641e0ff3faf1c87ed1c8fbd85871da0 (patch) | |
tree | ecf0bef4ee0b56029d0f08aed941aca78da99424 /arch | |
parent | 0d86331b4cc9b0c52d41bbe78cb4b75f40b7381c (diff) | |
parent | 499c2bc3cc89dcbbf08aa526cd4a984b92a4d2a8 (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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-audio.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-sdi.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-ux500/usb.c | 29 |
5 files changed, 35 insertions, 63 deletions
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 | ||
22 | static struct stedma40_chan_cfg msp0_dma_rx = { | 22 | static 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 | ||
28 | static struct stedma40_chan_cfg msp0_dma_tx = { | 28 | static 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 | ||
40 | static struct stedma40_chan_cfg msp1_dma_rx = { | 40 | static 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 | ||
46 | static struct stedma40_chan_cfg msp1_dma_tx = { | 46 | static 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 | ||
58 | static struct stedma40_chan_cfg msp2_dma_rx = { | 58 | static 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 | ||
64 | static struct stedma40_chan_cfg msp2_dma_tx = { | 64 | static 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 |
35 | struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = { | 35 | struct 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 | ||
41 | static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { | 41 | static 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, | 44 | .dev_type = DB8500_DMA_DEV29_SD_MM0, |
45 | }; | 45 | }; |
46 | #endif | 46 | #endif |
@@ -81,13 +81,13 @@ void mop500_sdi_tc35892_init(struct device *parent) | |||
81 | #ifdef CONFIG_STE_DMA40 | 81 | #ifdef CONFIG_STE_DMA40 |
82 | static struct stedma40_chan_cfg sdi1_dma_cfg_rx = { | 82 | static struct stedma40_chan_cfg sdi1_dma_cfg_rx = { |
83 | .mode = STEDMA40_MODE_LOGICAL, | 83 | .mode = STEDMA40_MODE_LOGICAL, |
84 | .dir = STEDMA40_PERIPH_TO_MEM, | 84 | .dir = DMA_DEV_TO_MEM, |
85 | .dev_type = DB8500_DMA_DEV32_SD_MM1, | 85 | .dev_type = DB8500_DMA_DEV32_SD_MM1, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { | 88 | static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { |
89 | .mode = STEDMA40_MODE_LOGICAL, | 89 | .mode = STEDMA40_MODE_LOGICAL, |
90 | .dir = STEDMA40_MEM_TO_PERIPH, | 90 | .dir = DMA_MEM_TO_DEV, |
91 | .dev_type = DB8500_DMA_DEV32_SD_MM1, | 91 | .dev_type = DB8500_DMA_DEV32_SD_MM1, |
92 | }; | 92 | }; |
93 | #endif | 93 | #endif |
@@ -112,13 +112,13 @@ struct mmci_platform_data mop500_sdi1_data = { | |||
112 | #ifdef CONFIG_STE_DMA40 | 112 | #ifdef CONFIG_STE_DMA40 |
113 | struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = { | 113 | struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = { |
114 | .mode = STEDMA40_MODE_LOGICAL, | 114 | .mode = STEDMA40_MODE_LOGICAL, |
115 | .dir = STEDMA40_PERIPH_TO_MEM, | 115 | .dir = DMA_DEV_TO_MEM, |
116 | .dev_type = DB8500_DMA_DEV28_SD_MM2, | 116 | .dev_type = DB8500_DMA_DEV28_SD_MM2, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { | 119 | static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { |
120 | .mode = STEDMA40_MODE_LOGICAL, | 120 | .mode = STEDMA40_MODE_LOGICAL, |
121 | .dir = STEDMA40_MEM_TO_PERIPH, | 121 | .dir = DMA_MEM_TO_DEV, |
122 | .dev_type = DB8500_DMA_DEV28_SD_MM2, | 122 | .dev_type = DB8500_DMA_DEV28_SD_MM2, |
123 | }; | 123 | }; |
124 | #endif | 124 | #endif |
@@ -144,13 +144,13 @@ struct mmci_platform_data mop500_sdi2_data = { | |||
144 | #ifdef CONFIG_STE_DMA40 | 144 | #ifdef CONFIG_STE_DMA40 |
145 | struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = { | 145 | struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = { |
146 | .mode = STEDMA40_MODE_LOGICAL, | 146 | .mode = STEDMA40_MODE_LOGICAL, |
147 | .dir = STEDMA40_PERIPH_TO_MEM, | 147 | .dir = DMA_DEV_TO_MEM, |
148 | .dev_type = DB8500_DMA_DEV42_SD_MM4, | 148 | .dev_type = DB8500_DMA_DEV42_SD_MM4, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = { | 151 | static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = { |
152 | .mode = STEDMA40_MODE_LOGICAL, | 152 | .mode = STEDMA40_MODE_LOGICAL, |
153 | .dir = STEDMA40_MEM_TO_PERIPH, | 153 | .dir = DMA_MEM_TO_DEV, |
154 | .dev_type = DB8500_DMA_DEV42_SD_MM4, | 154 | .dev_type = DB8500_DMA_DEV42_SD_MM4, |
155 | }; | 155 | }; |
156 | #endif | 156 | #endif |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index f59d52806afe..2d70e2b45660 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -424,19 +424,19 @@ void mop500_snowball_ethernet_clock_enable(void) | |||
424 | 424 | ||
425 | static struct cryp_platform_data u8500_cryp1_platform_data = { | 425 | static struct cryp_platform_data u8500_cryp1_platform_data = { |
426 | .mem_to_engine = { | 426 | .mem_to_engine = { |
427 | .dir = STEDMA40_MEM_TO_PERIPH, | 427 | .dir = DMA_MEM_TO_DEV, |
428 | .dev_type = DB8500_DMA_DEV48_CAC1, | 428 | .dev_type = DB8500_DMA_DEV48_CAC1, |
429 | .mode = STEDMA40_MODE_LOGICAL, | 429 | .mode = STEDMA40_MODE_LOGICAL, |
430 | }, | 430 | }, |
431 | .engine_to_mem = { | 431 | .engine_to_mem = { |
432 | .dir = STEDMA40_PERIPH_TO_MEM, | 432 | .dir = DMA_DEV_TO_MEM, |
433 | .dev_type = DB8500_DMA_DEV48_CAC1, | 433 | .dev_type = DB8500_DMA_DEV48_CAC1, |
434 | .mode = STEDMA40_MODE_LOGICAL, | 434 | .mode = STEDMA40_MODE_LOGICAL, |
435 | } | 435 | } |
436 | }; | 436 | }; |
437 | 437 | ||
438 | static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = { | 438 | static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = { |
439 | .dir = STEDMA40_MEM_TO_PERIPH, | 439 | .dir = DMA_MEM_TO_DEV, |
440 | .dev_type = DB8500_DMA_DEV50_HAC1_TX, | 440 | .dev_type = DB8500_DMA_DEV50_HAC1_TX, |
441 | .mode = STEDMA40_MODE_LOGICAL, | 441 | .mode = STEDMA40_MODE_LOGICAL, |
442 | }; | 442 | }; |
@@ -455,13 +455,13 @@ static struct platform_device *mop500_platform_devs[] __initdata = { | |||
455 | #ifdef CONFIG_STE_DMA40 | 455 | #ifdef CONFIG_STE_DMA40 |
456 | static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { | 456 | static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { |
457 | .mode = STEDMA40_MODE_LOGICAL, | 457 | .mode = STEDMA40_MODE_LOGICAL, |
458 | .dir = STEDMA40_PERIPH_TO_MEM, | 458 | .dir = DMA_DEV_TO_MEM, |
459 | .dev_type = DB8500_DMA_DEV8_SSP0, | 459 | .dev_type = DB8500_DMA_DEV8_SSP0, |
460 | }; | 460 | }; |
461 | 461 | ||
462 | static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { | 462 | static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { |
463 | .mode = STEDMA40_MODE_LOGICAL, | 463 | .mode = STEDMA40_MODE_LOGICAL, |
464 | .dir = STEDMA40_MEM_TO_PERIPH, | 464 | .dir = DMA_MEM_TO_DEV, |
465 | .dev_type = DB8500_DMA_DEV8_SSP0, | 465 | .dev_type = DB8500_DMA_DEV8_SSP0, |
466 | }; | 466 | }; |
467 | #endif | 467 | #endif |
@@ -490,37 +490,37 @@ static void __init mop500_spi_init(struct device *parent) | |||
490 | #ifdef CONFIG_STE_DMA40 | 490 | #ifdef CONFIG_STE_DMA40 |
491 | static struct stedma40_chan_cfg uart0_dma_cfg_rx = { | 491 | static struct stedma40_chan_cfg uart0_dma_cfg_rx = { |
492 | .mode = STEDMA40_MODE_LOGICAL, | 492 | .mode = STEDMA40_MODE_LOGICAL, |
493 | .dir = STEDMA40_PERIPH_TO_MEM, | 493 | .dir = DMA_DEV_TO_MEM, |
494 | .dev_type = DB8500_DMA_DEV13_UART0, | 494 | .dev_type = DB8500_DMA_DEV13_UART0, |
495 | }; | 495 | }; |
496 | 496 | ||
497 | static struct stedma40_chan_cfg uart0_dma_cfg_tx = { | 497 | static struct stedma40_chan_cfg uart0_dma_cfg_tx = { |
498 | .mode = STEDMA40_MODE_LOGICAL, | 498 | .mode = STEDMA40_MODE_LOGICAL, |
499 | .dir = STEDMA40_MEM_TO_PERIPH, | 499 | .dir = DMA_MEM_TO_DEV, |
500 | .dev_type = DB8500_DMA_DEV13_UART0, | 500 | .dev_type = DB8500_DMA_DEV13_UART0, |
501 | }; | 501 | }; |
502 | 502 | ||
503 | static struct stedma40_chan_cfg uart1_dma_cfg_rx = { | 503 | static struct stedma40_chan_cfg uart1_dma_cfg_rx = { |
504 | .mode = STEDMA40_MODE_LOGICAL, | 504 | .mode = STEDMA40_MODE_LOGICAL, |
505 | .dir = STEDMA40_PERIPH_TO_MEM, | 505 | .dir = DMA_DEV_TO_MEM, |
506 | .dev_type = DB8500_DMA_DEV12_UART1, | 506 | .dev_type = DB8500_DMA_DEV12_UART1, |
507 | }; | 507 | }; |
508 | 508 | ||
509 | static struct stedma40_chan_cfg uart1_dma_cfg_tx = { | 509 | static struct stedma40_chan_cfg uart1_dma_cfg_tx = { |
510 | .mode = STEDMA40_MODE_LOGICAL, | 510 | .mode = STEDMA40_MODE_LOGICAL, |
511 | .dir = STEDMA40_MEM_TO_PERIPH, | 511 | .dir = DMA_MEM_TO_DEV, |
512 | .dev_type = DB8500_DMA_DEV12_UART1, | 512 | .dev_type = DB8500_DMA_DEV12_UART1, |
513 | }; | 513 | }; |
514 | 514 | ||
515 | static struct stedma40_chan_cfg uart2_dma_cfg_rx = { | 515 | static struct stedma40_chan_cfg uart2_dma_cfg_rx = { |
516 | .mode = STEDMA40_MODE_LOGICAL, | 516 | .mode = STEDMA40_MODE_LOGICAL, |
517 | .dir = STEDMA40_PERIPH_TO_MEM, | 517 | .dir = DMA_DEV_TO_MEM, |
518 | .dev_type = DB8500_DMA_DEV11_UART2, | 518 | .dev_type = DB8500_DMA_DEV11_UART2, |
519 | }; | 519 | }; |
520 | 520 | ||
521 | static struct stedma40_chan_cfg uart2_dma_cfg_tx = { | 521 | static struct stedma40_chan_cfg uart2_dma_cfg_tx = { |
522 | .mode = STEDMA40_MODE_LOGICAL, | 522 | .mode = STEDMA40_MODE_LOGICAL, |
523 | .dir = STEDMA40_MEM_TO_PERIPH, | 523 | .dir = DMA_MEM_TO_DEV, |
524 | .dev_type = DB8500_DMA_DEV11_UART2, | 524 | .dev_type = DB8500_DMA_DEV11_UART2, |
525 | }; | 525 | }; |
526 | #endif | 526 | #endif |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 243b91b66ae0..f63847dabe7d 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -215,17 +215,6 @@ struct device * __init u8500_init_devices(void) | |||
215 | } | 215 | } |
216 | 216 | ||
217 | #ifdef CONFIG_MACH_UX500_DT | 217 | #ifdef CONFIG_MACH_UX500_DT |
218 | |||
219 | /* TODO: Once all pieces are DT:ed, remove completely. */ | ||
220 | static struct device * __init u8500_of_init_devices(void) | ||
221 | { | ||
222 | struct device *parent = db8500_soc_device_init(); | ||
223 | |||
224 | db8500_add_usb(parent, usb_db8500_dma_cfg, usb_db8500_dma_cfg); | ||
225 | |||
226 | return parent; | ||
227 | } | ||
228 | |||
229 | static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | 218 | static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { |
230 | /* Requires call-back bindings. */ | 219 | /* Requires call-back bindings. */ |
231 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), | 220 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), |
@@ -269,8 +258,7 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
269 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, | 258 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, |
270 | "ux500-msp-i2s.3", &msp3_platform_data), | 259 | "ux500-msp-i2s.3", &msp3_platform_data), |
271 | /* Requires clock name bindings and channel address lookup table. */ | 260 | /* Requires clock name bindings and channel address lookup table. */ |
272 | OF_DEV_AUXDATA("stericsson,db8500-dma40", 0x801C0000, | 261 | OF_DEV_AUXDATA("stericsson,db8500-dma40", 0x801C0000, "dma40.0", NULL), |
273 | "dma40.0", &dma40_plat_data), | ||
274 | {}, | 262 | {}, |
275 | }; | 263 | }; |
276 | 264 | ||
@@ -284,7 +272,7 @@ static const struct of_device_id u8500_local_bus_nodes[] = { | |||
284 | 272 | ||
285 | static void __init u8500_init_machine(void) | 273 | static void __init u8500_init_machine(void) |
286 | { | 274 | { |
287 | struct device *parent = NULL; | 275 | struct device *parent = db8500_soc_device_init(); |
288 | 276 | ||
289 | /* Pinmaps must be in place before devices register */ | 277 | /* Pinmaps must be in place before devices register */ |
290 | if (of_machine_is_compatible("st-ericsson,mop500")) | 278 | if (of_machine_is_compatible("st-ericsson,mop500")) |
@@ -297,9 +285,6 @@ static void __init u8500_init_machine(void) | |||
297 | else if (of_machine_is_compatible("st-ericsson,ccu9540")) {} | 285 | else if (of_machine_is_compatible("st-ericsson,ccu9540")) {} |
298 | /* TODO: Add pinmaps for ccu9540 board. */ | 286 | /* TODO: Add pinmaps for ccu9540 board. */ |
299 | 287 | ||
300 | /* TODO: Export SoC, USB, cpu-freq and DMA40 */ | ||
301 | parent = u8500_of_init_devices(); | ||
302 | |||
303 | /* automatically probe child nodes of db8500 device */ | 288 | /* automatically probe child nodes of db8500 device */ |
304 | of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); | 289 | of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); |
305 | } | 290 | } |
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c index 72754e369417..b7bd8d3a5507 100644 --- a/arch/arm/mach-ux500/usb.c +++ b/arch/arm/mach-ux500/usb.c | |||
@@ -14,15 +14,15 @@ | |||
14 | 14 | ||
15 | #define MUSB_DMA40_RX_CH { \ | 15 | #define MUSB_DMA40_RX_CH { \ |
16 | .mode = STEDMA40_MODE_LOGICAL, \ | 16 | .mode = STEDMA40_MODE_LOGICAL, \ |
17 | .dir = STEDMA40_PERIPH_TO_MEM, \ | 17 | .dir = DMA_DEV_TO_MEM, \ |
18 | } | 18 | } |
19 | 19 | ||
20 | #define MUSB_DMA40_TX_CH { \ | 20 | #define MUSB_DMA40_TX_CH { \ |
21 | .mode = STEDMA40_MODE_LOGICAL, \ | 21 | .mode = STEDMA40_MODE_LOGICAL, \ |
22 | .dir = STEDMA40_MEM_TO_PERIPH, \ | 22 | .dir = DMA_MEM_TO_DEV, \ |
23 | } | 23 | } |
24 | 24 | ||
25 | static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_CHANNELS] | 25 | static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] |
26 | = { | 26 | = { |
27 | MUSB_DMA40_RX_CH, | 27 | MUSB_DMA40_RX_CH, |
28 | MUSB_DMA40_RX_CH, | 28 | MUSB_DMA40_RX_CH, |
@@ -34,7 +34,7 @@ static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_CHANNELS] | |||
34 | MUSB_DMA40_RX_CH | 34 | MUSB_DMA40_RX_CH |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_TX_CHANNELS] | 37 | static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] |
38 | = { | 38 | = { |
39 | MUSB_DMA40_TX_CH, | 39 | MUSB_DMA40_TX_CH, |
40 | MUSB_DMA40_TX_CH, | 40 | MUSB_DMA40_TX_CH, |
@@ -46,7 +46,7 @@ static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_TX_CHANNELS] | |||
46 | MUSB_DMA40_TX_CH, | 46 | MUSB_DMA40_TX_CH, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_CHANNELS] = { | 49 | static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = { |
50 | &musb_dma_rx_ch[0], | 50 | &musb_dma_rx_ch[0], |
51 | &musb_dma_rx_ch[1], | 51 | &musb_dma_rx_ch[1], |
52 | &musb_dma_rx_ch[2], | 52 | &musb_dma_rx_ch[2], |
@@ -57,7 +57,7 @@ static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_CHANNELS] = { | |||
57 | &musb_dma_rx_ch[7] | 57 | &musb_dma_rx_ch[7] |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_TX_CHANNELS] = { | 60 | static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = { |
61 | &musb_dma_tx_ch[0], | 61 | &musb_dma_tx_ch[0], |
62 | &musb_dma_tx_ch[1], | 62 | &musb_dma_tx_ch[1], |
63 | &musb_dma_tx_ch[2], | 63 | &musb_dma_tx_ch[2], |
@@ -71,23 +71,11 @@ static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_TX_CHANNELS] = { | |||
71 | static struct ux500_musb_board_data musb_board_data = { | 71 | static struct ux500_musb_board_data musb_board_data = { |
72 | .dma_rx_param_array = ux500_dma_rx_param_array, | 72 | .dma_rx_param_array = ux500_dma_rx_param_array, |
73 | .dma_tx_param_array = ux500_dma_tx_param_array, | 73 | .dma_tx_param_array = ux500_dma_tx_param_array, |
74 | .num_rx_channels = UX500_MUSB_DMA_NUM_RX_CHANNELS, | ||
75 | .num_tx_channels = UX500_MUSB_DMA_NUM_TX_CHANNELS, | ||
76 | .dma_filter = stedma40_filter, | 74 | .dma_filter = stedma40_filter, |
77 | }; | 75 | }; |
78 | 76 | ||
79 | static u64 ux500_musb_dmamask = DMA_BIT_MASK(32); | ||
80 | |||
81 | static struct musb_hdrc_config musb_hdrc_config = { | ||
82 | .multipoint = true, | ||
83 | .dyn_fifo = true, | ||
84 | .num_eps = 16, | ||
85 | .ram_bits = 16, | ||
86 | }; | ||
87 | |||
88 | static struct musb_hdrc_platform_data musb_platform_data = { | 77 | static struct musb_hdrc_platform_data musb_platform_data = { |
89 | .mode = MUSB_OTG, | 78 | .mode = MUSB_OTG, |
90 | .config = &musb_hdrc_config, | ||
91 | .board_data = &musb_board_data, | 79 | .board_data = &musb_board_data, |
92 | }; | 80 | }; |
93 | 81 | ||
@@ -108,7 +96,6 @@ struct platform_device ux500_musb_device = { | |||
108 | .id = 0, | 96 | .id = 0, |
109 | .dev = { | 97 | .dev = { |
110 | .platform_data = &musb_platform_data, | 98 | .platform_data = &musb_platform_data, |
111 | .dma_mask = &ux500_musb_dmamask, | ||
112 | .coherent_dma_mask = DMA_BIT_MASK(32), | 99 | .coherent_dma_mask = DMA_BIT_MASK(32), |
113 | }, | 100 | }, |
114 | .num_resources = ARRAY_SIZE(usb_resources), | 101 | .num_resources = ARRAY_SIZE(usb_resources), |
@@ -119,7 +106,7 @@ static inline void ux500_usb_dma_update_rx_ch_config(int *dev_type) | |||
119 | { | 106 | { |
120 | u32 idx; | 107 | u32 idx; |
121 | 108 | ||
122 | for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_CHANNELS; idx++) | 109 | for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++) |
123 | musb_dma_rx_ch[idx].dev_type = dev_type[idx]; | 110 | musb_dma_rx_ch[idx].dev_type = dev_type[idx]; |
124 | } | 111 | } |
125 | 112 | ||
@@ -127,7 +114,7 @@ static inline void ux500_usb_dma_update_tx_ch_config(int *dev_type) | |||
127 | { | 114 | { |
128 | u32 idx; | 115 | u32 idx; |
129 | 116 | ||
130 | for (idx = 0; idx < UX500_MUSB_DMA_NUM_TX_CHANNELS; idx++) | 117 | for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++) |
131 | musb_dma_tx_ch[idx].dev_type = dev_type[idx]; | 118 | musb_dma_tx_ch[idx].dev_type = dev_type[idx]; |
132 | } | 119 | } |
133 | 120 | ||