diff options
-rw-r--r-- | Documentation/devicetree/bindings/phy/phy-miphy365x.txt | 8 | ||||
-rw-r--r-- | arch/arm/boot/dts/stih416.dtsi | 4 | ||||
-rw-r--r-- | drivers/phy/phy-miphy365x.c | 14 | ||||
-rw-r--r-- | include/dt-bindings/phy/phy-miphy365x.h | 14 |
4 files changed, 13 insertions, 27 deletions
diff --git a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt index 9802d5d911aa..8772900e056a 100644 --- a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt +++ b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt | |||
@@ -20,8 +20,8 @@ Required nodes : A sub-node is required for each channel the controller | |||
20 | Required properties (port (child) node): | 20 | Required properties (port (child) node): |
21 | - #phy-cells : Should be 1 (See second example) | 21 | - #phy-cells : Should be 1 (See second example) |
22 | Cell after port phandle is device type from: | 22 | Cell after port phandle is device type from: |
23 | - MIPHY_TYPE_SATA | 23 | - PHY_TYPE_SATA |
24 | - MIPHY_TYPE_PCI | 24 | - PHY_TYPE_PCI |
25 | - reg : Address and length of register sets for each device in | 25 | - reg : Address and length of register sets for each device in |
26 | "reg-names" | 26 | "reg-names" |
27 | - reg-names : The names of the register addresses corresponding to the | 27 | - reg-names : The names of the register addresses corresponding to the |
@@ -68,10 +68,10 @@ property, containing a phandle to the phy port node and a device type. | |||
68 | 68 | ||
69 | Example: | 69 | Example: |
70 | 70 | ||
71 | #include <dt-bindings/phy/phy-miphy365x.h> | 71 | #include <dt-bindings/phy/phy.h> |
72 | 72 | ||
73 | sata0: sata@fe380000 { | 73 | sata0: sata@fe380000 { |
74 | ... | 74 | ... |
75 | phys = <&phy_port0 MIPHY_TYPE_SATA>; | 75 | phys = <&phy_port0 PHY_TYPE_SATA>; |
76 | ... | 76 | ... |
77 | }; | 77 | }; |
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi index ea28ebadab1a..eeb7afecbbe6 100644 --- a/arch/arm/boot/dts/stih416.dtsi +++ b/arch/arm/boot/dts/stih416.dtsi | |||
@@ -10,7 +10,7 @@ | |||
10 | #include "stih416-clock.dtsi" | 10 | #include "stih416-clock.dtsi" |
11 | #include "stih416-pinctrl.dtsi" | 11 | #include "stih416-pinctrl.dtsi" |
12 | 12 | ||
13 | #include <dt-bindings/phy/phy-miphy365x.h> | 13 | #include <dt-bindings/phy/phy.h> |
14 | #include <dt-bindings/interrupt-controller/arm-gic.h> | 14 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
15 | #include <dt-bindings/reset-controller/stih416-resets.h> | 15 | #include <dt-bindings/reset-controller/stih416-resets.h> |
16 | / { | 16 | / { |
@@ -306,7 +306,7 @@ | |||
306 | reg = <0xfe380000 0x1000>; | 306 | reg = <0xfe380000 0x1000>; |
307 | interrupts = <GIC_SPI 157 IRQ_TYPE_NONE>; | 307 | interrupts = <GIC_SPI 157 IRQ_TYPE_NONE>; |
308 | interrupt-names = "hostc"; | 308 | interrupt-names = "hostc"; |
309 | phys = <&phy_port0 MIPHY_TYPE_SATA>; | 309 | phys = <&phy_port0 PHY_TYPE_SATA>; |
310 | phy-names = "sata-phy"; | 310 | phy-names = "sata-phy"; |
311 | resets = <&powerdown STIH416_SATA0_POWERDOWN>, | 311 | resets = <&powerdown STIH416_SATA0_POWERDOWN>, |
312 | <&softreset STIH416_SATA0_SOFTRESET>; | 312 | <&softreset STIH416_SATA0_SOFTRESET>; |
diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c index 6c80154e8bff..98bffbc0f74d 100644 --- a/drivers/phy/phy-miphy365x.c +++ b/drivers/phy/phy-miphy365x.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/mfd/syscon.h> | 25 | #include <linux/mfd/syscon.h> |
26 | #include <linux/regmap.h> | 26 | #include <linux/regmap.h> |
27 | 27 | ||
28 | #include <dt-bindings/phy/phy-miphy365x.h> | 28 | #include <dt-bindings/phy/phy.h> |
29 | 29 | ||
30 | #define HFC_TIMEOUT 100 | 30 | #define HFC_TIMEOUT 100 |
31 | 31 | ||
@@ -176,7 +176,7 @@ static u8 rx_tx_spd[] = { | |||
176 | static int miphy365x_set_path(struct miphy365x_phy *miphy_phy, | 176 | static int miphy365x_set_path(struct miphy365x_phy *miphy_phy, |
177 | struct miphy365x_dev *miphy_dev) | 177 | struct miphy365x_dev *miphy_dev) |
178 | { | 178 | { |
179 | bool sata = (miphy_phy->type == MIPHY_TYPE_SATA); | 179 | bool sata = (miphy_phy->type == PHY_TYPE_SATA); |
180 | 180 | ||
181 | return regmap_update_bits(miphy_dev->regmap, | 181 | return regmap_update_bits(miphy_dev->regmap, |
182 | miphy_phy->ctrlreg, | 182 | miphy_phy->ctrlreg, |
@@ -430,7 +430,7 @@ static int miphy365x_init(struct phy *phy) | |||
430 | } | 430 | } |
431 | 431 | ||
432 | /* Initialise Miphy for PCIe or SATA */ | 432 | /* Initialise Miphy for PCIe or SATA */ |
433 | if (miphy_phy->type == MIPHY_TYPE_PCIE) | 433 | if (miphy_phy->type == PHY_TYPE_PCIE) |
434 | ret = miphy365x_init_pcie_port(miphy_phy, miphy_dev); | 434 | ret = miphy365x_init_pcie_port(miphy_phy, miphy_dev); |
435 | else | 435 | else |
436 | ret = miphy365x_init_sata_port(miphy_phy, miphy_dev); | 436 | ret = miphy365x_init_sata_port(miphy_phy, miphy_dev); |
@@ -454,8 +454,8 @@ int miphy365x_get_addr(struct device *dev, struct miphy365x_phy *miphy_phy, | |||
454 | return ret; | 454 | return ret; |
455 | } | 455 | } |
456 | 456 | ||
457 | if (!((!strncmp(name, "sata", 4) && type == MIPHY_TYPE_SATA) || | 457 | if (!((!strncmp(name, "sata", 4) && type == PHY_TYPE_SATA) || |
458 | (!strncmp(name, "pcie", 4) && type == MIPHY_TYPE_PCIE))) | 458 | (!strncmp(name, "pcie", 4) && type == PHY_TYPE_PCIE))) |
459 | return 0; | 459 | return 0; |
460 | 460 | ||
461 | miphy_phy->base = of_iomap(phynode, index); | 461 | miphy_phy->base = of_iomap(phynode, index); |
@@ -498,8 +498,8 @@ static struct phy *miphy365x_xlate(struct device *dev, | |||
498 | 498 | ||
499 | miphy_phy->type = args->args[0]; | 499 | miphy_phy->type = args->args[0]; |
500 | 500 | ||
501 | if (!(miphy_phy->type == MIPHY_TYPE_SATA || | 501 | if (!(miphy_phy->type == PHY_TYPE_SATA || |
502 | miphy_phy->type == MIPHY_TYPE_PCIE)) { | 502 | miphy_phy->type == PHY_TYPE_PCIE)) { |
503 | dev_err(dev, "Unsupported device type: %d\n", miphy_phy->type); | 503 | dev_err(dev, "Unsupported device type: %d\n", miphy_phy->type); |
504 | return ERR_PTR(-EINVAL); | 504 | return ERR_PTR(-EINVAL); |
505 | } | 505 | } |
diff --git a/include/dt-bindings/phy/phy-miphy365x.h b/include/dt-bindings/phy/phy-miphy365x.h deleted file mode 100644 index 8ef8aba6edd6..000000000000 --- a/include/dt-bindings/phy/phy-miphy365x.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * This header provides constants for the phy framework | ||
3 | * based on the STMicroelectronics MiPHY365x. | ||
4 | * | ||
5 | * Author: Lee Jones <lee.jones@linaro.org> | ||
6 | */ | ||
7 | #ifndef _DT_BINDINGS_PHY_MIPHY | ||
8 | #define _DT_BINDINGS_PHY_MIPHY | ||
9 | |||
10 | #define MIPHY_TYPE_SATA 1 | ||
11 | #define MIPHY_TYPE_PCIE 2 | ||
12 | #define MIPHY_TYPE_USB 3 | ||
13 | |||
14 | #endif /* _DT_BINDINGS_PHY_MIPHY */ | ||