diff options
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r-- | drivers/usb/dwc2/core.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 30bab8463c96..152ac41dfb2d 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h | |||
@@ -859,6 +859,8 @@ struct dwc2_hregs_backup { | |||
859 | * @gadget_enabled: Peripheral mode sub-driver initialization indicator. | 859 | * @gadget_enabled: Peripheral mode sub-driver initialization indicator. |
860 | * @ll_hw_enabled: Status of low-level hardware resources. | 860 | * @ll_hw_enabled: Status of low-level hardware resources. |
861 | * @hibernated: True if core is hibernated | 861 | * @hibernated: True if core is hibernated |
862 | * @reset_phy_on_wake: Quirk saying that we should assert PHY reset on a | ||
863 | * remote wakeup. | ||
862 | * @frame_number: Frame number read from the core. For both device | 864 | * @frame_number: Frame number read from the core. For both device |
863 | * and host modes. The value ranges are from 0 | 865 | * and host modes. The value ranges are from 0 |
864 | * to HFNUM_MAX_FRNUM. | 866 | * to HFNUM_MAX_FRNUM. |
@@ -869,7 +871,6 @@ struct dwc2_hregs_backup { | |||
869 | * removed once all SoCs support usb transceiver. | 871 | * removed once all SoCs support usb transceiver. |
870 | * @supplies: Definition of USB power supplies | 872 | * @supplies: Definition of USB power supplies |
871 | * @vbus_supply: Regulator supplying vbus. | 873 | * @vbus_supply: Regulator supplying vbus. |
872 | * @phyif: PHY interface width | ||
873 | * @lock: Spinlock that protects all the driver data structures | 874 | * @lock: Spinlock that protects all the driver data structures |
874 | * @priv: Stores a pointer to the struct usb_hcd | 875 | * @priv: Stores a pointer to the struct usb_hcd |
875 | * @queuing_high_bandwidth: True if multiple packets of a high-bandwidth | 876 | * @queuing_high_bandwidth: True if multiple packets of a high-bandwidth |
@@ -972,6 +973,7 @@ struct dwc2_hregs_backup { | |||
972 | * @status_buf_dma: DMA address for status_buf | 973 | * @status_buf_dma: DMA address for status_buf |
973 | * @start_work: Delayed work for handling host A-cable connection | 974 | * @start_work: Delayed work for handling host A-cable connection |
974 | * @reset_work: Delayed work for handling a port reset | 975 | * @reset_work: Delayed work for handling a port reset |
976 | * @phy_reset_work: Work structure for doing a PHY reset | ||
975 | * @otg_port: OTG port number | 977 | * @otg_port: OTG port number |
976 | * @frame_list: Frame list | 978 | * @frame_list: Frame list |
977 | * @frame_list_dma: Frame list DMA address | 979 | * @frame_list_dma: Frame list DMA address |
@@ -991,6 +993,7 @@ struct dwc2_hregs_backup { | |||
991 | * @ctrl_buff: Buffer for EP0 control requests. | 993 | * @ctrl_buff: Buffer for EP0 control requests. |
992 | * @ctrl_req: Request for EP0 control packets. | 994 | * @ctrl_req: Request for EP0 control packets. |
993 | * @ep0_state: EP0 control transfers state | 995 | * @ep0_state: EP0 control transfers state |
996 | * @delayed_status: true when gadget driver asks for delayed status | ||
994 | * @test_mode: USB test mode requested by the host | 997 | * @test_mode: USB test mode requested by the host |
995 | * @remote_wakeup_allowed: True if device is allowed to wake-up host by | 998 | * @remote_wakeup_allowed: True if device is allowed to wake-up host by |
996 | * remote-wakeup signalling | 999 | * remote-wakeup signalling |
@@ -1045,6 +1048,7 @@ struct dwc2_hsotg { | |||
1045 | unsigned int gadget_enabled:1; | 1048 | unsigned int gadget_enabled:1; |
1046 | unsigned int ll_hw_enabled:1; | 1049 | unsigned int ll_hw_enabled:1; |
1047 | unsigned int hibernated:1; | 1050 | unsigned int hibernated:1; |
1051 | unsigned int reset_phy_on_wake:1; | ||
1048 | u16 frame_number; | 1052 | u16 frame_number; |
1049 | 1053 | ||
1050 | struct phy *phy; | 1054 | struct phy *phy; |
@@ -1052,7 +1056,6 @@ struct dwc2_hsotg { | |||
1052 | struct dwc2_hsotg_plat *plat; | 1056 | struct dwc2_hsotg_plat *plat; |
1053 | struct regulator_bulk_data supplies[DWC2_NUM_SUPPLIES]; | 1057 | struct regulator_bulk_data supplies[DWC2_NUM_SUPPLIES]; |
1054 | struct regulator *vbus_supply; | 1058 | struct regulator *vbus_supply; |
1055 | u32 phyif; | ||
1056 | 1059 | ||
1057 | spinlock_t lock; | 1060 | spinlock_t lock; |
1058 | void *priv; | 1061 | void *priv; |
@@ -1147,6 +1150,7 @@ struct dwc2_hsotg { | |||
1147 | 1150 | ||
1148 | struct delayed_work start_work; | 1151 | struct delayed_work start_work; |
1149 | struct delayed_work reset_work; | 1152 | struct delayed_work reset_work; |
1153 | struct work_struct phy_reset_work; | ||
1150 | u8 otg_port; | 1154 | u8 otg_port; |
1151 | u32 *frame_list; | 1155 | u32 *frame_list; |
1152 | dma_addr_t frame_list_dma; | 1156 | dma_addr_t frame_list_dma; |
@@ -1172,6 +1176,7 @@ struct dwc2_hsotg { | |||
1172 | void *ep0_buff; | 1176 | void *ep0_buff; |
1173 | void *ctrl_buff; | 1177 | void *ctrl_buff; |
1174 | enum dwc2_ep0_state ep0_state; | 1178 | enum dwc2_ep0_state ep0_state; |
1179 | unsigned delayed_status : 1; | ||
1175 | u8 test_mode; | 1180 | u8 test_mode; |
1176 | 1181 | ||
1177 | dma_addr_t setup_desc_dma[2]; | 1182 | dma_addr_t setup_desc_dma[2]; |
@@ -1283,6 +1288,8 @@ int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore); | |||
1283 | int dwc2_enter_hibernation(struct dwc2_hsotg *hsotg, int is_host); | 1288 | int dwc2_enter_hibernation(struct dwc2_hsotg *hsotg, int is_host); |
1284 | int dwc2_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup, | 1289 | int dwc2_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup, |
1285 | int reset, int is_host); | 1290 | int reset, int is_host); |
1291 | void dwc2_init_fs_ls_pclk_sel(struct dwc2_hsotg *hsotg); | ||
1292 | int dwc2_phy_init(struct dwc2_hsotg *hsotg, bool select_phy); | ||
1286 | 1293 | ||
1287 | void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host); | 1294 | void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host); |
1288 | void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg); | 1295 | void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg); |
@@ -1431,6 +1438,8 @@ int dwc2_restore_host_registers(struct dwc2_hsotg *hsotg); | |||
1431 | int dwc2_host_enter_hibernation(struct dwc2_hsotg *hsotg); | 1438 | int dwc2_host_enter_hibernation(struct dwc2_hsotg *hsotg); |
1432 | int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, | 1439 | int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, |
1433 | int rem_wakeup, int reset); | 1440 | int rem_wakeup, int reset); |
1441 | static inline void dwc2_host_schedule_phy_reset(struct dwc2_hsotg *hsotg) | ||
1442 | { schedule_work(&hsotg->phy_reset_work); } | ||
1434 | #else | 1443 | #else |
1435 | static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) | 1444 | static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) |
1436 | { return 0; } | 1445 | { return 0; } |
@@ -1454,6 +1463,7 @@ static inline int dwc2_host_enter_hibernation(struct dwc2_hsotg *hsotg) | |||
1454 | static inline int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, | 1463 | static inline int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, |
1455 | int rem_wakeup, int reset) | 1464 | int rem_wakeup, int reset) |
1456 | { return 0; } | 1465 | { return 0; } |
1466 | static inline void dwc2_host_schedule_phy_reset(struct dwc2_hsotg *hsotg) {} | ||
1457 | 1467 | ||
1458 | #endif | 1468 | #endif |
1459 | 1469 | ||