dwc: Rewrite clock and reset functions
authorEmmanuel Vadot <manu@FreeBSD.org>
Sat, 23 Sep 2023 16:24:22 +0000 (18:24 +0200)
committerEmmanuel Vadot <manu@FreeBSD.org>
Thu, 5 Oct 2023 15:34:38 +0000 (17:34 +0200)
commit50059a60edec3c8c37e2f7b490fef83ec288b2da
tree53a9e32af712bd1985f4a2cca5b8bb58b3089bc8
parentb69c49d106325a9ceb06ca0d5b827d1dbcc8a54c
dwc: Rewrite clock and reset functions

snps,dwmac have one required clock named stmmaceth and one optional pclk,
correctly handle both in if_dwc, no need to get/enable stmmacseth again
in if_dwc_rk.
It also have one required reset also named stmmaceth and one optional ahb,
correctly handle both.
Rockchip have another optional clock named clk_mac_speed, get it and enable it
if present. Also fix the optional RMII clocks, they were previously wrongly
enabled in RGMII case.
sys/dev/dwc/if_dwc.c
sys/dev/dwc/if_dwc_aw.c
sys/dev/dwc/if_dwc_rk.c
sys/dev/dwc/if_dwc_socfpga.c
sys/dev/dwc/if_dwcvar.h