]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
OMAP3: BeagleBoard: Enable pullups on i2c2.
authorSteve Kipisz <s-kipisz2@ti.com>
Mon, 18 Apr 2011 21:27:00 +0000 (17:27 -0400)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 27 Apr 2011 17:38:06 +0000 (19:38 +0200)
This allows the reading of EEPROMS on the expansion bus without adding
external pull-ups.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
arch/arm/include/asm/arch-omap3/omap3.h
board/ti/beagle/beagle.c

index 3957c796f2263dced3236b69db04c25096d6d0c7..cc2b5415c12e9f15b61c3631449c1bf515b76b66 100644 (file)
 /* CONTROL */
 #define OMAP34XX_CTRL_BASE             (OMAP34XX_L4_IO_BASE + 0x2000)
 
+#ifndef __ASSEMBLY__
+/* Signal Integrity Parameter Control Registers */
+struct control_prog_io {
+       unsigned char res[0x408];
+       unsigned int io2;               /* 0x408 */
+       unsigned char res2[0x38];
+       unsigned int io0;               /* 0x444 */
+       unsigned int io1;               /* 0x448 */
+};
+#endif /* __ASSEMBLY__ */
+
+/* Bit definition for CONTROL_PROG_IO1 */
+#define PRG_I2C2_PULLUPRESX            0x00000001
+
 /* UART */
 #define OMAP34XX_UART1                 (OMAP34XX_L4_IO_BASE + 0x6a000)
 #define OMAP34XX_UART2                 (OMAP34XX_L4_IO_BASE + 0x6c000)
index 89e3dbae76a5ebedac1865bba204dca61eba3393..2fdee7c08bff6c05ca0591aa86ca416a72b34264 100644 (file)
@@ -155,6 +155,10 @@ int misc_init_r(void)
 {
        struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
        struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
+       struct control_prog_io *prog_io_base = (struct gpio *)OMAP34XX_CTRL_BASE;
+
+       /* Enable i2c2 pullup resisters */
+       writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1);
 
        switch (get_board_revision()) {
        case REVISION_AXBX: