diff options
| author | Michal Marek <mmarek@suse.cz> | 2014-01-02 08:02:06 -0500 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2014-01-02 08:02:06 -0500 |
| commit | 37e2c2a775fc887acd1432908478dfd532f7f00f (patch) | |
| tree | e51ebc699d8e262fd47e0913be6a711cb1a7b565 /include/linux/usb/omap_control_usb.h | |
| parent | 1c8ddae09f4c102b97c9086cc70347e89468a547 (diff) | |
| parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) | |
Merge commit v3.13-rc1 into kbuild/misc
Diffstat (limited to 'include/linux/usb/omap_control_usb.h')
| -rw-r--r-- | include/linux/usb/omap_control_usb.h | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h index 27b5b8c931b0..596b01918813 100644 --- a/include/linux/usb/omap_control_usb.h +++ b/include/linux/usb/omap_control_usb.h | |||
| @@ -19,20 +19,23 @@ | |||
| 19 | #ifndef __OMAP_CONTROL_USB_H__ | 19 | #ifndef __OMAP_CONTROL_USB_H__ |
| 20 | #define __OMAP_CONTROL_USB_H__ | 20 | #define __OMAP_CONTROL_USB_H__ |
| 21 | 21 | ||
| 22 | enum omap_control_usb_type { | ||
| 23 | OMAP_CTRL_TYPE_OTGHS = 1, /* Mailbox OTGHS_CONTROL */ | ||
| 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 */ | ||
| 26 | OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */ | ||
| 27 | }; | ||
| 28 | |||
| 22 | struct omap_control_usb { | 29 | struct omap_control_usb { |
| 23 | struct device *dev; | 30 | struct device *dev; |
| 24 | 31 | ||
| 25 | u32 __iomem *dev_conf; | ||
| 26 | u32 __iomem *otghs_control; | 32 | u32 __iomem *otghs_control; |
| 27 | u32 __iomem *phy_power; | 33 | u32 __iomem *power; |
| 34 | u32 __iomem *power_aux; | ||
| 28 | 35 | ||
| 29 | struct clk *sys_clk; | 36 | struct clk *sys_clk; |
| 30 | 37 | ||
| 31 | u32 type; | 38 | enum omap_control_usb_type type; |
| 32 | }; | ||
| 33 | |||
| 34 | struct omap_control_usb_platform_data { | ||
| 35 | u8 type; | ||
| 36 | }; | 39 | }; |
| 37 | 40 | ||
| 38 | enum omap_control_usb_mode { | 41 | enum omap_control_usb_mode { |
| @@ -42,10 +45,6 @@ enum omap_control_usb_mode { | |||
| 42 | USB_MODE_DISCONNECT, | 45 | USB_MODE_DISCONNECT, |
| 43 | }; | 46 | }; |
| 44 | 47 | ||
| 45 | /* To differentiate ctrl module IP having either mailbox or USB3 PHY power */ | ||
| 46 | #define OMAP_CTRL_DEV_TYPE1 0x1 | ||
| 47 | #define OMAP_CTRL_DEV_TYPE2 0x2 | ||
| 48 | |||
| 49 | #define OMAP_CTRL_DEV_PHY_PD BIT(0) | 48 | #define OMAP_CTRL_DEV_PHY_PD BIT(0) |
| 50 | 49 | ||
| 51 | #define OMAP_CTRL_DEV_AVALID BIT(0) | 50 | #define OMAP_CTRL_DEV_AVALID BIT(0) |
| @@ -63,26 +62,18 @@ enum omap_control_usb_mode { | |||
| 63 | #define OMAP_CTRL_USB3_PHY_TX_RX_POWERON 0x3 | 62 | #define OMAP_CTRL_USB3_PHY_TX_RX_POWERON 0x3 |
| 64 | #define OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF 0x0 | 63 | #define OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF 0x0 |
| 65 | 64 | ||
| 65 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) | ||
| 66 | |||
| 66 | #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB) | 67 | #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB) |
| 67 | extern struct device *omap_get_control_dev(void); | ||
| 68 | extern void omap_control_usb_phy_power(struct device *dev, int on); | 68 | extern void omap_control_usb_phy_power(struct device *dev, int on); |
| 69 | extern void omap_control_usb3_phy_power(struct device *dev, bool on); | ||
| 70 | extern void omap_control_usb_set_mode(struct device *dev, | 69 | extern void omap_control_usb_set_mode(struct device *dev, |
| 71 | enum omap_control_usb_mode mode); | 70 | enum omap_control_usb_mode mode); |
| 72 | #else | 71 | #else |
| 73 | static inline struct device *omap_get_control_dev(void) | ||
| 74 | { | ||
| 75 | return ERR_PTR(-ENODEV); | ||
| 76 | } | ||
| 77 | 72 | ||
| 78 | static inline void omap_control_usb_phy_power(struct device *dev, int on) | 73 | static inline void omap_control_usb_phy_power(struct device *dev, int on) |
| 79 | { | 74 | { |
| 80 | } | 75 | } |
| 81 | 76 | ||
| 82 | static inline void omap_control_usb3_phy_power(struct device *dev, int on) | ||
| 83 | { | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline void omap_control_usb_set_mode(struct device *dev, | 77 | static inline void omap_control_usb_set_mode(struct device *dev, |
| 87 | enum omap_control_usb_mode mode) | 78 | enum omap_control_usb_mode mode) |
| 88 | { | 79 | { |
