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: Tue, 16 Oct 2012 23:39:56 +0200 [thread overview]
Message-ID: <20121016213956.GH27665@pengutronix.de> (raw)
In-Reply-To: <20121016080801.GF5803@game.jcrosoft.org>
On Tue, Oct 16, 2012 at 10:08:01AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > >
> > > 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
Testing for a bit like above is done a thousand times all around the
kernel and barebox. There is nothing to factorize. The way Alexander did
it is perfectly fine.
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
next prev parent reply other threads:[~2012-10-16 21:39 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
2012-10-16 21:39 ` Sascha Hauer [this message]
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=20121016213956.GH27665@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