public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eli Billauer <eli.billauer@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fpga: zynqpl: Fixed bug in alignment routine
Date: Tue, 18 Mar 2014 23:14:54 +0200	[thread overview]
Message-ID: <5328B74E.4080702@gmail.com> (raw)
In-Reply-To: <53283941.3070603@monstr.eu>

Hello,

We're completely out of sync with our git repositories, but I changed 
the relevant parts in my zynqpl.c (with the patch of this thread not 
applied), and it worked well. The alignment went downwards as expected.

Regards,
    Eli

On 18/03/14 14:17, Michal Simek wrote:
> Does this work for you? If yes, I will send this as regular patch.
>
> diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
> index 3572bc9..49eef0f 100644
> --- a/drivers/fpga/zynqpl.c
> +++ b/drivers/fpga/zynqpl.c
> @@ -289,10 +289,11 @@ static int zynq_dma_xfer_init(u32 partialbit)
>   static u32 *zynq_align_dma_buffer(u32 *buf, u32 len, u32 swap)
>   {
>          u32 *new_buf;
> -       u32 i;
> +       u32 i, align;
>
> -       if ((u32)buf != ALIGN((u32)buf, ARCH_DMA_MINALIGN)) {
> -               new_buf = (u32 *)ALIGN((u32)buf, ARCH_DMA_MINALIGN);
> +       align = ALIGN((u32)(buf - ARCH_DMA_MINALIGN + 1), ARCH_DMA_MINALIGN);
> +       if ((u32)buf != align) {
> +               new_buf = (u32 *)align;
>
>    

  reply	other threads:[~2014-03-18 21:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-15 20:40 [U-Boot] [PATCH] fpga: zynqpl: Fixed bug in alignment routine Eli Billauer
2014-03-18  6:11 ` S Durga Prasad Paladugu
2014-03-18 10:20   ` Eli Billauer
2014-03-18 12:17     ` Michal Simek
2014-03-18 21:14       ` Eli Billauer [this message]
2014-03-19  5:50         ` Michal Simek

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=5328B74E.4080702@gmail.com \
    --to=eli.billauer@gmail.com \
    --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