From patchwork Thu Mar 3 16:44:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Kridner X-Patchwork-Id: 85297 X-Patchwork-Delegate: s-paulraj@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id F3FCCB70A3 for ; Fri, 4 Mar 2011 03:44:45 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7542D28088; Thu, 3 Mar 2011 17:44:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4pGhMtCu9MoL; Thu, 3 Mar 2011 17:44:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5648228089; Thu, 3 Mar 2011 17:44:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 21FB428089 for ; Thu, 3 Mar 2011 17:44:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9+G-22eQMaIF for ; Thu, 3 Mar 2011 17:44:37 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by theia.denx.de (Postfix) with ESMTPS id 0756E28088 for ; Thu, 3 Mar 2011 17:44:35 +0100 (CET) Received: by vws6 with SMTP id 6so1047489vws.3 for ; Thu, 03 Mar 2011 08:44:34 -0800 (PST) Received: by 10.52.89.72 with SMTP id bm8mr2129745vdb.29.1299170674428; Thu, 03 Mar 2011 08:44:34 -0800 (PST) Received: from localhost.localdomain (ec2-75-101-156-174.compute-1.amazonaws.com [75.101.156.174]) by mx.google.com with ESMTPS id e20sm954925vbz.8.2011.03.03.08.44.31 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 08:44:31 -0800 (PST) From: Jason Kridner To: u-boot@lists.denx.de Date: Thu, 3 Mar 2011 10:44:27 -0600 Message-Id: <1299170667-14534-1-git-send-email-jkridner@beagleboard.org> X-Mailer: git-send-email 1.5.6.4 In-Reply-To: <1288936437-30671-1-git-send-email-jkridner@beagleboard.org> References: <1288936437-30671-1-git-send-email-jkridner@beagleboard.org> Cc: Steve Kipisz , beagleboard@googlegroups.com Subject: [U-Boot] [PATCH] OMAP3: BeagleBoard: Enable pullups on i2c2. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Steve Kipisz This allows the reading of EEPROMS on the expansion bus without adding external pull-ups. --- v2 updates * Updated per http://patchwork.ozlabs.org/patch/71997/ * Added description * Used OMAP34XX_CTRL_BASE * Used structure and writel to perform write Signed-off-by: Jason Kridner --- arch/arm/include/asm/arch-omap3/omap3.h | 16 ++++++++++++++++ board/ti/beagle/beagle.c | 4 ++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-omap3/omap3.h b/arch/arm/include/asm/arch-omap3/omap3.h index 3957c79..88454f2 100644 --- a/arch/arm/include/asm/arch-omap3/omap3.h +++ b/arch/arm/include/asm/arch-omap3/omap3.h @@ -50,6 +50,22 @@ /* 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) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 929461c..7ba98f1 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -148,6 +148,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 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: