r6007 - trunk/src/target/gpio
werner at docs.openmoko.org
werner at docs.openmoko.org
Fri Dec 23 15:38:45 CET 2011
Author: werner
Date: 2011-12-23 15:38:45 +0100 (Fri, 23 Dec 2011)
New Revision: 6007
Modified:
trunk/src/target/gpio/gpio-s3c6410.c
Log:
gpio-s3c6410.c (set_h): correct offset of pull-up register (by Andy Pevy)
Andy wrote:
In the set_h function, the offset used for calculating the pud
register address is set to 8 but the actual offset for the 3 registers
that use the function (GPIO ports H, K and L) should be 0x0C.
I have changed my code and I can now successfully use port K
on my application.
Modified: trunk/src/target/gpio/gpio-s3c6410.c
===================================================================
--- trunk/src/target/gpio/gpio-s3c6410.c 2011-03-24 23:42:47 UTC (rev 6006)
+++ trunk/src/target/gpio/gpio-s3c6410.c 2011-12-23 14:38:45 UTC (rev 6007)
@@ -204,9 +204,9 @@
*(uint32_t *) (mem+p->offset+4) = dat;
}
- pud = *(uint32_t *) (mem+p->offset+8);
+ pud = *(uint32_t *) (mem+p->offset+12);
pud = (pud & ~(15 << (num*4))) | (r << (num*4));
- *(uint32_t *) (mem+p->offset+8) = pud;
+ *(uint32_t *) (mem+p->offset+12) = pud;
}
More information about the commitlog
mailing list