From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] mmc: mxsmmc: Fix operation with DMA
Date: Mon, 2 Apr 2012 21:30:11 +0200 [thread overview]
Message-ID: <20120402213011.10b743be@wker> (raw)
In-Reply-To: <CAOMZO5DKyzNe+sqz3b1CioNY-OmBpwP1N_cMbKyk1H-Gf=Yerg@mail.gmail.com>
Hi Fabio,
On Mon, 2 Apr 2012 16:18:18 -0300
Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Apr 2, 2012 at 4:03 PM, Marek Vasut <marex@denx.de> wrote:
>
> > Because that's called before relocation ;-)
>
> What about this?
>
> --- a/drivers/dma/apbh_dma.c
> +++ b/drivers/dma/apbh_dma.c
> @@ -35,6 +35,7 @@
>
> static struct mxs_dma_chan mxs_dma_channels[MXS_MAX_DMA_CHANNELS];
>
> +static int first;
> /*
> * Test is the DMA channel is valid channel
> */
> @@ -346,6 +347,10 @@ struct mxs_dma_desc *mxs_dma_desc_alloc(void)
> struct mxs_dma_desc *pdesc;
> uint32_t size;
>
> + if (!first)
> + mxs_dma_init();
> + first++;
> +
> size = roundup(sizeof(struct mxs_dma_desc), MXS_DMA_ALIGNMENT);
> pdesc = memalign(MXS_DMA_ALIGNMENT, size);
>
> Too ugly? Or any better place for calling mxs_dma_init()?
Won't calling mxs_dma_init() from arch_misc_init() work?
Thanks,
Anatolij
next prev parent reply other threads:[~2012-04-02 19:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 18:24 [U-Boot] [PATCH v2] mmc: mxsmmc: Fix operation with DMA Fabio Estevam
2012-04-02 18:39 ` Marek Vasut
2012-04-02 18:54 ` Fabio Estevam
2012-04-02 19:03 ` Marek Vasut
2012-04-02 19:18 ` Fabio Estevam
2012-04-02 19:26 ` Marek Vasut
2012-04-02 19:30 ` Anatolij Gustschin [this message]
2012-04-02 19:38 ` Marek Vasut
2012-04-02 19:50 ` Fabio Estevam
2012-04-02 19:54 ` Marek Vasut
2012-04-02 20:44 ` Fabio Estevam
2012-04-02 20:52 ` Marek Vasut
2012-04-02 20:54 ` Fabio Estevam
2012-04-02 21:00 ` Marek Vasut
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=20120402213011.10b743be@wker \
--to=agust@denx.de \
--cc=u-boot@lists.denx.de \
/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