diff options
| author | Kishon Vijay Abraham I <kishon@ti.com> | 2014-03-06 09:38:37 -0500 |
|---|---|---|
| committer | Kishon Vijay Abraham I <kishon@ti.com> | 2014-03-09 03:15:08 -0400 |
| commit | 14da699bc04212559d5dda19d3f07c807fb58dfd (patch) | |
| tree | da70074191e90be6fef4ac02bff16dde3ce45721 /include | |
| parent | db68e80f080a21b295f2262976520c40bc505f9d (diff) | |
phy: rename struct omap_control_usb to struct omap_control_phy
Rename struct omap_control_usb to struct omap_control_phy since it can
be used to control PHY of USB, SATA and PCIE. Also move the driver and
include files under *phy* and made the corresponding changes in the users
of phy-omap-control.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/phy/omap_control_phy.h (renamed from include/linux/usb/omap_control_usb.h) | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/phy/omap_control_phy.h index 69ae383ee3cc..5450403c7546 100644 --- a/include/linux/usb/omap_control_usb.h +++ b/include/linux/phy/omap_control_phy.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * omap_control_usb.h - Header file for the USB part of control module. | 2 | * omap_control_phy.h - Header file for the PHY part of control module. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com | 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com |
| 5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
| @@ -16,10 +16,10 @@ | |||
| 16 | * | 16 | * |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #ifndef __OMAP_CONTROL_USB_H__ | 19 | #ifndef __OMAP_CONTROL_PHY_H__ |
| 20 | #define __OMAP_CONTROL_USB_H__ | 20 | #define __OMAP_CONTROL_PHY_H__ |
| 21 | 21 | ||
| 22 | enum omap_control_usb_type { | 22 | enum omap_control_phy_type { |
| 23 | OMAP_CTRL_TYPE_OTGHS = 1, /* Mailbox OTGHS_CONTROL */ | 23 | OMAP_CTRL_TYPE_OTGHS = 1, /* Mailbox OTGHS_CONTROL */ |
| 24 | OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ | 24 | OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ |
| 25 | OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ | 25 | OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ |
| @@ -27,7 +27,7 @@ enum omap_control_usb_type { | |||
| 27 | OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */ | 27 | OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */ |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | struct omap_control_usb { | 30 | struct omap_control_phy { |
| 31 | struct device *dev; | 31 | struct device *dev; |
| 32 | 32 | ||
| 33 | u32 __iomem *otghs_control; | 33 | u32 __iomem *otghs_control; |
| @@ -36,7 +36,7 @@ struct omap_control_usb { | |||
| 36 | 36 | ||
| 37 | struct clk *sys_clk; | 37 | struct clk *sys_clk; |
| 38 | 38 | ||
| 39 | enum omap_control_usb_type type; | 39 | enum omap_control_phy_type type; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | enum omap_control_usb_mode { | 42 | enum omap_control_usb_mode { |
| @@ -54,14 +54,14 @@ enum omap_control_usb_mode { | |||
| 54 | #define OMAP_CTRL_DEV_SESSEND BIT(3) | 54 | #define OMAP_CTRL_DEV_SESSEND BIT(3) |
| 55 | #define OMAP_CTRL_DEV_IDDIG BIT(4) | 55 | #define OMAP_CTRL_DEV_IDDIG BIT(4) |
| 56 | 56 | ||
| 57 | #define OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK 0x003FC000 | 57 | #define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_MASK 0x003FC000 |
| 58 | #define OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT 0xE | 58 | #define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT 0xE |
| 59 | 59 | ||
| 60 | #define OMAP_CTRL_USB_PWRCTL_CLK_FREQ_MASK 0xFFC00000 | 60 | #define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_MASK 0xFFC00000 |
| 61 | #define OMAP_CTRL_USB_PWRCTL_CLK_FREQ_SHIFT 0x16 | 61 | #define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_SHIFT 0x16 |
| 62 | 62 | ||
| 63 | #define OMAP_CTRL_USB3_PHY_TX_RX_POWERON 0x3 | 63 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON 0x3 |
| 64 | #define OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF 0x0 | 64 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 |
| 65 | 65 | ||
| 66 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) | 66 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) |
| 67 | 67 | ||
| @@ -70,13 +70,13 @@ enum omap_control_usb_mode { | |||
| 70 | #define AM437X_CTRL_USB2_OTGVDET_EN BIT(19) | 70 | #define AM437X_CTRL_USB2_OTGVDET_EN BIT(19) |
| 71 | #define AM437X_CTRL_USB2_OTGSESSEND_EN BIT(20) | 71 | #define AM437X_CTRL_USB2_OTGSESSEND_EN BIT(20) |
| 72 | 72 | ||
| 73 | #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB) | 73 | #if IS_ENABLED(CONFIG_OMAP_CONTROL_PHY) |
| 74 | extern void omap_control_usb_phy_power(struct device *dev, int on); | 74 | void omap_control_phy_power(struct device *dev, int on); |
| 75 | extern void omap_control_usb_set_mode(struct device *dev, | 75 | void omap_control_usb_set_mode(struct device *dev, |
| 76 | enum omap_control_usb_mode mode); | 76 | enum omap_control_usb_mode mode); |
| 77 | #else | 77 | #else |
| 78 | 78 | ||
| 79 | static inline void omap_control_usb_phy_power(struct device *dev, int on) | 79 | static inline void omap_control_phy_power(struct device *dev, int on) |
| 80 | { | 80 | { |
| 81 | } | 81 | } |
| 82 | 82 | ||
| @@ -86,4 +86,4 @@ static inline void omap_control_usb_set_mode(struct device *dev, | |||
| 86 | } | 86 | } |
| 87 | #endif | 87 | #endif |
| 88 | 88 | ||
| 89 | #endif /* __OMAP_CONTROL_USB_H__ */ | 89 | #endif /* __OMAP_CONTROL_PHY_H__ */ |
