public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] nds32: asm/io.h: add __iormb and __iowmb support
Date: Tue, 25 Oct 2011 10:29:07 +0200	[thread overview]
Message-ID: <201110251029.07517.marek.vasut@gmail.com> (raw)
In-Reply-To: <CACCg+XPwaVG5smyiPY8mC2Rm0vEtzGA2Nm4aPddTAE3Vkcsj8A@mail.gmail.com>

> Hi Marek,
> 
> > 2011/10/24 Marek Vasut <marek.vasut@gmail.com>
> > 
> >> Hi,
> >> 
> >> can you possibly implement those as inline functions ? It'd be also
> >> great if you could convert the other macros to inline functions.
> >> 
> >> Thanks!
> 
> I've found there are some different data type warning occur when I'm
> translating inline function
> since all the driver originately call write and read marco.
> 
> Most of them is easy to deal with sicne the address is usually a
> 32-bit address "unsigned int *".
> However, the driver/serial/ns16550.c used readb/writeb but the
> "address" passed in ns16550.c is
> byte-wised (unsigned char *).

Well please fix. You can send a cleanup series?

> 
> And there are also address casted in (ulong) in ns16550.c.
> serial_out(UART_LCR_BKSE | UART_LCRVAL, (ulong)&com_port->lcr);
> I'm not sure to fix this way would affect ns16550 in other architecutre?.
> #define serial_out(x, y)       writeb(x, (unsigned int *)y)

This is definitelly wrong. I'd like to see others comment on this one.
> 
> And there are also problems when translating readb from macro to
> inline function.

Why?

> Some driver cannot be compiled with a return value inside the readb.
> I think I can post the fix of writeb for NDS32 architecture and see if
> you give some comments
> then I do for other architecture later.
> 
> Hi Wolfgang,
> Could you please pickup these 2 patches since it was independent to
> r/w inline functions?
> I'm not sure if the merge windows has been closed.
> Or should I pick these 2 patches into nds32 repo?
> 
> nds32: Use getenv_ulong() in place of getenv(), strtoul
> http://patchwork.ozlabs.org/patch/121312/
> 
> nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
> http://patchwork.ozlabs.org/patch/121313/
> 
> Thanks!

  reply	other threads:[~2011-10-25  8:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24  9:46 [U-Boot] [PATCH 1/3] nds32: Use getenv_ulong() in place of getenv(), strtoul Macpaul Lin
2011-10-24  9:46 ` [U-Boot] [PATCH 2/3] nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment Macpaul Lin
2011-10-24 17:16   ` Anton Staaf
2011-10-28  4:46     ` 馬克泡
2011-10-31  0:40       ` Mike Frysinger
2011-11-01  3:28         ` 馬克泡
2011-11-01  4:35     ` 馬克泡
2011-10-24  9:46 ` [U-Boot] [PATCH 3/3] nds32: asm/io.h: add __iormb and __iowmb support Macpaul Lin
2011-10-24 13:38   ` Marek Vasut
2011-10-24 13:50     ` 馬克泡
2011-10-25  8:20       ` 馬克泡
2011-10-25  8:29         ` Marek Vasut [this message]
2011-10-25 10:16           ` 馬克泡
2011-10-26  5:19             ` 馬克泡
2011-10-26  5:55               ` Graeme Russ
2011-10-27  3:23                 ` 馬克泡
2011-10-27  3:39                   ` Graeme Russ
2011-10-25 11:03           ` [U-Boot] [PATCH v2] nds32: asm/io.h: add __iormb __iowmb and inline io support Macpaul Lin
2011-11-01  4:37             ` 馬克泡
2011-11-01  4:33 ` [U-Boot] [PATCH 1/3] nds32: Use getenv_ulong() in place of getenv(), strtoul 馬克泡

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=201110251029.07517.marek.vasut@gmail.com \
    --to=marek.vasut@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