mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] ARM i.MX6: Add mmdc calibration support
Date: Fri, 8 Mar 2013 15:00:25 +0100	[thread overview]
Message-ID: <20130308140025.GE1906@pengutronix.de> (raw)
In-Reply-To: <1362745042.129909210@f107.mail.ru>

On Fri, Mar 08, 2013 at 04:17:22PM +0400, Alexander Shiyan wrote:
> Hello.
> 
> Only few questions inlined.
> 
> > This adds support for the various DDR calibration functions in the
> > i.MX6 MMDC.
> ...
> > +static inline u32 reg32_read(u32 reg)
> > +{
> > +	return readl(reg);
> > +}
> > +
> > +static inline void reg32_write(u32 reg, u32 val)
> > +{
> > +	writel(val, reg);
> > +}
> > +
> 
> What a reason to separate functions instead of readl/writel?

The reason is that the original code had this and I was too lazy to swap
the argument order, but I can fix this.

> 
> > +static inline void reg32setbit(u32 reg, int bit)
> > +{
> > +	u32 val;
> > +
> > +	val = readl(reg);
> > +	val |= 1 << bit;
> > +	writel(val, reg);
> > +}
> > +
> > +static inline void reg32clrbit(u32 reg, int bit)
> > +{
> > +	u32 val;
> > +
> > +	val = readl(reg);
> > +	val &= ~(1 << bit);
> > +	writel(val, reg);
> > +}
> 
> Maybe move this into asm-generic/io.h? Seems it can be reused by other
> users.

Dropped these. I'm not so convinced of helpers for these, at least not
enough to write them myself.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-08 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 12:08 [PATCH] Add DataModul Realq7 board support Sascha Hauer
2013-03-08 12:08 ` [PATCH 1/3] ARM i.MX6: Add mmdc calibration support Sascha Hauer
2013-03-08 12:17   ` Alexander Shiyan
2013-03-08 14:00     ` Sascha Hauer [this message]
2013-03-08 12:46   ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-08 12:08 ` [PATCH 2/3] Add DMO RealQ7 board support Sascha Hauer
2013-03-08 12:51   ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-08 13:07     ` Sascha Hauer
2013-03-08 14:48       ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-08 15:06         ` Sascha Hauer
2013-03-08 15:46           ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-08 16:23             ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-09 19:03             ` Sascha Hauer
2013-03-08 12:08 ` [PATCH 3/3] Add DMO RealQ7 defconfig Sascha Hauer

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=20130308140025.GE1906@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /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