linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* setserial and ioremap
@ 2009-10-07 17:51 Christian Gagneraud
  0 siblings, 0 replies; only message in thread
From: Christian Gagneraud @ 2009-10-07 17:51 UTC (permalink / raw)
  To: linux-serial

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-07 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 17:51 setserial and ioremap Christian Gagneraud

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).