Unverified Commit b5e44179 authored by Jim Quinlan's avatar Jim Quinlan Committed by Krzysztof Wilczyński
Browse files

PCI: brcmstb: Do not assume that register field starts at LSB



When setting the LNKCAP and LNKCTL2 register fields, it was assumed
that the field started at the LSB of the register.

Although the masks do indeed start at the LSB, and this will probably
not change, it is prudent to use a method that makes no assumption
about the mask's placement in the register.

Thus, use the u{16,32}p_replace_bits() helpers since they are already
wildly used in this driver.

Signed-off-by: default avatarJim Quinlan <james.quinlan@broadcom.com>
Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250214173944.47506-4-james.quinlan@broadcom.com


[kwilczynski: commit log]
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
parent 0c97321e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment