瀏覽代碼

[ARM] 3358/1: [S3C2410] add missing SPI DMA resources

Patch from Albrecht Dre

Add DMA resources to s3c2410 spi platform devices - dma_(alloc|free)_coherent should now work as expected.

Signed-off-by: Albrecht Dre <albrecht.dress@lios-tech.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Albrecht Dre 19 年之前
父節點
當前提交
66be0c3028
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      arch/arm/mach-s3c2410/devs.c

+ 12 - 0
arch/arm/mach-s3c2410/devs.c

@@ -334,11 +334,17 @@ static struct resource s3c_spi0_resource[] = {
 
 
 };
 };
 
 
+static u64 s3c_device_spi0_dmamask = 0xffffffffUL;
+
 struct platform_device s3c_device_spi0 = {
 struct platform_device s3c_device_spi0 = {
 	.name		  = "s3c2410-spi",
 	.name		  = "s3c2410-spi",
 	.id		  = 0,
 	.id		  = 0,
 	.num_resources	  = ARRAY_SIZE(s3c_spi0_resource),
 	.num_resources	  = ARRAY_SIZE(s3c_spi0_resource),
 	.resource	  = s3c_spi0_resource,
 	.resource	  = s3c_spi0_resource,
+        .dev              = {
+                .dma_mask = &s3c_device_spi0_dmamask,
+                .coherent_dma_mask = 0xffffffffUL
+        }
 };
 };
 
 
 EXPORT_SYMBOL(s3c_device_spi0);
 EXPORT_SYMBOL(s3c_device_spi0);
@@ -359,11 +365,17 @@ static struct resource s3c_spi1_resource[] = {
 
 
 };
 };
 
 
+static u64 s3c_device_spi1_dmamask = 0xffffffffUL;
+
 struct platform_device s3c_device_spi1 = {
 struct platform_device s3c_device_spi1 = {
 	.name		  = "s3c2410-spi",
 	.name		  = "s3c2410-spi",
 	.id		  = 1,
 	.id		  = 1,
 	.num_resources	  = ARRAY_SIZE(s3c_spi1_resource),
 	.num_resources	  = ARRAY_SIZE(s3c_spi1_resource),
 	.resource	  = s3c_spi1_resource,
 	.resource	  = s3c_spi1_resource,
+        .dev              = {
+                .dma_mask = &s3c_device_spi1_dmamask,
+                .coherent_dma_mask = 0xffffffffUL
+        }
 };
 };
 
 
 EXPORT_SYMBOL(s3c_device_spi1);
 EXPORT_SYMBOL(s3c_device_spi1);