public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] ns16550: Add support for AUX regs usage on some ARC SoCs
Date: Thu, 22 Feb 2018 16:07:39 +0000	[thread overview]
Message-ID: <1519315659.19466.12.camel@synopsys.com> (raw)
In-Reply-To: <20180222154331.GT4311@bill-the-cat>

Hi Tom,

On Thu, 2018-02-22 at 10:43 -0500, Tom Rini wrote:
> On Wed, Feb 21, 2018 at 03:26:05PM +0300, Alexey Brodkin wrote:

[snip]

> >  static inline void serial_out_shift(void *addr, int shift, int value)
> >  {
> > -#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
> > +#ifdef CONFIG_ARCH_DFSS
> > +	write_aux_reg((int)addr, value);
> > +#elif defined(CONFIG_SYS_NS16550_PORT_MAPPED)
> >  	outb(value, (ulong)addr);
> >  #elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_SYS_BIG_ENDIAN)
> >  	out_le32(addr, value);
> > @@ -70,7 +75,9 @@ static inline void serial_out_shift(void *addr, int shift, int value)
> >  
> >  static inline int serial_in_shift(void *addr, int shift)
> >  {
> > -#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
> > +#ifdef CONFIG_ARCH_DFSS
> > +	return read_aux_reg((int)addr);
> > +#elif defined(CONFIG_SYS_NS16550_PORT_MAPPED)
> >  	return inb((ulong)addr);
> >  #elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_SYS_BIG_ENDIAN)
> >  	return in_le32(addr);
> 
> As always, thanks for the detailed explanation.  Yes, I think that of
> the options, putting the details in read/write_aux_reg (and please make
> sure read/write_aux_reg have a good function comment too) is the best
> choice.  Thanks!

Frankly I didn't understand your comment well enough :)
Do you suggest to keep proposed implementation (i.e. modification of
serial_{in|out}_shift()) but add comments on what do we do and why or
you really meant something completely different?

-Alexey

  reply	other threads:[~2018-02-22 16:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 12:26 [U-Boot] [RFC] ns16550: Add support for AUX regs usage on some ARC SoCs Alexey Brodkin
2018-02-22 15:43 ` Tom Rini
2018-02-22 16:07   ` Alexey Brodkin [this message]
2018-02-22 16:20     ` Tom Rini
2018-02-22 16:17 ` Simon Glass
2018-02-22 16:23   ` Alexey Brodkin
2018-02-22 17:29     ` Simon Glass
2018-02-23 18:08       ` Alexey Brodkin
2018-02-23 20:59         ` Simon Glass
2018-03-02 21:51       ` Alexey Brodkin
2018-03-08 20:27         ` Simon Glass

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=1519315659.19466.12.camel@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=u-boot@lists.denx.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