On Wednesday 10 October 2001 11:40, you wrote:
> 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

I am including asm/hardware.h, compiling with -O2 and compiling against the 
proper kernel tree. Are there any other headers that might be critical? Is 
there a certain access mode the kernel module needs to be in to use physical 
memory instead of virtual memory?

Phil

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

Reply via email to