From patchwork Thu Mar 2 19:04:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin S Cooper Jr X-Patchwork-Id: 94801 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp306524qgd; Thu, 2 Mar 2017 11:09:20 -0800 (PST) X-Received: by 10.223.173.76 with SMTP id p70mr13032396wrc.168.1488481760305; Thu, 02 Mar 2017 11:09:20 -0800 (PST) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id u4si11784129wrb.59.2017.03.02.11.09.19; Thu, 02 Mar 2017 11:09:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id B3BB8C21C45; Thu, 2 Mar 2017 19:07:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 881B1C21CB9; Thu, 2 Mar 2017 19:06:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C44E6C21C9D; Thu, 2 Mar 2017 19:05:14 +0000 (UTC) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by lists.denx.de (Postfix) with ESMTPS id BEB13C21CE1 for ; Thu, 2 Mar 2017 19:05:07 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v22J56K3021071 for ; Thu, 2 Mar 2017 13:05:06 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1488481506; bh=mINhq7/W4NtpcSYyxwy3YAyj7eE2kFpVTuHTGRAsO/0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=oQtgeeTPbp3fxGhNWVf2WdFMd6GvpkCBlG2ko86zxLOFkkD9d7/GMEnHrt7UvlQHx u8fqJdhQ1cyfO7AFGS1ZD+7IwVwHdiR0+slngFGC+U6WurJlNLYBzJ80/PkO6SIyTG nf70L2hqwlS+Tni1TCl6KnqDFTy9Wz3/xKF6N9Ks= Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v22J56ao014016 for ; Thu, 2 Mar 2017 13:05:06 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Thu, 2 Mar 2017 13:05:05 -0600 Received: from dbdmail01.india.ti.com (dbdmail01.india.ti.com [172.24.162.206]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v22J54r1023358; Thu, 2 Mar 2017 13:05:05 -0600 Received: from udb0273011.am.dhcp.ti.com (udb0273011.am.dhcp.ti.com [128.247.83.33]) by dbdmail01.india.ti.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id v22J4d2E015682; Fri, 3 Mar 2017 00:35:02 +0530 From: Franklin S Cooper Jr To: , , , Date: Thu, 2 Mar 2017 13:04:14 -0600 Message-ID: <20170302190435.23212-11-fcooper@ti.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20170302190435.23212-1-fcooper@ti.com> References: <20170302190435.23212-1-fcooper@ti.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 10/31] ARM: Use Kconfig for board EEPROM's I2C bus and chip address X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Roger Quadros In stead of defining the board EEPROM address in the board headers let's define them in the board config files and make them configurable by Kconfig. Signed-off-by: Roger Quadros Reviewed-by: Tom Rini --- board/ti/common/Kconfig | 20 +++++++++++++++++--- board/ti/ks2_evm/Kconfig | 2 ++ include/configs/am57xx_evm.h | 4 ---- include/configs/dra7xx_evm.h | 4 ---- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index 4980a04..162248c 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig @@ -1,12 +1,24 @@ -config SPL_ENV_SUPPORT - default y - config TI_I2C_BOARD_DETECT bool "Support for Board detection for TI platforms" help Support for detection board information on Texas Instrument's Evaluation Boards which have I2C based EEPROM detection +config EEPROM_BUS_ADDRESS + int "Board EEPROM's I2C bus address" + range 0 8 + default 0 + +config EEPROM_CHIP_ADDRESS + hex "Board EEPROM's I2C chip address" + range 0 0xff + default 0x50 + +if ARCH_OMAP2 + +config SPL_ENV_SUPPORT + default y + config SPL_EXT_SUPPORT default y @@ -39,3 +51,5 @@ config SPL_POWER_SUPPORT config SPL_SERIAL_SUPPORT default y + +endif diff --git a/board/ti/ks2_evm/Kconfig b/board/ti/ks2_evm/Kconfig index c0568ec..9477f53 100644 --- a/board/ti/ks2_evm/Kconfig +++ b/board/ti/ks2_evm/Kconfig @@ -49,3 +49,5 @@ config SYS_CONFIG_NAME default "k2g_evm" endif + +source "board/ti/common/Kconfig" diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 3d8b996..40a3bbd 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -103,10 +103,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - /* * Default to using SPI for environment, etc. * 0x000000 - 0x040000 : QSPI.SPL (256KiB) diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 549439e..2996807 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -261,8 +261,4 @@ #endif #endif /* NOR support */ -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - #endif /* __CONFIG_DRA7XX_EVM_H */