.. | .. |
---|
14 | 14 | #include <linux/module.h> |
---|
15 | 15 | #include <linux/of_device.h> |
---|
16 | 16 | #include <linux/phy/phy.h> |
---|
| 17 | +#include <linux/phy/pcie.h> |
---|
17 | 18 | #include <linux/regmap.h> |
---|
18 | 19 | #include <linux/reset.h> |
---|
19 | 20 | #include <dt-bindings/phy/phy.h> |
---|
.. | .. |
---|
545 | 546 | return 0; |
---|
546 | 547 | } |
---|
547 | 548 | |
---|
548 | | -static int rockchip_combphy_set_mode(struct phy *phy, enum phy_mode mode) |
---|
| 549 | +static int rockchip_combphy_set_mode(struct phy *phy, enum phy_mode mode, int submode) |
---|
549 | 550 | { |
---|
550 | 551 | struct rockchip_combphy_priv *priv = phy_get_drvdata(phy); |
---|
551 | 552 | u32 reg; |
---|
.. | .. |
---|
555 | 556 | |
---|
556 | 557 | reg = readl(priv->mmio + 0x21a8); |
---|
557 | 558 | |
---|
558 | | - if (PHY_MODE_PCIE_EP == mode) |
---|
| 559 | + if (PHY_MODE_PCIE_EP == submode) |
---|
559 | 560 | reg |= (0x1 << 2); |
---|
560 | | - else if (PHY_MODE_PCIE_RC == mode) |
---|
| 561 | + else if (PHY_MODE_PCIE_RC == submode) |
---|
561 | 562 | reg &= ~(0x1 << 2); |
---|
562 | 563 | else |
---|
563 | 564 | return -EINVAL; |
---|