Revision 13ea307f799ba76164354325a0c76c11b7b9c494 authored by Camelia Groza on 11 June 2021, 12:28:08 UTC, committed by Priyanka Jain on 17 June 2021, 06:16:11 UTC
Under DM, we rely on u-boot's device tree to provide the correct PHY
addresses. The board_fix_fdt callback is intended to be used for
device tree fixups before relocation. Unfortunately, this isn't an
option when booting from flash since the device tree isn't writable
before relocation.

This patch introduces the CONFIG_T2080RDB_REV_D option to signal that a
board revision D or up is the target. The config option is used to set
the correct Aquantia PHY address in the board's u-boot device tree.

Defconfig files with the option enable explicitly are added for
convenience.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
1 parent 4e21a55
Raw File
eth_internal.h
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * (C) Copyright 2001-2015
 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 * Joe Hershberger, National Instruments
 */

#ifndef __ETH_INTERNAL_H
#define __ETH_INTERNAL_H

/* Do init that is common to driver model and legacy networking */
void eth_common_init(void);

/**
 * eth_env_set_enetaddr_by_index() - set the MAC address environment variable
 *
 * This sets up an environment variable with the given MAC address (@enetaddr).
 * The environment variable to be set is defined by <@base_name><@index>addr.
 * If @index is 0 it is omitted. For common Ethernet this means ethaddr,
 * eth1addr, etc.
 *
 * @base_name:	Base name for variable, typically "eth"
 * @index:	Index of interface being updated (>=0)
 * @enetaddr:	Pointer to MAC address to put into the variable
 * @return 0 if OK, other value on error
 */
int eth_env_set_enetaddr_by_index(const char *base_name, int index,
				 uchar *enetaddr);

int eth_mac_skip(int index);
void eth_current_changed(void);
#ifdef CONFIG_DM_ETH
void eth_set_dev(struct udevice *dev);
#else
void eth_set_dev(struct eth_device *dev);
#endif
void eth_set_current_to_next(void);

#endif
back to top