From: Peter Korsgaard <jacmet@sunsite.dk>
To: dhlii@dlasys.net
Cc: monstr@seznam.cz, Grant Likely <grant.likely@secretlab.ca>,
John Williams <john.williams@petalogix.com>,
Josh Boyer <jwboyer@linux.vnet.ibm.com>,
linux-serial@vger.kernel.org,
Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Subject: Re: Uartlite driver
Date: Fri, 16 May 2008 09:41:47 +0200 [thread overview]
Message-ID: <87zlqqg0g4.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <482C494D.2050306@dlasys.net> (David H. Lynch, Jr.'s message of "Thu\, 15 May 2008 10\:31\:41 -0400")
>>>>> "David" == David H Lynch <dhlii@dlasys.net> writes:
Hi,
David> I am also not happy with the register definitions hard coded
David> as 0,4,8,12 I have not read the Xilinx UartLite docs recently,
David> but there was older Xilinx code that implied the registers
David> could be 8, 16 or 32 bits. There is also atleast one
David> implimentation out there that accesses the UartLite via DCR.
Can the Xilinx core be configured for anything else than 32bit offset?
I don't think so.
David> Can we just move all the in's and outs to something like:
David> static unsigned int
David> serial_in(struct uart_port *port, int offset) {
David> unsigned int value;
David> switch (port->iotype) {
David> case UPIO_PORT:
David> value = mfdcr(offset);
David> break;
David> default:
David> offset <<= port->regshift;
David> value = readb(port->membase + offset);
David> }
David> return value;
David> }
David> Then we can handle all the 8/16/32 BE/LE, DCR, .... in one place ?
David> I think that is what is done in other drivers.
The only one that afaik does this is 8250.c because of the mindblowing
number of more-or-less compatible 8250 implementations. That's surely
not the case for the uartlite.
But ok, if the DCR access mode is supported by Xilinx - Why not?
Patches are welcome.
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2008-05-16 7:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-11 14:01 Uartlite driver Michal Simek
2008-05-11 22:39 ` John Williams
2008-05-12 4:31 ` Grant Likely
2008-05-12 6:15 ` Michal Simek
2008-05-15 14:31 ` David H. Lynch Jr.
2008-05-15 16:39 ` Stephen Neuendorffer
2008-05-16 7:41 ` Peter Korsgaard [this message]
2008-05-15 14:45 ` Uartlite driver & CONFIG_CONSOLE_POLL David H. Lynch Jr.
2008-05-16 7:47 ` Peter Korsgaard
[not found] ` <482E5BD0.1080306@dlasys.net>
2008-05-18 19:04 ` Peter Korsgaard
2008-05-12 7:43 ` Uartlite driver Peter Korsgaard
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=87zlqqg0g4.fsf@macbook.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=dhlii@dlasys.net \
--cc=grant.likely@secretlab.ca \
--cc=john.williams@petalogix.com \
--cc=jwboyer@linux.vnet.ibm.com \
--cc=linux-serial@vger.kernel.org \
--cc=monstr@seznam.cz \
--cc=stephen.neuendorffer@xilinx.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