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

On 23:58 Mon 15 Oct     , Sascha Hauer wrote:
> 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.
use the device id to select the register is wrong

we need to pass the register via resource (without request) or platform data
> 
> > > +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.
he use the code at a least 2 place

Best Regards,
J.

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

  reply	other threads:[~2012-10-16  8:10 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
2012-10-16  8:08       ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=20121016080801.GF5803@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --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