linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ww-ml@gmx.de (Wolfgang Wegner)
To: linux-arm-kernel@lists.infradead.org
Subject: Kirkwood DMA engine transfer to PCI memory space?
Date: Wed, 6 Oct 2010 18:45:43 +0200	[thread overview]
Message-ID: <20101006164543.GA11519@debian-wegner1.datadisplay.de> (raw)
In-Reply-To: <AANLkTi=P6d_Acg49+dMubCvarHednH-so7b1Msapec5m@mail.gmail.com>

Hi Saeed,

On Wed, Oct 06, 2010 at 06:27:14PM +0200, saeed bishara wrote:
> The XOR DMA engine has "address decoding windows"  that determines
> where to route transactions issued by the xor. the kernel configs only
> dram windows, you need to open windows for PCI. this ad-hoc code (not
> tested) my help:
> 
> --- a/drivers/dma/mv_xor.c
> +++ b/drivers/dma/mv_xor.c
> @@ -1274,6 +1274,15 @@ mv_xor_conf_mbus_windows(struct
> mv_xor_shared_private *msp,
>                 win_enable |= (1 << i);
>                 win_enable |= 3 << (16 + (2 * i));
>         }
> +       /* set window 4 for pcie 0 */
> +       i = 4;
> +        writel((KIRKWOOD_PCIE_MEM_PHYS_BASE & 0xffff0000) |
> +              (ATTR_PCIE_MEM << 8) |
> +               TARGET_PCIE, base + WINDOW_BASE(i));
> +        writel((KIRKWOOD_PCIE_MEM_SIZE - 1) & 0xffff0000, base +
> WINDOW_SIZE(i));
> +
> +       win_enable |= (1 << i);
> +        win_enable |= 3 << (16 + (2 * i));

thank you for this code!
It looks more sane than my dirty hack, so when we have our FPGA
burst problems solved, this could be the solution.

Somehow I did not see the window setting@first glance, and
the address error was silently ignored in the code, so it took
me some printk's to figure out what was going wrong.

Now I have to figure out how to make use of DMA to speed up
our framebuffer...

Best regards,
Wolfgang

      reply	other threads:[~2010-10-06 16:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06  9:31 Kirkwood DMA engine transfer to PCI memory space? Wolfgang Wegner
2010-10-06 14:33 ` Wolfgang Wegner
2010-10-06 16:27 ` saeed bishara
2010-10-06 16:45   ` Wolfgang Wegner [this message]

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=20101006164543.GA11519@debian-wegner1.datadisplay.de \
    --to=ww-ml@gmx.de \
    --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).