All of lore.kernel.org
 help / color / mirror / Atom feed
From: Franklin S Cooper Jr <fcooper@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 10/31] ARM: Use Kconfig for board EEPROM's I2C bus and chip address
Date: Thu, 2 Mar 2017 13:04:14 -0600	[thread overview]
Message-ID: <20170302190435.23212-11-fcooper@ti.com> (raw)
In-Reply-To: <20170302190435.23212-1-fcooper@ti.com>

From: Roger Quadros <rogerq@ti.com>

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 <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 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 */
-- 
2.10.0

  parent reply	other threads:[~2017-03-02 19:04 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 19:04 [U-Boot] [PATCH 00/31] ARM: k2g: Add support for new K2G ICE EVM Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 01/31] ti: common: board_detect: Allow settings board detection variables manually Franklin S Cooper Jr
2017-03-02 19:10   ` Felipe Balbi
2017-03-02 19:52     ` Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 02/31] spl: fit: Break out some functions into a common file Franklin S Cooper Jr
2017-03-08 21:01   ` Simon Glass
2017-03-08 21:30     ` Franklin S Cooper Jr
2017-03-13 12:33   ` Simon Glass
2017-03-02 19:04 ` [U-Boot] [PATCH 03/31] boot_fit: Create helper functions that can be used to select DTB out of FIT Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 04/31] fdt: Enable selecting correct DTB from append FIT Image Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 05/31] ti: common: board_detect: Add function to determine if EEPROM was read Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 06/31] dts: Allow OF_LIST to depend on FIT_EMBED Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 07/31] arm: dts: Add new "generic" 66AK2Gx device tree file Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 08/31] ti: common: board_detect: Rename EEPROM scratch start macro Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 09/31] ti_armv7_keystone2: Define scratch space in SRAM Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` Franklin S Cooper Jr [this message]
2017-03-02 19:04 ` [U-Boot] [PATCH 11/31] ARM: k2g: Enable TI board detection code Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 12/31] board_f: Add new function to allow runtime DTB selection Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-09 20:12     ` Lukasz Majewski
2017-03-10 15:42       ` Tom Rini
2017-03-30 16:22         ` Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 13/31] Makefile: Build additional binaries for dtb FIT blobs appended to U-boot Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 14/31] ARM: keystone2: Allow to build with all image formats Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 15/31] ARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-boot Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 16/31] ARM: keystone2: Define board_fit_config_name_match for Keystone 2 boards Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 17/31] ks2_evm: Add EEPROM based board detection Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 18/31] defconfig: keystone2: Enable U-boot runtime DTB detection Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-16 21:52     ` Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 19/31] ARM: keystone2: Add additional fields used for DDR3 configuration Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 20/31] ARM: k2g: Program DDR PHY MR2 register with the default value Franklin S Cooper Jr
2017-03-09 13:08   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 21/31] ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 22/31] ks2_evm: Add EEPROM based board detection helper functions Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 23/31] ARM: k2g: Add pinmux support for K2G ICE evm Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 24/31] ARM: k2g: Add DDR3 configuration " Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 25/31] board: ks2: Use board detection to wrap code not specific to " Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 26/31] ARM: k2g: Use board detection to wrap K2G GP specific calls Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 27/31] ARM: k2g: Update board_name u-boot env variable at runtime Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 28/31] ARM: dts: k2g: Disable netcp by default Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-16 21:55     ` Franklin S Cooper Jr
2017-03-02 19:04 ` [U-Boot] [PATCH 29/31] ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm Franklin S Cooper Jr
2017-03-09 13:09   ` Tom Rini
2017-03-16 21:56     ` Franklin S Cooper Jr
2017-03-17 14:08       ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 30/31] ARM: k2g: Add K2G ICE DTB to the list of possible DTBs Franklin S Cooper Jr
2017-03-09 13:10   ` Tom Rini
2017-03-02 19:04 ` [U-Boot] [PATCH 31/31] defconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST Franklin S Cooper Jr
2017-03-09 13:10   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170302190435.23212-11-fcooper@ti.com \
    --to=fcooper@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.