net: dwc_eth_qos: Add support for platform specific reset

This patch adds support for optional platform specific reset logic in
the dwc_eth_qos driver. This new function 'eqos_fix_soc_reset' is called
after the EQOS_DMA_MODE_SWR is set and before the driver waits for this
bit to clear.

Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
This commit is contained in:
Erik Schumacher
2024-10-28 15:29:42 +00:00
committed by Fabio Estevam
parent 1beb665c50
commit 669e628d44
2 changed files with 4 additions and 0 deletions

View File

@@ -712,6 +712,9 @@ static int eqos_start(struct udevice *dev)
*/ */
setbits_le32(&eqos->dma_regs->mode, EQOS_DMA_MODE_SWR); setbits_le32(&eqos->dma_regs->mode, EQOS_DMA_MODE_SWR);
if (eqos->config->ops->eqos_fix_soc_reset)
eqos->config->ops->eqos_fix_soc_reset(dev);
ret = wait_for_bit_le32(&eqos->dma_regs->mode, ret = wait_for_bit_le32(&eqos->dma_regs->mode,
EQOS_DMA_MODE_SWR, false, EQOS_DMA_MODE_SWR, false,
eqos->config->swr_wait, false); eqos->config->swr_wait, false);

View File

@@ -248,6 +248,7 @@ struct eqos_ops {
int (*eqos_set_tx_clk_speed)(struct udevice *dev); int (*eqos_set_tx_clk_speed)(struct udevice *dev);
int (*eqos_get_enetaddr)(struct udevice *dev); int (*eqos_get_enetaddr)(struct udevice *dev);
ulong (*eqos_get_tick_clk_rate)(struct udevice *dev); ulong (*eqos_get_tick_clk_rate)(struct udevice *dev);
void (*eqos_fix_soc_reset)(struct udevice *dev);
}; };
struct eqos_priv { struct eqos_priv {