On Tue, Oct 09, 2001 at 05:42:55PM -0400, Philip Jones wrote:
> In writing a kernel module for an SA-1110 based system I attempt to access 
> GPIOs by calling 'GPDR |= GPIO_GPIO(#)' to set the direction register, but 
> this results in "Unable to handle kernel paging request at virtual address 
> 90040004". Could I be forgetting to do something to prepare the kernel for 
> that type of memory access? If anyone knows where some good documentation on 
> the subject is located, or can explain the process of accessing the GPIOs in 
> such a manner, it would be much appreciated.

No, that's the correct way. See for example
arch/arm/mach-sa1100/leds-lart.c.

A couple of hints:

- Be sure to include asm/hardware.h. Compile your module with -Wall to
  get warned about this.
- _Allways_ compile kernel modules with -O2 or your module _will_ fail.
  I don't know how experienced you are, but this is a very common error
  on the kernelnewbies mailing list.
- Be sure to compile against the kernel headers for the kernel you are
  running on your SA11x0 system. Use -I/path/to/kernel/source/include .


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