On Thu, Jun 28, 2001 at 08:54:40PM -0700, Sisinio Baldis wrote:
> I am having troubles using the GPIO port on a SA1100.  Included is a snippet
> of code that tries to set the GPIO port to output, then set everything high,
> followed by low.  This simple little test is throwing a segmentation fault
> every time I try to write to the registers.

You can't have access to the SA1100 registers from userland in that way
because userland uses *virtual* addresses and you're trying to touch
*physical* addresses. To get it done you'll need to mmap(/dev/mem). Get
devmem2.c from http://www.lart.tudelft.nl/lartware/port/ , it does
exactly what you want.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [EMAIL PROTECTED]
WWW: http://www-ict.its.tudelft.nl/~erik/

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to