diff options
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-miphy28lp.c | 3 | ||||
-rw-r--r-- | drivers/phy/phy-omap-control.c | 7 | ||||
-rw-r--r-- | drivers/phy/phy-sun4i-usb.c | 3 | ||||
-rw-r--r-- | drivers/phy/phy-ti-pipe3.c | 10 |
4 files changed, 13 insertions, 10 deletions
diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c index e34da13885e8..27fa62ce6136 100644 --- a/drivers/phy/phy-miphy28lp.c +++ b/drivers/phy/phy-miphy28lp.c | |||
@@ -1050,7 +1050,8 @@ static int miphy28lp_init(struct phy *phy) | |||
1050 | ret = miphy28lp_init_usb3(miphy_phy); | 1050 | ret = miphy28lp_init_usb3(miphy_phy); |
1051 | break; | 1051 | break; |
1052 | default: | 1052 | default: |
1053 | return -EINVAL; | 1053 | ret = -EINVAL; |
1054 | break; | ||
1054 | } | 1055 | } |
1055 | 1056 | ||
1056 | mutex_unlock(&miphy_dev->miphy_mutex); | 1057 | mutex_unlock(&miphy_dev->miphy_mutex); |
diff --git a/drivers/phy/phy-omap-control.c b/drivers/phy/phy-omap-control.c index c96e8183a8ff..efe724f97e02 100644 --- a/drivers/phy/phy-omap-control.c +++ b/drivers/phy/phy-omap-control.c | |||
@@ -29,10 +29,9 @@ | |||
29 | /** | 29 | /** |
30 | * omap_control_pcie_pcs - set the PCS delay count | 30 | * omap_control_pcie_pcs - set the PCS delay count |
31 | * @dev: the control module device | 31 | * @dev: the control module device |
32 | * @id: index of the pcie PHY (should be 1 or 2) | ||
33 | * @delay: 8 bit delay value | 32 | * @delay: 8 bit delay value |
34 | */ | 33 | */ |
35 | void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) | 34 | void omap_control_pcie_pcs(struct device *dev, u8 delay) |
36 | { | 35 | { |
37 | u32 val; | 36 | u32 val; |
38 | struct omap_control_phy *control_phy; | 37 | struct omap_control_phy *control_phy; |
@@ -55,8 +54,8 @@ void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) | |||
55 | 54 | ||
56 | val = readl(control_phy->pcie_pcs); | 55 | val = readl(control_phy->pcie_pcs); |
57 | val &= ~(OMAP_CTRL_PCIE_PCS_MASK << | 56 | val &= ~(OMAP_CTRL_PCIE_PCS_MASK << |
58 | (id * OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT)); | 57 | OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT); |
59 | val |= delay << (id * OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT); | 58 | val |= (delay << OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT); |
60 | writel(val, control_phy->pcie_pcs); | 59 | writel(val, control_phy->pcie_pcs); |
61 | } | 60 | } |
62 | EXPORT_SYMBOL_GPL(omap_control_pcie_pcs); | 61 | EXPORT_SYMBOL_GPL(omap_control_pcie_pcs); |
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index fb02a67c9181..a2b08f3ccb03 100644 --- a/drivers/phy/phy-sun4i-usb.c +++ b/drivers/phy/phy-sun4i-usb.c | |||
@@ -244,7 +244,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) | |||
244 | else | 244 | else |
245 | data->num_phys = 3; | 245 | data->num_phys = 3; |
246 | 246 | ||
247 | if (of_device_is_compatible(np, "allwinner,sun4i-a10-usb-phy")) | 247 | if (of_device_is_compatible(np, "allwinner,sun4i-a10-usb-phy") || |
248 | of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy")) | ||
248 | data->disc_thresh = 3; | 249 | data->disc_thresh = 3; |
249 | else | 250 | else |
250 | data->disc_thresh = 2; | 251 | data->disc_thresh = 2; |
diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c index 1387b4d4afe3..465de2c800f2 100644 --- a/drivers/phy/phy-ti-pipe3.c +++ b/drivers/phy/phy-ti-pipe3.c | |||
@@ -82,7 +82,6 @@ struct ti_pipe3 { | |||
82 | struct clk *refclk; | 82 | struct clk *refclk; |
83 | struct clk *div_clk; | 83 | struct clk *div_clk; |
84 | struct pipe3_dpll_map *dpll_map; | 84 | struct pipe3_dpll_map *dpll_map; |
85 | u8 id; | ||
86 | }; | 85 | }; |
87 | 86 | ||
88 | static struct pipe3_dpll_map dpll_map_usb[] = { | 87 | static struct pipe3_dpll_map dpll_map_usb[] = { |
@@ -217,8 +216,13 @@ static int ti_pipe3_init(struct phy *x) | |||
217 | u32 val; | 216 | u32 val; |
218 | int ret = 0; | 217 | int ret = 0; |
219 | 218 | ||
219 | /* | ||
220 | * Set pcie_pcs register to 0x96 for proper functioning of phy | ||
221 | * as recommended in AM572x TRM SPRUHZ6, section 18.5.2.2, table | ||
222 | * 18-1804. | ||
223 | */ | ||
220 | if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-pcie")) { | 224 | if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-pcie")) { |
221 | omap_control_pcie_pcs(phy->control_dev, phy->id, 0xF1); | 225 | omap_control_pcie_pcs(phy->control_dev, 0x96); |
222 | return 0; | 226 | return 0; |
223 | } | 227 | } |
224 | 228 | ||
@@ -347,8 +351,6 @@ static int ti_pipe3_probe(struct platform_device *pdev) | |||
347 | } | 351 | } |
348 | 352 | ||
349 | if (of_device_is_compatible(node, "ti,phy-pipe3-pcie")) { | 353 | if (of_device_is_compatible(node, "ti,phy-pipe3-pcie")) { |
350 | if (of_property_read_u8(node, "id", &phy->id) < 0) | ||
351 | phy->id = 1; | ||
352 | 354 | ||
353 | clk = devm_clk_get(phy->dev, "dpll_ref"); | 355 | clk = devm_clk_get(phy->dev, "dpll_ref"); |
354 | if (IS_ERR(clk)) { | 356 | if (IS_ERR(clk)) { |