RE: Réf. : Re: Read in /dev/port with Segmentation Fault

Fillod Stephane stephane.fillod at thomson.net
Thu Jun 9 19:35:24 EST 2005


Sophie CARAYOL wrote:
>Another question, if i use mmap to map physical addresses of I/O registers,
>could i dereference the pointer on virtual adresse to access data or should
>i use read/write on the file descriptor ?

Yes, you can dereference the pointer.
Don't you remember my past mail?

>From the Denx's FAQ (TFQ hits the list monthly) for accessing memory bus:

http://www.denx.de/twiki/bin/view/PPCEmbedded/DeviceDrivers#Section_AccessingPeripheralsFromUserSpace
or shorter: http://tinyurl.com/6c7th

See linux/drivers/char/mem.c to check if mmap support is ok on your arch.

Kenavo
-- 
Stéphane




More information about the Linuxppc-embedded mailing list