realtek: harmonize power functions for RTL8214FC
There are currently two power functions for the RTL8214FC in the driver
- rtl8380_rtl8214fc_on_off(): powers on/off both ports
- rtl8214fc_power_set(): powers on/off fibre or copper individually
While it seems obvious to merge these, one of them uses extended register
29 and the other register 30 to achieve the update. From looking at the
GPL source drops both methods exist with exactly the same operations. So
where to go from here? The descision was made based on:
- register 30 is only used during patching, 29 during normal operation
- Avoid raw page if possible to use function for RTL839x
So the attached patch was created. The result in the power down bits
was compared for the two old and the new implementation. Result is
always the same.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18707
Signed-off-by: Robert Marko <robimarko@gmail.com>