From e67f325e9cd67562b761e884680c0fec03a6f404 Mon Sep 17 00:00:00 2001 From: Matthew Hagan Date: Tue, 8 Jun 2021 19:59:06 +0100 Subject: net: stmmac: explicitly deassert GMAC_AHB_RESET We are currently assuming that GMAC_AHB_RESET will already be deasserted by the bootloader. However if this has not been done, probing of the GMAC will fail. To remedy this we must ensure GMAC_AHB_RESET has been deasserted prior to probing. v2 changes: - remove NULL condition check for stmmac_ahb_rst in stmmac_main.c - unwrap dev_err() message in stmmac_main.c - add PTR_ERR() around plat->stmmac_ahb_rst in stmmac_platform.c v3 changes: - add error pointer to dev_err() output - add reset_control_assert(stmmac_ahb_rst) in stmmac_dvr_remove - revert PTR_ERR() around plat->stmmac_ahb_rst since this is performed on the returned value of ret by the calling function Signed-off-by: Matthew Hagan Signed-off-by: David S. Miller --- include/linux/stmmac.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/stmmac.h') diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index b10be3385a30..3867980d1447 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -240,6 +240,7 @@ struct plat_stmmacenet_data { unsigned int mult_fact_100ns; s32 ptp_max_adj; struct reset_control *stmmac_rst; + struct reset_control *stmmac_ahb_rst; struct stmmac_axi *axi; int has_gmac4; bool has_sun8i; -- cgit v1.2.3