Hello Philip,
you wrote :

>     I'm having difficulty with the SA1110 GPIO and mmap.  The following code
>    compiles and executes, however, the appropriate pin does not toggle as
>    expected:
>  .................................

Unless this changed from Kernel 2.2 to 2,4, I think the main problem is that
/dev/mem only maps physical *RAM* (0xc0000000 + xMb, possibly with holes in it
if you use several banks on an SA1110).

Thus you cannot use /dev/mem to map IO-Adresses to user space.
/dev/kmem probably does not work either.

Please be aware of another pitfall :

>      /* Set the SC pin high */
>      *GPSR |= 0x00000004;

 GPSR (GP_Set_Register) and GPCR (GP_Clear_Register) are write-only registers
that are only written with a 1 for each bit that is to be set (GPSR) or cleared
(GPCR). Therefore, 
   GPSR |= 0x00000004;
probably works as expected (sets GPIO2), but 
   GPCR &= ~0x00000004;
would be a NOP, as as it reads 0 from the non-existent
read-Register and then writes all 0's to GPCR, which clears nothing.

Best regards,

Klaus

--
Mobotix AG
Klaus Borchers
Wingertsweilerhof 6
D-67724 Hoeringen
Germany

Tel: +49 (6302) 9223-88
Fax: +49 (6302) 9223-70
E-Mail: [EMAIL PROTECTED]

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

Reply via email to