This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM65X: Disabling ID EEPROM

Part Number: PROCESSOR-SDK-AM65X


My understanding is that in the EEPROM on the eval board, there are functions to detect the different eval board configurations, which will then change portions of the boot process. Since we are trying to boot from a custom board, these functions are no longer required and our EEPROM will be empty. Where in the 5.3.0.7 SDK should we be commenting out the board detect?

Thanks,

Andrea

  • Hello Andrea,

    As a reference, I have attached a patch file and please let me know if there are any problems.

    Regards,
    Krunal

    diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
    index efa7bed38b..2d21ba6833 100644
    --- a/arch/arm/mach-k3/am6_init.c
    +++ b/arch/arm/mach-k3/am6_init.c
    @@ -158,8 +158,10 @@ void board_init_f(ulong dummy)
     	k3_sysfw_loader_print_ver();
     #endif
     
    +#if 0
     	/* Perform EEPROM-based board detection */
     	do_board_detect();
    +#endif
     
     #if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
     	ret = uclass_get_device(UCLASS_AVS, 0, &dev);
    diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
    index d8f2ad7215..0f4295c3ff 100644
    --- a/board/ti/am65x/evm.c
    +++ b/board/ti/am65x/evm.c
    @@ -94,6 +94,7 @@ int board_fit_config_name_match(const char *name)
     
     int do_board_detect(void)
     {
    +#if 0
     	int ret;
     
     	ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS,
    @@ -101,6 +102,8 @@ int do_board_detect(void)
     	if (ret)
     		pr_err("Reading on-board EEPROM at 0x%02x failed %d\n",
     		       CONFIG_EEPROM_CHIP_ADDRESS, ret);
    +#endif
    +	int ret = 0;
     
     	return ret;
     }
    @@ -108,7 +111,7 @@ int do_board_detect(void)
     static void setup_board_eeprom_env(void)
     {
     	char *name = "am65x";
    -
    +#if 0
     	if (do_board_detect())
     		goto invalid_eeprom;
     
    @@ -117,7 +120,7 @@ static void setup_board_eeprom_env(void)
     	else
     		printf("Unidentified board claims %s in eeprom header\n",
     		       board_ti_get_name());
    -
    +#endif
     invalid_eeprom:
     	set_board_info_env_am6(name);
     }
    @@ -350,7 +353,7 @@ static int probe_daughtercards(void)
     int board_late_init(void)
     {
     	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
    -
    +#if 0
     	setup_board_eeprom_env();
     	setup_serial();
     	k3_set_fastboot_vars();
    @@ -365,7 +368,7 @@ int board_late_init(void)
     
     	/* Check for and probe any plugged-in daughtercards */
     	probe_daughtercards();
    -
    +#endif
     	return 0;
     }
     
    diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
    index d54cba0682..01b04f68d3 100644
    --- a/board/ti/common/board_detect.c
    +++ b/board/ti/common/board_detect.c
    @@ -607,7 +607,7 @@ void __maybe_unused set_board_info_env_am6(char *name)
     		env_set("board_name", ep->name);
     	else
     		env_set("board_name", unknown);
    -
    +#if 0
     	if (ep->version)
     		env_set("board_rev", ep->version);
     	else
    @@ -622,6 +622,7 @@ void __maybe_unused set_board_info_env_am6(char *name)
     		env_set("board_serial", ep->serial);
     	else
     		env_set("board_serial", unknown);
    +#endif
     }
     
     static u64 mac_to_u64(u8 mac[6])