From patchwork Mon Mar 13 13:04:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 95217 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1164207qgd; Mon, 13 Mar 2017 06:09:36 -0700 (PDT) X-Received: by 10.223.155.135 with SMTP id d7mr25848977wrc.99.1489410576584; Mon, 13 Mar 2017 06:09:36 -0700 (PDT) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 135si10823578wmi.92.2017.03.13.06.09.36; Mon, 13 Mar 2017 06:09:36 -0700 (PDT) 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 2C202C21C73; Mon, 13 Mar 2017 13:06:26 +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 4D420C21C4E; Mon, 13 Mar 2017 13:06:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9AE1DC21C5D; Mon, 13 Mar 2017 13:05:56 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id 4CCE5C21C70 for ; Mon, 13 Mar 2017 13:05:52 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2DD4rR6015651; Mon, 13 Mar 2017 08:04:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489410293; bh=a124au5Z4o1rOSdOF/2BS6NRsIW1HMSBMARzUBQIf8I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yuRJBs7fsAln2BPPpd6vByf5S9NxjpJVF3fBVgxSoSJUPpyUendSBkk0ICtA44QTY GH0qZK2+WsO6WVPKL/5RlFcwAQRTeevPqi2arMSDKim5xBayYex06d2BPr/StOOTd3 3ozWFtA80/+W4OhY8QScWm8zPIN/KgQnYT0XhCjw= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2DD4rAe002267; Mon, 13 Mar 2017 08:04:53 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Mon, 13 Mar 2017 08:04:52 -0500 Received: from lta0400828d.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2DD4YjR003968; Mon, 13 Mar 2017 08:04:51 -0500 From: Roger Quadros To: Date: Mon, 13 Mar 2017 15:04:31 +0200 Message-ID: <1489410273-10159-9-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489410273-10159-1-git-send-email-rogerq@ti.com> References: <1489410273-10159-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [u-boot PATCH v4 08/10] 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" 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 */