phy: brcm-sata: Correct MDIO operations for 40nm platforms
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 21 Feb 2020 04:14:23 +0000 (20:14 -0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 21 Feb 2020 08:31:47 +0000 (14:01 +0530)
commit0ed41b33882c577e1d6582913163a2f5727765fe
tree611dbf14b9f3990d0a71b8bd2dc11f8e42a85362
parent58aa7729310db04ffcc022c98002dd8fcb486c58
phy: brcm-sata: Correct MDIO operations for 40nm platforms

The logic to write to MDIO registers on 40nm platforms was wrong
because it would use the port number as an offset from the base address
rather than the bank address of the PHY. This is hardly noticeable
because the only programming we do is enabling SSC or not, which is not
really causing an observable functional change.

Correct that mistake by passing down the struct brcm_sata_port structure
down to the brcm_sata_mdio_wr() and brcm_sata_mdio_rd() functions and do
the proper offsetting for 28nm, respectively 40nm platforms from there.
This means that brcm_sata_pcb_base() is now useless and is therefore
removed.

Fixes: c1602a1a0fbe ("phy: phy_brcmstb_sata: add support for MIPS-based platforms")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/broadcom/phy-brcm-sata.c