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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tony Lindgren <tony@xxxxxxxxxxx> [101202 10:36]:
> * Tony Lindgren <tony@xxxxxxxxxxx> [101202 10:34]:
> > 
> > This fails on omap1 as d is not allocated. Please merge the
> > following fix.
> 
> And another fix here:

One more fix below.

Note that even with these three fixes, 5912OSK still fails to
boot to init. Maybe something wrong with the framebuffer DMA?

Tony


From: Tony Lindgren <tony@xxxxxxxxxxx>
Date: Thu, 2 Dec 2010 10:34:18 -0800
Subject: [PATCH] Fix omap1_system_dma_init to initialize d->lch_count earlier

Otherwise the kzalloc will allocate wrong amount of memory.

Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -309,13 +309,7 @@ static int __init omap1_system_dma_init(void)
 		goto exit_release_p;
 	}
 
-	d->chan = kzalloc(sizeof(struct omap_dma_lch) *
-					(d->lch_count), GFP_KERNEL);
-	if (!d->chan) {
-		dev_err(&pdev->dev, "%s: Memory allocation failed"
-					"for d->chan!!!\n", __func__);
-		goto exit_release_d;
-	}
+	d->lch_count		= OMAP1_LOGICAL_DMA_CH_COUNT;
 
 	/* Valid attributes for omap1 plus processors */
 	if (cpu_is_omap15xx())
@@ -330,7 +324,14 @@ static int __init omap1_system_dma_init(void)
 	d->dev_caps		|= CLEAR_CSR_ON_READ;
 	d->dev_caps		|= IS_WORD_16;
 
-	d->lch_count		= OMAP1_LOGICAL_DMA_CH_COUNT;
+
+	d->chan = kzalloc(sizeof(struct omap_dma_lch) *
+					(d->lch_count), GFP_KERNEL);
+	if (!d->chan) {
+		dev_err(&pdev->dev, "%s: Memory allocation failed"
+					"for d->chan!!!\n", __func__);
+		goto exit_release_d;
+	}
 
 	if (cpu_is_omap15xx())
 		d->chan_count = 9;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux