]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: stmmac: add support for platform specific reset
authorShenwei Wang <shenwei.wang@nxp.com>
Mon, 3 Apr 2023 22:23:01 +0000 (17:23 -0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Apr 2023 02:01:22 +0000 (19:01 -0700)
commit10739ea3132861b1344264b110ea48d951a0e3b0
tree51784488f0ab04d87e30e2f0069f38bc3f20d237
parent8b0f256530d97f2a2310c4f8336ea2c477c8e6c4
net: stmmac: add support for platform specific reset

This patch adds support for platform-specific reset logic in the
stmmac driver. Some SoCs require a different reset mechanism than
the standard dwmac IP reset. To support these platforms, a new function
pointer 'fix_soc_reset' is added to the plat_stmmacenet_data structure.
The stmmac_reset in hwif.h is modified to call the 'fix_soc_reset'
function if it exists. This enables the driver to use the platform-specific
reset logic when necessary.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230403222302.328262-1-shenwei.wang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/hwif.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
include/linux/stmmac.h