From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] serial: ns16550: fix different reg size access
Date: Fri, 01 Apr 2011 16:25:52 +0200 [thread overview]
Message-ID: <20110401142552.D8EB0F0320A@gemini.denx.de> (raw)
In-Reply-To: <AANLkTi=q-cj-Q5iNqiQpEddkH1DxUAR1H_5wenaES7bE@mail.gmail.com>
Dear Lei Wen,
In message <AANLkTi=q-cj-Q5iNqiQpEddkH1DxUAR1H_5wenaES7bE@mail.gmail.com> you wrote:
>
> >> > I don't think so. You still use just a single writel() call then. To
> >> > leave the other bits untouched, you would have to perform a readl()
> >> > first, then insert one data byte, and then write it back. Your patch
> >> > does not do that.
> >>
> >> My original patch is like below, so where it call writel?...
> >> +#elif (CONFIG_SYS_NS16550_REG_SIZE == 1) || (CONFIG_SYS_NS16550_REG_SIZE == -1)
> >> +#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
> >> +#define serial_out(x, y) outb(x, y)
> >> +#define serial_in(y) inb(y)
> >> +#else
> >> +#define serial_out(x, y) writeb(x, y)
> >> +#define serial_in(y) readb(y)
> >
> > If you use writeb() [as the current driver would do as well}, then how
> > do you expect to set this bit 8 (which is in the next byte) to 0 as
> > you claim you have to?
>
> As I explain, if set CONFIG_SYS_NS16550_REG_SIZE to 4, and
> set CONFIG_SYS_NS16550_MAX_REG_SIZE also to 4, then the serial_out
> becomes writel. :)
Right - which is exactly what I said, and which you denied.
I give up, I have other things to do as well.
You know my proposal how to implement the driver for your non-standard
chip.
Your patch is rejected.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe contains any amount of horrible ways to be woken up,
such as the noise of the mob breaking down the front door, the scream
of fire engines, or the realization that today is the Monday which on
Friday night was a comfortably long way off.
- Terry Pratchett, _Moving Pictures_
next prev parent reply other threads:[~2011-04-01 14:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 15:52 [U-Boot] [PATCH] serial: ns16550: fix different reg size access Lei Wen
2011-03-31 15:58 ` Wolfgang Denk
2011-04-01 5:24 ` Lei Wen
2011-04-01 5:35 ` Wolfgang Denk
2011-04-01 5:39 ` Lei Wen
2011-04-01 7:39 ` Wolfgang Denk
2011-04-01 7:59 ` Lei Wen
2011-04-01 10:25 ` Wolfgang Denk
2011-04-01 12:03 ` Lei Wen
2011-04-01 12:41 ` Wolfgang Denk
2011-04-01 13:07 ` Lei Wen
2011-04-01 13:55 ` Wolfgang Denk
2011-04-01 13:58 ` Lei Wen
2011-04-01 14:25 ` Wolfgang Denk [this message]
2011-04-01 14:34 ` Lei Wen
2011-04-01 17:45 ` Wolfgang Denk
2011-04-01 18:59 ` Prafulla Wadaskar
2011-04-01 19:04 ` Wolfgang Denk
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=20110401142552.D8EB0F0320A@gemini.denx.de \
--to=wd@denx.de \
--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