Skip to content

Commit e170672

Browse files
johnhubbardtorvalds
authored andcommitted
phy: fix build breakage: add PHY_MODE_SATA
Commit 49e5418 ("ata: libahci_platform: comply to PHY framework") uses the PHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git. Also, there is a potentially conflicting (mis-named) PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver. Fix the build by: 1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts: PHY_BERLIN_MODE_SATA. 2) Adding the missing enum, which was going to be added anyway as part of [1]. [1] https://lkml.kernel.org/r/20190108163124.6409-3-miquel.raynal@bootlin.com Fixes: 49e5418 ("ata: libahci_platform: comply to PHY framework") Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Jens Axboe <axboe@kernel.dk> Acked-by: Olof Johansson <olof@lixom.net> Cc: Grzegorz Jaszczyk <jaz@semihalf.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b8c3b89 commit e170672

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/phy/marvell/phy-berlin-sata.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
/* register 0x01 */
3434
#define REF_FREF_SEL_25 BIT(0)
35-
#define PHY_MODE_SATA (0x0 << 5)
35+
#define PHY_BERLIN_MODE_SATA (0x0 << 5)
3636

3737
/* register 0x02 */
3838
#define USE_MAX_PLL_RATE BIT(12)
@@ -102,7 +102,8 @@ static int phy_berlin_sata_power_on(struct phy *phy)
102102

103103
/* set PHY mode and ref freq to 25 MHz */
104104
phy_berlin_sata_reg_setbits(ctrl_reg, priv->phy_base, 0x01,
105-
0x00ff, REF_FREF_SEL_25 | PHY_MODE_SATA);
105+
0x00ff,
106+
REF_FREF_SEL_25 | PHY_BERLIN_MODE_SATA);
106107

107108
/* set PHY up to 6 Gbps */
108109
phy_berlin_sata_reg_setbits(ctrl_reg, priv->phy_base, 0x25,

include/linux/phy/phy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ enum phy_mode {
4242
PHY_MODE_PCIE,
4343
PHY_MODE_ETHERNET,
4444
PHY_MODE_MIPI_DPHY,
45+
PHY_MODE_SATA
4546
};
4647

4748
/**

0 commit comments

Comments
 (0)