]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: zynq: Enable early eeprom decoding
authorMichal Simek <michal.simek@amd.com>
Tue, 27 Sep 2022 07:55:46 +0000 (09:55 +0200)
committerMichal Simek <michal.simek@amd.com>
Wed, 5 Oct 2022 06:43:53 +0000 (08:43 +0200)
Xilinx Zynq evaluation boards have factory program content in eeprom.
Enable reading and decoding eeprom content to get information about board
name, revision and especially getting ethernet mac address.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/db334bd3c0a377074a43b7ae479fade98efb545f.1664265344.git.michal.simek@amd.com
board/xilinx/zynq/board.c

index c96433be693bf6a45103af8d5f12a42d4cbaae15..17ee541bd840f10c841539718c3b731c9e7fce8d 100644 (file)
@@ -37,6 +37,9 @@ int board_init(void)
        if (IS_ENABLED(CONFIG_SPL_BUILD))
                printf("Silicon version:\t%d\n", zynq_get_silicon_version());
 
+       if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))
+               xilinx_read_eeprom();
+
        return 0;
 }