~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to include/linux/usb/omap_control_usb.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef __OMAP_CONTROL_USB_H__
20
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
29
struct omap_control_usb {
23
30
        struct device *dev;
24
31
 
25
 
        u32 __iomem *dev_conf;
26
32
        u32 __iomem *otghs_control;
27
 
        u32 __iomem *phy_power;
 
33
        u32 __iomem *power;
 
34
        u32 __iomem *power_aux;
28
35
 
29
36
        struct clk *sys_clk;
30
37
 
31
 
        u32 type;
32
 
};
33
 
 
34
 
struct omap_control_usb_platform_data {
35
 
        u8 type;
 
38
        enum omap_control_usb_type type;
36
39
};
37
40
 
38
41
enum omap_control_usb_mode {
42
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
48
#define OMAP_CTRL_DEV_PHY_PD            BIT(0)
50
49
 
51
50
#define OMAP_CTRL_DEV_AVALID            BIT(0)
63
62
#define OMAP_CTRL_USB3_PHY_TX_RX_POWERON        0x3
64
63
#define OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF       0x0
65
64
 
 
65
#define OMAP_CTRL_USB2_PHY_PD           BIT(28)
 
66
 
66
67
#if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
67
 
extern struct device *omap_get_control_dev(void);
68
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
69
extern void omap_control_usb_set_mode(struct device *dev,
71
70
        enum omap_control_usb_mode mode);
72
71
#else
73
 
static inline struct device *omap_get_control_dev(void)
74
 
{
75
 
        return ERR_PTR(-ENODEV);
76
 
}
77
72
 
78
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
77
static inline void omap_control_usb_set_mode(struct device *dev,
87
78
        enum omap_control_usb_mode mode)
88
79
{