From patchwork Thu Mar 22 19:09:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 148318 X-Patchwork-Delegate: trini@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 5F85DB6F13 for ; Fri, 23 Mar 2012 06:11:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 623B6280AA; Thu, 22 Mar 2012 20:10:59 +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 Ol8N04e8vQnI; Thu, 22 Mar 2012 20:10:58 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F1C0280DE; Thu, 22 Mar 2012 20:10:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 861C02809C for ; Thu, 22 Mar 2012 20:10:04 +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 hdi2JpMJW27n for ; Thu, 22 Mar 2012 20:10:03 +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-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by theia.denx.de (Postfix) with ESMTPS id 751662809D for ; Thu, 22 Mar 2012 20:09:39 +0100 (CET) Received: by mail-ob0-f172.google.com with SMTP id tb4so1697143obb.3 for ; Thu, 22 Mar 2012 12:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=HGaGWk/gtYBtdju2gh0+f63EL/aLxv7MlEHQyUOAyXs=; b=vC5Z8uNOuVYvez1OhWku0QwjHvZNMgTK10bg/9dINFmN6ZiEZ49o9eGupgFheki/5A 7UJL80UvIgiilbC+DvNEjJOWK4pnbCseG1twi+BBB82wtGAQfILIu4D42RP/87xyDL2+ vpTZsFRHyM5aUC/S0m19H2rMHqzaw1SK+KOIkrq54FvmVB0tMhDydaK+PsnRX3i3jfVK Ybnp3KK67jdzNnfYMAUm8zwJrb+XpRz9Ko8UZKezeWZTXAGNGKm5JWw7aUV5mEgp+o+0 IXur3sa1CsXXGjuUoew7w9sFDRCxe8SCZ5wLZArWa7Fu747YQ7TF3H0yzF+sBy8oJMcR zXKQ== Received: by 10.182.17.100 with SMTP id n4mr11403809obd.45.1332443379195; Thu, 22 Mar 2012 12:09:39 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id a8sm4325352oea.8.2012.03.22.12.09.37 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Mar 2012 12:09:38 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 22 Mar 2012 12:09:17 -0700 Message-Id: <1332443357-14062-12-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1332443357-14062-1-git-send-email-trini@ti.com> References: <1332443357-14062-1-git-send-email-trini@ti.com> Subject: [U-Boot] [RFC v0 11/11] omap3: Consolidate I2C information into omap3_common.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 We default to standard speed for i2c and allow boards to override with fast or full-speed. This also removes a number of unused defines. Signed-off-by: Tom Rini --- include/configs/am3517_crane.h | 6 +----- include/configs/am3517_evm.h | 6 +----- include/configs/cm_t35.h | 6 +----- include/configs/devkit8000.h | 7 +------ include/configs/dig297.h | 6 +----- include/configs/igep00x0.h | 6 +----- include/configs/mcx.h | 5 +---- include/configs/omap3_beagle.h | 7 +------ include/configs/omap3_common.h | 11 +++++++++++ include/configs/omap3_evm_common.h | 10 +--------- include/configs/omap3_logic.h | 12 +----------- include/configs/omap3_mvblx.h | 7 +------ include/configs/omap3_overo.h | 5 +---- include/configs/omap3_pandora.h | 6 +----- include/configs/omap3_sdp3430.h | 10 +--------- include/configs/omap3_zoom1.h | 7 +------ include/configs/omap3_zoom2.h | 7 +------ include/configs/tam3517-common.h | 6 +----- include/configs/tricorder.h | 7 +------ 19 files changed, 29 insertions(+), 108 deletions(-) diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index 6b681e5..48579ce 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h @@ -112,12 +112,8 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 #undef CONFIG_CMD_NET #undef CONFIG_CMD_NFS diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 6137730..bd58bad 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -112,12 +112,8 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 #undef CONFIG_CMD_NET #undef CONFIG_CMD_NFS diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index 14c443c..c2c5af6 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -103,12 +103,8 @@ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ #undef CONFIG_CMD_IMLS /* List all found images */ -#define CONFIG_HARD_I2C -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index 91d976f..bc51e53 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -73,13 +73,8 @@ #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3 #define CONFIG_BAUDRATE 115200 -/* I2C */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* TWL4030 */ #define CONFIG_TWL4030_POWER 1 diff --git a/include/configs/dig297.h b/include/configs/dig297.h index 792dff7..7708d2c 100644 --- a/include/configs/dig297.h +++ b/include/configs/dig297.h @@ -95,12 +95,8 @@ #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */ -#define CONFIG_HARD_I2C -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* * TWL4030 diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h index d7136ef..d6eff96 100644 --- a/include/configs/igep00x0.h +++ b/include/configs/igep00x0.h @@ -80,12 +80,8 @@ #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ #undef CONFIG_CMD_IMLS /* List all found images */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* * TWL4030 diff --git a/include/configs/mcx.h b/include/configs/mcx.h index 9d3b443..12e7280 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -105,11 +105,8 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#define CONFIG_HARD_I2C -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_DRIVER_OMAP34XX_I2C /* RTC */ #define CONFIG_RTC_DS1337 diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index ec1856d..05b051a 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -129,13 +129,8 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_I2C_MULTI_BUS 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 #define CONFIG_VIDEO_OMAP3 /* DSS Support */ /* diff --git a/include/configs/omap3_common.h b/include/configs/omap3_common.h index 6fc93b8..0ae1614 100644 --- a/include/configs/omap3_common.h +++ b/include/configs/omap3_common.h @@ -89,6 +89,17 @@ 115200} #endif +/* + * I2C support. We default to standard speed but allow boards to specify + * fast or high-speed. + * */ +#define CONFIG_CMD_I2C +#define CONFIG_HARD_I2C +#ifndef CONFIG_SYS_I2C_SPEED +#define CONFIG_SYS_I2C_SPEED 100000 +#endif +#define CONFIG_DRIVER_OMAP34XX_I2C + /* MMC */ #define CONFIG_CMD_MMC #if defined(CONFIG_CMD_MMC) diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h index c96a881..7a47bc4 100644 --- a/include/configs/omap3_evm_common.h +++ b/include/configs/omap3_evm_common.h @@ -77,16 +77,8 @@ #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1 #define CONFIG_BAUDRATE 115200 -/* - * I2C - */ -#define CONFIG_HARD_I2C -#define CONFIG_DRIVER_OMAP34XX_I2C - -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 /* * PISMO support diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index e9415a7..d50c6f1 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -86,18 +86,8 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ - -/* - * I2C - */ -#define CONFIG_HARD_I2C -#define CONFIG_DRIVER_OMAP34XX_I2C - -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_I2C_MULTI_BUS /* * TWL4030 diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h index 6199eca..c29c99d 100644 --- a/include/configs/omap3_mvblx.h +++ b/include/configs/omap3_mvblx.h @@ -102,13 +102,8 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_FPGA -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 0 */ #define CONFIG_SYS_I2C_SLAVE 0 -#define CONFIG_SYS_I2C_BUS 0 /* This isn't used anywhere ?? */ -#define CONFIG_SYS_I2C_BUS_SELECT 1 /* This isn't used anywhere ?? */ -#define CONFIG_DRIVER_OMAP34XX_I2C 1 -#define CONFIG_I2C_MULTI_BUS 1 /* * TWL4030 diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 71bb1a3..c2a4cbe 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -64,11 +64,8 @@ #undef CONFIG_CMD_NFS /* NFS support */ #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ -#define CONFIG_HARD_I2C -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_DRIVER_OMAP34XX_I2C /* * TWL4030 diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 7b22c83..84292e4 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -79,12 +79,8 @@ #undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* * TWL4030 diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h index b082f30..6d73887 100644 --- a/include/configs/omap3_sdp3430.h +++ b/include/configs/omap3_sdp3430.h @@ -89,16 +89,8 @@ #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1 #endif - -/* - * I2C for power management setup - */ -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* OMITTED: single 1 Gbit MT29F1G NAND flash */ diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 13ef802..93fbd39 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -89,13 +89,8 @@ #undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */ -#define CONFIG_SYS_NO_FLASH -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* * TWL4030 diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index 806854b..fe71a16 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoom2.h @@ -121,13 +121,8 @@ #undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */ -#define CONFIG_SYS_NO_FLASH -#define CONFIG_HARD_I2C 1 -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* * TWL4030 diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 392b660..f5d2f5e 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -89,13 +89,9 @@ #undef CONFIG_CMD_FLASH /* only NAND on the SOM */ #undef CONFIG_CMD_IMLS -#define CONFIG_HARD_I2C +/* Use fast mode i2c and our i2c slave is 1 */ #define CONFIG_SYS_I2C_SPEED 400000 #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C - #define CONFIG_AUTO_COMPLETE diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 41e1aae..b3cd6a0 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -66,13 +66,8 @@ #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3 #define CONFIG_BAUDRATE 115200 -/* I2C */ -#define CONFIG_HARD_I2C -#define CONFIG_SYS_I2C_SPEED 100000 +/* Our i2c slave is 1 */ #define CONFIG_SYS_I2C_SLAVE 1 -#define CONFIG_SYS_I2C_BUS 0 -#define CONFIG_SYS_I2C_BUS_SELECT 1 -#define CONFIG_DRIVER_OMAP34XX_I2C 1 /* TWL4030 */ #define CONFIG_TWL4030_POWER