lkml.org 
[lkml]   [1999]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Design issues serial PCI driver based on char/serial.c
Date
From
> not PCI I/O space. Furthermore, for some unknown reason, the registers
> of the UART are separated 0x80 apart. Since char/serial.c uses I/O
> instructions to access the UART, I had to hack the driver to use readb()
> and friends. I am also multiplying the offset to compensate for the
> strange offsets.

This sounds like the problem I had with the mac68k ethernet cards.

> But then I have to decide runtime to use inb() and outb() or readb() and
> writeb(), since the driver also may be used for other cards that use I/O
> based access. Do you think that this would cause too much overhead in
> the interrupt handlers? It means that every I/O access will be slowed
> down by some extra memory references and a test.

Try it and see.

My personal feeling is that you want to define a macro used for each
read/write of the ports so that the serial code uses something like

READ_PORT(x)

and on x86 and other platforms it comes out as the old inb/outb code
and on your driver it comes out as your more complex code with scaling

Alan




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.033 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site