From: Christian Gagneraud <cgagneraud@techworks.ie>
To: linux-serial@vger.kernel.org
Subject: setserial and ioremap
Date: Wed, 07 Oct 2009 18:51:24 +0100 [thread overview]
Message-ID: <4ACCD51C.3020604@techworks.ie> (raw)
Hi,
I'm using an ARM platform that has a PC104 bus.
The vendor of the board provide a 2.6.21 kernel, and in it there's a
plethora of small kernel module to support each single expansion board
having a 16550 chip for each single supported platform (because the
PC104 bus is not always at the same address).
These modules are very smal, they only fill up a uart_port struct and
call serial8250_register_port().
The small detail is that they set the iotype to UPIO_MEM, set the
mapbase to the right physical address and set UPF_IOREMAP in the flags.
Instead of using these kernel modules, I would like to use setserial.
but it doesn't support both UPIO_MEM and UPF_IOREMAP.
I've easily added the UPIO_MEM iotype to setserial but got unlucky
with UPF_IOREMAP. Even if I set UPF_IOREMAP in the flags, the kernel
refuse to ioremap the base address (I tried both with mapbase and
membase).
I've spotted the code in 8250.c, and it should do the ioremap if the
flags contains UPF_IOREMAP. But I have the feeling that this flag is
cleared or ignored when coming from userspace.
I've noticed that in the machine initialisation code the PC104 IO
space is not ioremap'ed, could it be the source of the problem?
I remembered having seen a global ioremap of the PC104 on another
PC104 ARM board, but i wonder it that's the right strategy.
if the PC104 IO space was ioremap'ed by defatult, then i could use
UPIO_PORT with an unmodified setserial.
Any thought about this?
Regards,
Chris
reply other threads:[~2009-10-07 18:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4ACCD51C.3020604@techworks.ie \
--to=cgagneraud@techworks.ie \
--cc=linux-serial@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).