diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2016-10-14 10:35:25 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-11-21 13:59:25 -0500 |
commit | 140d76a9ee22472bd3f8fc8066421219f45aa7c3 (patch) | |
tree | 43e9a7f6fd6f81b033af31b9144740547359e307 /board/ti/am43xx/board.c | |
parent | b64a7cb92dcf6e0047fb524c08c90d5894ba4e39 (diff) | |
download | u-boot-imx-140d76a9ee22472bd3f8fc8066421219f45aa7c3.zip u-boot-imx-140d76a9ee22472bd3f8fc8066421219f45aa7c3.tar.gz u-boot-imx-140d76a9ee22472bd3f8fc8066421219f45aa7c3.tar.bz2 |
board: ti: amx3xx: Remove multiple EEPROM reads
Detect the board very early and avoid reading eeprom multiple times.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/ti/am43xx/board.c')
-rw-r--r-- | board/ti/am43xx/board.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index f04a06e..ba6f88f 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -39,10 +39,13 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; /* * Read header information from EEPROM into global structure. */ -static inline int __maybe_unused read_eeprom(void) +#ifdef CONFIG_TI_I2C_BOARD_DETECT +void do_board_detect(void) { - return ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR); + if (ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR)) + printf("ti_i2c_eeprom_init failed\n"); } +#endif #ifndef CONFIG_SKIP_LOWLEVEL_INIT @@ -337,9 +340,6 @@ const struct dpll_params *get_dpll_ddr_params(void) { int ind = get_sys_clk_index(); - if (read_eeprom() < 0) - return NULL; - if (board_is_eposevm()) return &epos_evm_dpll_ddr[ind]; else if (board_is_evm() || board_is_sk()) @@ -495,9 +495,6 @@ void scale_vcores(void) { const struct dpll_params *mpu_params; - if (read_eeprom() < 0) - puts("Could not get board ID.\n"); - /* Ensure I2C is initialized for PMIC configuration */ gpi2c_init(); @@ -537,8 +534,6 @@ static void enable_vtt_regulator(void) void sdram_init(void) { - if (read_eeprom() < 0) - return; /* * EPOS EVM has 1GB LPDDR2 connected to EMIF. * GP EMV has 1GB DDR3 connected to EMIF |