From patchwork Thu Mar 3 16:59:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Kridner X-Patchwork-Id: 85301 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 2AD5CB6F01 for ; Fri, 4 Mar 2011 03:59:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9AF4B2808A; Thu, 3 Mar 2011 17:59:46 +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 3+k5BTgLjQKL; Thu, 3 Mar 2011 17:59:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A76302808F; Thu, 3 Mar 2011 17:59:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F410C2808F for ; Thu, 3 Mar 2011 17:59:41 +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 jCVe9AXimeIV for ; Thu, 3 Mar 2011 17:59:41 +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 093222808A for ; Thu, 3 Mar 2011 17:59:38 +0100 (CET) Received: by vws6 with SMTP id 6so1061636vws.3 for ; Thu, 03 Mar 2011 08:59:37 -0800 (PST) Received: by 10.52.98.4 with SMTP id ee4mr1027069vdb.129.1299171565953; Thu, 03 Mar 2011 08:59:25 -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 c15sm566436vcs.7.2011.03.03.08.59.23 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 08:59:24 -0800 (PST) From: Jason Kridner To: u-boot@lists.denx.de Date: Thu, 3 Mar 2011 10:59:22 -0600 Message-Id: <1299171562-4581-1-git-send-email-jkridner@beagleboard.org> X-Mailer: git-send-email 1.5.6.4 In-Reply-To: <1299170667-14534-1-git-send-email-jkridner@beagleboard.org> References: <1299170667-14534-1-git-send-email-jkridner@beagleboard.org> Cc: Steve Kipisz , beagleboard@googlegroups.com Subject: [U-Boot] [PATCH v3] 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 v3 updates * Included v3 in the subject line * Fixed structure name typo that got messed up in generating patch * Removed some extraneous blank lines Signed-off-by: Jason Kridner --- arch/arm/include/asm/arch-omap3/omap3.h | 14 ++++++++++++++ board/ti/beagle/beagle.c | 4 ++++ 2 files changed, 18 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..cc2b541 100644 --- a/arch/arm/include/asm/arch-omap3/omap3.h +++ b/arch/arm/include/asm/arch-omap3/omap3.h @@ -50,6 +50,20 @@ /* 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..3884ca1 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 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: