nmhw21: enable factory test station detection

Check whether an I2C device (EEPROM) is present at address 0xA2/0x51 as
part of the factory test sequence.

BugzID: 54436

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
This commit is contained in:
Rene Straub 2018-11-23 14:58:01 +01:00 committed by Patrick Zysset
parent c67fb07a2a
commit cf3a77fa95
1 changed files with 4 additions and 7 deletions

View File

@ -786,11 +786,10 @@ static void check_jtag_boot(void)
} }
} }
#if 0
static void check_fct(void) static void check_fct(void)
{ {
/* Check whether an I2C device (EEPROM) is present at address 0xA2/0x51 /*
* Check whether an I2C device (EEPROM) is present at address 0xA2/0x51
* In this case we are connected to the factory test station. * In this case we are connected to the factory test station.
* Clear the bootcmd, so that test system can easily connect. * Clear the bootcmd, so that test system can easily connect.
*/ */
@ -802,13 +801,14 @@ static void check_fct(void)
/* If probe fails we are sure no eeprom is connected */ /* If probe fails we are sure no eeprom is connected */
if (i2c_probe(0x51) == 0) { if (i2c_probe(0x51) == 0) {
printf("Entering fct mode\n");
setenv ("bootcmd", ""); setenv ("bootcmd", "");
puts("Detected factory test system. Waiting on command line\n");
} }
i2c_set_bus_num(old_bus); i2c_set_bus_num(old_bus);
} }
#if 0
static bool get_button_state(void) static bool get_button_state(void)
{ {
@ -958,10 +958,7 @@ int board_late_init(void)
set_status_led(0, 1); /* Green */ set_status_led(0, 1); /* Green */
ui_set_top_led(0, 1); ui_set_top_led(0, 1);
/*
check_fct(); check_fct();
*/
check_jtag_boot(); check_jtag_boot();
#endif #endif