kernel: i2c padconf workaround

The padconf library runs in user mode, but to actually affect the
padconf register contents, the processor has to be in privileged
mode. A full server based solution will be developed, but for now
just set the pinmux in the kernel at boot.

Change-Id: I170ed54dae64b27cd9bd8807445231598fb8e3e1
This commit is contained in:
Thomas Cort
2013-07-15 10:28:58 -04:00
parent bb65c81387
commit 2dab6a5384
5 changed files with 396 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
#include "kernel/proc.h"
#include "kernel/debug.h"
#include "omap_ccnt.h"
#include "omap_padconf.h"
#include "glo.h"
@@ -124,6 +125,9 @@ void arch_init(void)
/* enable cycle counter in user mode: ARM ARM B4.1.124 */
value = OMAP_PMUSERENR_EN;
asm volatile ("MCR p15, 0, %0, c9, c14, 0\t\n": : "r" (value));
/* configure i2c pinmux */
omap3_padconf_init();
}
/*===========================================================================*