Commit f8feda8
committed
realtek: pcs: rtl838x: drop redundant reset writes
Sometimes redundancy is so obvious that one likely misses it. Trying to
bring all SerDes setup into a unified shape, one thinks twice if
something is really needed or not.
For the RTL838x case, the single writes for take/release reset were still
an outlier. Looking closer at them one can see that the same bits are all
covered already in deactivate/activate. So before, they have been put
into the desired state but those outlier writes mess with them again.
[0, 3, 0x7146/0x7106] just deals with the SOFT_RST bit that is already
covered by rtpcs_838x_sds_reset.
[0, 0, 0xc00] touches multiple bits, amongst the EN_RX/EN_TX bits
already covered in deactivate/active. Moreover, it potentially forces
other bits into a state causing broken functionality, e.g.
INV_HSI/INV_HSO which deal with the polarity. This has no effect right
no right now but might be a latent issue in the future.
Also move the reset call down to the end of the function, doing a
soft/RX reset after every configuration is done. This is likely what the
SDK also intended, and mirrors the 839x behavior.
Link: openwrt/openwrt#23746
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>1 parent 541d216 commit f8feda8
1 file changed
Lines changed: 1 addition & 7 deletions
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | 893 | | |
898 | | - | |
899 | 894 | | |
900 | 895 | | |
901 | 896 | | |
902 | 897 | | |
903 | 898 | | |
904 | 899 | | |
905 | 900 | | |
906 | | - | |
907 | | - | |
| 901 | + | |
908 | 902 | | |
909 | 903 | | |
910 | 904 | | |
| |||
0 commit comments