[PATCH v5 09/14] OMAP: DMA: Convert DMA library into platform driver

Tony Lindgren tony at atomide.com
Thu Dec 2 13:46:17 EST 2010


* Tony Lindgren <tony at atomide.com> [101202 10:34]:
> 
> This fails on omap1 as d is not allocated. Please merge the
> following fix.

And another fix here:

From: Tony Lindgren <tony at atomide.com>
Date: Thu, 2 Dec 2010 10:19:15 -0800
Subject: [PATCH] Fix omap1_system_dma_init to use ioremap

Fix omap1_system_dma_init to use ioremap

Signed-off-by: Tony Lindgren <tony at atomide.com>

--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -280,6 +280,12 @@ static int __init omap1_system_dma_init(void)
 		return -ENOMEM;
 	}
 
+	dma_base = ioremap(res[0].start, resource_size(&res[0]));
+	if (!dma_base) {
+		pr_err("%s: Unable to ioremap\n", __func__);
+		return -ENODEV;
+	}
+
 	ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
 	if (ret) {
 		dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
@@ -337,8 +343,6 @@ static int __init omap1_system_dma_init(void)
 
 	p->dma_attr = d;
 
-	dma_base		= (void __iomem *)res[0].start;
-
 	p->show_dma_caps	= omap1_show_dma_caps;
 	p->clear_lch_regs	= omap1_clear_lch_regs;
 	p->clear_dma		= omap1_clear_dma;



More information about the linux-arm-kernel mailing list