Stmmac: regression on probing driver

I noticed that after adding hwif.c in 4.17 the initialization of driver is not correct due to incrorrect synopsys_id, because register reading returns 0. The first assert/deassert is done of dwmac-socfpga.c while selelcting phy mode, another assert/deassert is done stmmac_main.c. Does anyone know proper fix for that?

The output of dmesg:

[ 0.829872] socfpga-dwmac ff702000.ethernet: Version ID not available
[ 0.836346] socfpga-dwmac ff702000.ethernet: DWMAC1000
[ 0.841555] socfpga-dwmac ff702000.ethernet: DMA HW capability register supported
[ 0.849094] socfpga-dwmac ff702000.ethernet: RX Checksum Offload Engine supported
[ 0.856570] socfpga-dwmac ff702000.ethernet: COE Type 2
[ 0.861778] socfpga-dwmac ff702000.ethernet: TX Checksum insertion supported
[ 0.868816] socfpga-dwmac ff702000.ethernet: Enhanced/Alternate descriptors
[ 0.875751] socfpga-dwmac ff702000.ethernet: Extended descriptors not supported
[ 0.883046] socfpga-dwmac ff702000.ethernet: Ring mode enabled