mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 2/3] ARM: clps711x: Add serial driver
Date: Mon, 15 Oct 2012 23:58:39 +0200	[thread overview]
Message-ID: <20121015215839.GR27665@pengutronix.de> (raw)
In-Reply-To: <20121015175852.GC5803@game.jcrosoft.org>

On Mon, Oct 15, 2012 at 07:58:52PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 20:26 Mon 15 Oct     , Alexander Shiyan wrote:
> > 
> > +
> > +#define UBRLCR(x)	(UBRLCR1 + (x) * 0x1000)
> > +#define SYSCON(x)	(SYSCON1 + (x) * 0x1000)
> > +#define SYSFLG(x)	(SYSFLG1 + (x) * 0x1000)
> > +#define UARTDR(x)	(UARTDR1 + (x) * 0x1000)
> provide this via resoure
> 
> here 4 resources

We already had this. This SoC has a very strange register layout. The
registers for the UARTs are spread around the SoC and the registers
are not even exclusively used for the UARTs. They have bits which are
also used for the timer and other stuff.

> > +static int clps711x_tstc(struct console_device *cdev)
> > +{
> > +	return !(readl(SYSFLG(cdev->dev->id)) & SYSFLG_URXFE);
> factorise those pull status as
> 
> status int xxx(data, mask) {}

I don'r understand this. This is a single register read, there's not
much to factorize and the code is easy to read.

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

  parent reply	other threads:[~2012-10-15 21:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 16:26 [PATCH v2 1/3] ARM: Add CLPS711X architecture Alexander Shiyan
2012-10-15 16:26 ` [PATCH v2 2/3] ARM: clps711x: Add serial driver Alexander Shiyan
2012-10-15 17:58   ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 19:00     ` Alexander Shiyan
2012-10-15 21:58     ` Sascha Hauer [this message]
2012-10-16  8:08       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-16 21:39         ` Sascha Hauer
2012-10-20 13:50           ` Alexander Shiyan
2012-10-23  6:38             ` Sascha Hauer
2012-10-15 16:26 ` [PATCH v2 3/3] ARM: clps711x: Add generic board support (CLEP7212) Alexander Shiyan
2012-10-15 18:03   ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 19:05     ` Alexander Shiyan
2012-10-15 17:54 ` [PATCH v2 1/3] ARM: Add CLPS711X architecture Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 18:56   ` Alexander Shiyan
2012-10-16  8:09     ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-16 21:42       ` 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=20121015215839.GR27665@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /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