diff options
author | Felipe Balbi <balbi@ti.com> | 2011-10-12 11:44:56 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 13:48:11 +0400 |
commit | 0949e99b05736946cf0ac78e37194be0807e497e (patch) | |
tree | f3719f4e0b57c49bcd47d6a0c5594e2577192f03 /drivers/usb/dwc3/core.h | |
parent | 9f622b2a407d8b34a5a7f5b4abd8b29b25cf4f32 (diff) | |
download | linux-0949e99b05736946cf0ac78e37194be0807e497e.tar.xz |
usb: dwc3: fetch mode of operation from HW
There's no need to add driver_data for something
we can fetch from HW.
This also makes our id_table unnecessary - at least
for now -, so we also remove it on the same patch.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r-- | drivers/usb/dwc3/core.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 4b6c673ed608..a3ef8f34bf77 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -536,6 +536,15 @@ struct dwc3_hwparams { u32 hwparams8; }; +/* HWPARAMS0 */ +#define DWC3_MODE(n) ((n) & 0x7) + +#define DWC3_MODE_DEVICE 0 +#define DWC3_MODE_HOST 1 +#define DWC3_MODE_DRD 2 +#define DWC3_MODE_HUB 3 + +/* HWPARAMS1 */ #define DWC3_NUM_INT(n) (((n) & (0x3f << 15)) >> 15) /** @@ -560,6 +569,7 @@ struct dwc3_hwparams { * @num_event_buffers: calculated number of event buffers * @maximum_speed: maximum speed requested (mainly for testing purposes) * @revision: revision register contents + * @mode: mode of operation * @is_selfpowered: true when we are selfpowered * @three_stage_setup: set if we perform a three phase setup * @ep0_status_pending: ep0 status response without a req is pending @@ -602,6 +612,7 @@ struct dwc3 { u32 num_event_buffers; u32 maximum_speed; u32 revision; + u32 mode; #define DWC3_REVISION_173A 0x5533173a #define DWC3_REVISION_175A 0x5533175a |