linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI drivers - memory mapped vs. I/O ports
@ 2002-03-18 19:50 Ed Vance
  2002-03-18 20:32 ` Alan Cox
  2002-03-18 20:36 ` Richard B. Johnson
  0 siblings, 2 replies; 4+ messages in thread
From: Ed Vance @ 2002-03-18 19:50 UTC (permalink / raw)
  To: 'linux-kernel'

If a PCI device can be programmed equally well via I/O port space or memory
space, what are the reasons to chose one space over the other when writing
the driver?

---------------------------------------------------------------- 
Ed Vance              edv@macrolink.com
Macrolink, Inc.       1500 N. Kellogg Dr  Anaheim, CA  92807
----------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCI drivers - memory mapped vs. I/O ports
  2002-03-18 19:50 PCI drivers - memory mapped vs. I/O ports Ed Vance
@ 2002-03-18 20:32 ` Alan Cox
  2002-03-18 20:36 ` Richard B. Johnson
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2002-03-18 20:32 UTC (permalink / raw)
  To: Ed Vance; +Cc: 'linux-kernel'

> If a PCI device can be programmed equally well via I/O port space or memory
> space, what are the reasons to chose one space over the other when writing
> the driver?

mmio is posted on a PC i/o ports are not. That means you have to be more
careful but also means that

	write
	write
	write
	read

is a lot faster


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCI drivers - memory mapped vs. I/O ports
  2002-03-18 19:50 PCI drivers - memory mapped vs. I/O ports Ed Vance
  2002-03-18 20:32 ` Alan Cox
@ 2002-03-18 20:36 ` Richard B. Johnson
  2002-03-19  2:17   ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: Richard B. Johnson @ 2002-03-18 20:36 UTC (permalink / raw)
  To: Ed Vance; +Cc: 'linux-kernel'

On Mon, 18 Mar 2002, Ed Vance wrote:

> If a PCI device can be programmed equally well via I/O port space or memory
> space, what are the reasons to chose one space over the other when writing
> the driver?
> 

o       There is more 'memory' I/O space. Therefore you are more likely
        to have enough space for your device when other boards are
        installed. IOTW, you may find that there is no I/O space allocated
        because there isn't any available.

o       Memory address space I/O is faster on Intel Machines. You can
        write or read whole buffers of I/O space in memory address space.
        the best you can do in port space is one long-word at a time.

o       PCI posted writes work when accessing memory-address I/O space.
        Port I/O space cannot do this. The FIFO is written immediately
        before any other access is allowed. This improves the access
        speed in certain circumstances.

Basically, if you have a choice, it's hands-down to use memory-mapped
I/O space.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

                 Windows-2000/Professional isn't.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCI drivers - memory mapped vs. I/O ports
  2002-03-18 20:36 ` Richard B. Johnson
@ 2002-03-19  2:17   ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2002-03-19  2:17 UTC (permalink / raw)
  To: root; +Cc: Ed Vance, 'linux-kernel'

Richard B. Johnson wrote:

>On Mon, 18 Mar 2002, Ed Vance wrote:
>
>>If a PCI device can be programmed equally well via I/O port space or memory
>>space, what are the reasons to chose one space over the other when writing
>>the driver?
>>

>Basically, if you have a choice, it's hands-down to use memory-mapped
>I/O space.
>

Yep, I couldn't agree more.

    Jeff





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-19  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-18 19:50 PCI drivers - memory mapped vs. I/O ports Ed Vance
2002-03-18 20:32 ` Alan Cox
2002-03-18 20:36 ` Richard B. Johnson
2002-03-19  2:17   ` Jeff Garzik

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