From: Roger Quadros <rogerq@ti.com>
To: 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
Date: Mon, 13 Mar 2017 15:04:31 +0200 [thread overview]
Message-ID: <1489410273-10159-9-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1489410273-10159-1-git-send-email-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.7.4
next prev parent reply other threads:[~2017-03-13 13:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 13:04 [U-Boot] [u-boot PATCH v4 00/10] am57xx-idk LCD and am571x-idk 6 port ethernet pinmux Roger Quadros
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 01/10] ARM: OMAP5+: GPIO: Add GPIO_TO_PIN() macro Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 02/10] ti: common: board_detect: Rename EEPROM scratch start macro Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 03/10] ti_armv7_keystone2: Define scratch space in SRAM Roger Quadros
2017-03-17 14:08 ` Tom Rini
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 04/10] ti: common: board_detect: commodify ethaddr environment setting code Roger Quadros
2017-03-13 13:15 ` Felipe Balbi
2017-03-14 10:52 ` Roger Quadros
2017-03-14 13:04 ` [U-Boot] [u-boot PATCH v5 " Roger Quadros
2017-03-14 15:54 ` Felipe Balbi
2017-03-15 13:53 ` Roger Quadros
2017-03-15 14:46 ` Felipe Balbi
2017-03-15 15:04 ` Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v5, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 05/10] board: ti: am571x-idk: Support 6 port Ethernet or 4 port Ethernet with LCD Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 06/10] board: ti: am571x-idk: Update pinmux for ICSS2 Ethernet Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 07/10] board: ti: am57xx-idk: Auto detect LCD Panel Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` Roger Quadros [this message]
2017-03-21 18:09 ` [U-Boot] [U-Boot, u-boot, v4, 08/10] ARM: Use Kconfig for board EEPROM's I2C bus and chip address Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 09/10] ARM: k2g: setup PRU ethernet MAC addresses Roger Quadros
2017-03-21 18:09 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 10/10] net: don't override ethernet address environment Roger Quadros
2017-03-17 14:08 ` Tom Rini
2017-03-21 18:09 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-17 14:08 ` [U-Boot] [u-boot PATCH v4 00/10] am57xx-idk LCD and am571x-idk 6 port ethernet pinmux 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=1489410273-10159-9-git-send-email-rogerq@ti.com \
--to=rogerq@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox