Looking in arch/i386/mm/ioremap.c, it says that the functions prefixed
with 'remap_area' are primarily for remapping a high PCI range to kernel
space.  Where as the ioremap function are for remapping any high memory
area to kernel space.

These functions are to be called once to cause linux to perform a
remapping.

The functions phys_to_virt and virt_to_phys are faster one line
functions defined in include/asm-i386/page.h. and accessible in io.h,
but they do not remap to kernel space so that a Linux program can access
the the memory range.  They just convert one address per function call. 

Looking at the driver, drivers/net/wan/cycx_drv.c, shows an ISA device
using ioremap. 

- Cheers,Kal.

Tomasz Motylewski wrote:
> 
> > > > How can i do this, can i use ioremap/iounmap function in my driver?
> > >
> > > Yes, these are the correct functions to use in your device driver.
> 
> Just looking in arcnet driver shows that phys_to_virt is used like:
> 
> union ArcPacket *arcpacket = (union ArcPacket *) phys_to_virt(dev->mem_start
> + recbuf * 512);
> 
> saddr = arcpacket->hardheader.source;
> 
> dev->mem_start is usually around 0xd0000. ioremap/iounmap are probably used
> rather for PCI memory (high addresses).
> 
> --
> Tomek
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to