From patchwork Mon Feb 6 09:36:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 93389 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1630134qgi; Mon, 6 Feb 2017 01:37:31 -0800 (PST) X-Received: by 10.28.92.83 with SMTP id q80mr8599532wmb.108.1486373851651; Mon, 06 Feb 2017 01:37:31 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 76si7360666wmn.97.2017.02.06.01.37.31; Mon, 06 Feb 2017 01:37:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A63D4B731; Mon, 6 Feb 2017 10:37:25 +0100 (CET) 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 R44rvkCQVYe6; Mon, 6 Feb 2017 10:37:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7DB744B76E; Mon, 6 Feb 2017 10:36:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4B5634B15F for ; Mon, 6 Feb 2017 10:36:35 +0100 (CET) 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 kzDK1S_iDctB for ; Mon, 6 Feb 2017 10:36:35 +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 fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by theia.denx.de (Postfix) with ESMTPS id 729124B1D0 for ; Mon, 6 Feb 2017 10:36:34 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v169aW2x030064; Mon, 6 Feb 2017 03:36:32 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v169aVfd023241; Mon, 6 Feb 2017 03:36:31 -0600 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, 6 Feb 2017 03:36:31 -0600 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 v169aH15000892; Mon, 6 Feb 2017 03:36:30 -0600 From: Roger Quadros To: , Date: Mon, 6 Feb 2017 11:36:13 +0200 Message-ID: <1486373775-29580-7-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486373775-29580-1-git-send-email-rogerq@ti.com> References: <1486373775-29580-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [u-boot PATCH v3 6/8] ARM: Use Kconfig for board EEPROM's I2C bus and chip address X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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 --- board/ti/common/Kconfig | 14 ++++++++++++++ board/ti/ks2_evm/Kconfig | 2 ++ include/configs/am57xx_evm.h | 4 ---- include/configs/dra7xx_evm.h | 4 ---- 4 files changed, 16 insertions(+), 8 deletions(-) -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Reviewed-by: Tom Rini diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index 4980a04..5003484 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig @@ -1,3 +1,5 @@ +if ARCH_OMAP2 + config SPL_ENV_SUPPORT default y @@ -39,3 +41,15 @@ config SPL_POWER_SUPPORT config SPL_SERIAL_SUPPORT default y + +endif + +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 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 840502c..d9e1119 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -105,10 +105,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 da458a4..46beb8b 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -264,8 +264,4 @@ #endif #endif /* NOR support */ -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - #endif /* __CONFIG_DRA7XX_EVM_H */