From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 09/14] OMAP: DMA: Convert DMA library into platform driver
Date: Thu, 2 Dec 2010 10:49:25 -0800 [thread overview]
Message-ID: <20101202184925.GT17222@atomide.com> (raw)
In-Reply-To: <20101202184617.GS17222@atomide.com>
* Tony Lindgren <tony@atomide.com> [101202 10:36]:
> * Tony Lindgren <tony@atomide.com> [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@atomide.com>
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@atomide.com>
--- 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;
next prev parent reply other threads:[~2010-12-02 18:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1290603110-14119-1-git-send-email-manjugk@ti.com>
[not found] ` <20101125112811.GA27574@GLPP-machine>
2010-12-01 19:04 ` [PATCH v5 00/14] OMAP: DMA: hwmod and DMA as platform device G, Manjunath Kondaiah
2010-12-02 2:37 ` Tony Lindgren
[not found] ` <1290603110-14119-11-git-send-email-manjugk@ti.com>
2010-12-02 17:07 ` [PATCH v5 10/14] OMAP: DMA: Use DMA device attributes Tony Lindgren
2010-12-02 17:32 ` G, Manjunath Kondaiah
[not found] ` <1290603110-14119-10-git-send-email-manjugk@ti.com>
2010-12-02 18:44 ` [PATCH v5 09/14] OMAP: DMA: Convert DMA library into platform driver Tony Lindgren
2010-12-02 18:46 ` Tony Lindgren
2010-12-02 18:49 ` Tony Lindgren [this message]
2010-12-02 20:04 ` G, Manjunath Kondaiah
2010-12-02 20:52 ` Tony Lindgren
2010-12-03 16:43 ` G, Manjunath Kondaiah
2010-12-03 23:24 ` Tony Lindgren
2011-01-13 11:20 ` G, Manjunath Kondaiah
2011-01-19 19:04 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101202184925.GT17222@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).