summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-08-03 13:59:28 +0300
committerMichal Simek <michal.simek@xilinx.com>2020-08-20 10:49:20 +0300
commit9fea3b18d65d412c386319360d641c9c47122ec2 (patch)
treed0e5aa1c50c729644f518c83a7a20d188a9f3e18 /board
parent62b96262b6dad1000b1ed2fec8664c2757585061 (diff)
downloadu-boot-9fea3b18d65d412c386319360d641c9c47122ec2.tar.xz
xilinx: Change logic around zynq_board_read_rom_ethaddr()
There is no reason to build private function when CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET is not defined. There is already weak function which handles default case properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board')
-rw-r--r--board/xilinx/common/board.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 3bca3a25a9..0782d08ee3 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -13,11 +13,10 @@
#include <linux/sizes.h>
#include "board.h"
+#if defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET)
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
{
int ret = -EINVAL;
-
-#if defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET)
struct udevice *dev;
ofnode eeprom;
@@ -37,10 +36,10 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
debug("%s: I2C EEPROM MAC address read failed\n", __func__);
else
debug("%s: I2C EEPROM MAC %pM\n", __func__, ethaddr);
-#endif
return ret;
}
+#endif
#if defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE)
void *board_fdt_blob_setup(void)