net: stmmac: overwrite the dma_cap.addr64 according to HW design
authorFugang Duan <fugang.duan@nxp.com>
Mon, 7 Dec 2020 10:51:41 +0000 (18:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Dec 2020 22:52:29 +0000 (14:52 -0800)
commitf119cc9818eb33b66e977ad3af75aef6500bbdc3
tree74b97bd3de0117393a6affbe557eb7c78f9e5ca7
parent5f58591323bf3f342920179f24515935c4b5fd60
net: stmmac: overwrite the dma_cap.addr64 according to HW design

The current IP register MAC_HW_Feature1[ADDR64] only defines
32/40/64 bit width, but some SOCs support others like i.MX8MP
support 34 bits but it maps to 40 bits width in MAC_HW_Feature1[ADDR64].
So overwrite dma_cap.addr64 according to HW real design.

Fixes: 94abdad6974a ("net: ethernet: dwmac: add ethernet glue logic for NXP imx8 chip")
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
include/linux/stmmac.h