@@ -86,6 +86,14 @@ void do_board_detect(void)
}
#endif
+int extension_board_scan(struct list_head *extension_list)
+{
+ if (IS_ENABLED(CONFIG_TI_CAPE_DETECT))
+ return ti_cape_extension_board_scan(extension_list);
+ else
+ return -EINVAL;
+}
+
#ifndef CONFIG_DM_SERIAL
struct serial_device *default_serial_console(void)
{
@@ -4,6 +4,14 @@ config TI_I2C_BOARD_DETECT
Support for detection board information on Texas Instrument's
Evaluation Boards which have I2C based EEPROM detection
+config TI_CAPE_DETECT
+ bool "Support BeagleBone Cape detection for TI platforms"
+ default y if TARGET_AM335X_EVM
+ depends on SUPPORT_EXTENSION_SCAN
+ help
+ Support Beagle Bone Cape detection for TI platforms
+ e.g. AM335x BeagleBone.
+
config EEPROM_BUS_ADDRESS
int "Board EEPROM's I2C bus address"
range 0 8
@@ -2,4 +2,4 @@
# Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o
-obj-${CONFIG_CMD_EXTENSION} += cape_detect.o
+obj-${CONFIG_TI_CAPE_DETECT} += cape_detect.o
@@ -21,7 +21,7 @@ static void sanitize_field(char *text, size_t size)
}
}
-int extension_board_scan(struct list_head *extension_list)
+int ti_cape_extension_board_scan(struct list_head *extension_list)
{
struct extension *cape;
struct am335x_cape_eeprom_id eeprom_header;
@@ -23,6 +23,6 @@ struct am335x_cape_eeprom_id {
#define CAPE_MAGIC 0xEE3355AA
-int extension_board_scan(struct list_head *extension_list);
+int ti_cape_extension_board_scan(struct list_head *extension_list);
#endif /* __CAPE_DETECT_H */
CONFIG_CMD_EXTENSION may be used on other TI boards that may not require Cape detection logic. Add CONFIG_TI_CAPE_DETECT for Cape detection logic so it can be enabled independently. Enable it by default only for platforms that require it. i.e. AM335X Signed-off-by: Roger Quadros <rogerq@kernel.org> --- board/ti/am335x/board.c | 8 ++++++++ board/ti/common/Kconfig | 8 ++++++++ board/ti/common/Makefile | 2 +- board/ti/common/cape_detect.c | 2 +- board/ti/common/cape_detect.h | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-)