mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Sascha Hauer" <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] ARM i.MX6: Add mmdc calibration support
Date: Fri, 08 Mar 2013 16:17:22 +0400	[thread overview]
Message-ID: <1362745042.129909210@f107.mail.ru> (raw)
In-Reply-To: <1362744484-17844-2-git-send-email-s.hauer@pengutronix.de>

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?

> +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.

Thanks.

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

  reply	other threads:[~2013-03-08 12:17 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 [this message]
2013-03-08 14:00     ` Sascha Hauer
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=1362745042.129909210@f107.mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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