Index: ti_iic.c =================================================================== RCS file: /cvsroot/src/sys/arch/arm/omap/ti_iic.c,v retrieving revision 1.4 diff -u -r1.4 ti_iic.c --- ti_iic.c 25 Apr 2013 13:04:27 -0000 1.4 +++ ti_iic.c 27 May 2013 18:31:59 -0000 @@ -242,19 +242,39 @@ if (sitara_cm_padconf_get(buf, &mode, &state) == 0) { aprint_debug(": SDA mode %s state %d ", mode, state); } - if (sitara_cm_padconf_set(buf, buf, - (0x01 << 4) | (0x01 << 5) | (0x01 << 6)) != 0) { - aprint_error(": can't switch %s pad\n", buf); - return; + if(i == 1) { +// aprint_normal(": doing I2C1 SDA magic\n"); + if (sitara_cm_padconf_set("SPIO_D1", buf, + (0x01 << 4) | (0x01 << 5) | (0x01 << 6)) != 0) { + aprint_error(": can't switch %s pad\n", buf); + return; + } + } else { + if (sitara_cm_padconf_set(buf, buf, + (0x01 << 4) | (0x01 << 5) | (0x01 << 6)) != 0) { + aprint_error(": can't switch %s pad\n", buf); + return; + } } sprintf(buf, "%s_SCL", am335x_iic[i].as_name); if (sitara_cm_padconf_get(buf, &mode, &state) == 0) { aprint_debug(": SCL mode %s state %d ", mode, state); } - if (sitara_cm_padconf_set(buf, buf, - (0x01 << 4) | (0x01 << 5) | (0x01 << 6)) != 0) { - aprint_error(": can't switch %s pad\n", buf); - return; + + if (i == 1) { +// aprint_normal(": doing I2C1 SCL magic\n"); + if (sitara_cm_padconf_set("SPI0_CS0", buf, + (0x01 << 4) | (0x01 << 5) | (0x01 << 6)) != 0) { + aprint_error(": can't switch %s pad\n", buf); + return; + } + + } else { + if (sitara_cm_padconf_set(buf, buf, + (0x01 << 4) | (0x01 << 5) | (0x01 << 6)) != 0) { + aprint_error(": can't switch %s pad\n", buf); + return; + } } #endif