diff options
| author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2016-08-04 05:56:12 -0400 |
|---|---|---|
| committer | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2016-08-10 05:20:10 -0400 |
| commit | 971466bff47483e70e38a3f0ae0d55e86e9fdeee (patch) | |
| tree | eae1f0ae657122357aaf105b7c85994e15d3c66e | |
| parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
ARM: S3C24XX: Add dma_mask assignments for DMA devices
The dma_mask assignments seem to be missed during refactoring
of arch/arm/mach-s3c24xx. Add them to avoid DMA allocation
failures. Without this patch sound is broken on s3c24xx
with errors reported like:
s3c24xx-dma s3c2410-dma.0: coherent DMA mask is unset
ALSA pcmC0D0p,0:: cannot preallocate for size 524288
s3c24xx-iis s3c24xx-iis: Failed to get DMA channel capabilities,
falling back to period counting: -6
s3c24xx-dma s3c2410-dma.0: coherent DMA mask is unset
...
ALSA pcmC0D0c,0:: cannot preallocate for size 524288
s3c24xx-iis s3c24xx-iis: Failed to get DMA channel capabilities,
falling back to period counting: -6
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
| -rw-r--r-- | arch/arm/mach-s3c24xx/common.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index bf50328107bd..fe7485dc7fb5 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | 24 | #include <linux/dma-mapping.h> | |
| 25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
| 27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
| @@ -304,6 +304,8 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | |||
| 304 | }, | 304 | }, |
| 305 | }; | 305 | }; |
| 306 | 306 | ||
| 307 | #define s3c24xx_device_dma_mask (*((u64[]) { DMA_BIT_MASK(32) })) | ||
| 308 | |||
| 307 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ | 309 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ |
| 308 | defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | 310 | defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
| 309 | static struct resource s3c2410_dma_resource[] = { | 311 | static struct resource s3c2410_dma_resource[] = { |
| @@ -354,7 +356,9 @@ struct platform_device s3c2410_device_dma = { | |||
| 354 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), | 356 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), |
| 355 | .resource = s3c2410_dma_resource, | 357 | .resource = s3c2410_dma_resource, |
| 356 | .dev = { | 358 | .dev = { |
| 357 | .platform_data = &s3c2410_dma_platdata, | 359 | .dma_mask = &s3c24xx_device_dma_mask, |
| 360 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 361 | .platform_data = &s3c2410_dma_platdata, | ||
| 358 | }, | 362 | }, |
| 359 | }; | 363 | }; |
| 360 | #endif | 364 | #endif |
| @@ -395,7 +399,9 @@ struct platform_device s3c2412_device_dma = { | |||
| 395 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), | 399 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), |
| 396 | .resource = s3c2410_dma_resource, | 400 | .resource = s3c2410_dma_resource, |
| 397 | .dev = { | 401 | .dev = { |
| 398 | .platform_data = &s3c2412_dma_platdata, | 402 | .dma_mask = &s3c24xx_device_dma_mask, |
| 403 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 404 | .platform_data = &s3c2412_dma_platdata, | ||
| 399 | }, | 405 | }, |
| 400 | }; | 406 | }; |
| 401 | #endif | 407 | #endif |
| @@ -451,7 +457,9 @@ struct platform_device s3c2440_device_dma = { | |||
| 451 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), | 457 | .num_resources = ARRAY_SIZE(s3c2410_dma_resource), |
| 452 | .resource = s3c2410_dma_resource, | 458 | .resource = s3c2410_dma_resource, |
| 453 | .dev = { | 459 | .dev = { |
| 454 | .platform_data = &s3c2440_dma_platdata, | 460 | .dma_mask = &s3c24xx_device_dma_mask, |
| 461 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 462 | .platform_data = &s3c2440_dma_platdata, | ||
| 455 | }, | 463 | }, |
| 456 | }; | 464 | }; |
| 457 | #endif | 465 | #endif |
| @@ -503,7 +511,9 @@ struct platform_device s3c2443_device_dma = { | |||
| 503 | .num_resources = ARRAY_SIZE(s3c2443_dma_resource), | 511 | .num_resources = ARRAY_SIZE(s3c2443_dma_resource), |
| 504 | .resource = s3c2443_dma_resource, | 512 | .resource = s3c2443_dma_resource, |
| 505 | .dev = { | 513 | .dev = { |
| 506 | .platform_data = &s3c2443_dma_platdata, | 514 | .dma_mask = &s3c24xx_device_dma_mask, |
| 515 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 516 | .platform_data = &s3c2443_dma_platdata, | ||
| 507 | }, | 517 | }, |
| 508 | }; | 518 | }; |
| 509 | #endif | 519 | #endif |
