Lines Matching refs:dwc2_hsotg
70 struct dwc2_hsotg;
125 struct dwc2_hsotg *parent;
188 struct dwc2_hsotg;
1036 struct dwc2_hsotg { struct
1205 static inline u32 dwc2_readl(struct dwc2_hsotg *hsotg, u32 offset) in dwc2_readl() argument
1216 static inline void dwc2_writel(struct dwc2_hsotg *hsotg, u32 value, u32 offset) in dwc2_writel()
1228 static inline void dwc2_readl_rep(struct dwc2_hsotg *hsotg, u32 offset, in dwc2_readl_rep()
1241 static inline void dwc2_writel_rep(struct dwc2_hsotg *hsotg, u32 offset, in dwc2_writel_rep()
1272 static inline bool dwc2_is_iot(struct dwc2_hsotg *hsotg) in dwc2_is_iot()
1277 static inline bool dwc2_is_fs_iot(struct dwc2_hsotg *hsotg) in dwc2_is_fs_iot()
1282 static inline bool dwc2_is_hs_iot(struct dwc2_hsotg *hsotg) in dwc2_is_hs_iot()
1291 int dwc2_core_reset(struct dwc2_hsotg *hsotg, bool skip_wait);
1292 int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg);
1293 int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, int rem_wakeup,
1295 int dwc2_enter_hibernation(struct dwc2_hsotg *hsotg, int is_host);
1296 int dwc2_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup,
1298 void dwc2_init_fs_ls_pclk_sel(struct dwc2_hsotg *hsotg);
1299 int dwc2_phy_init(struct dwc2_hsotg *hsotg, bool select_phy);
1301 void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host);
1302 void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg);
1304 bool dwc2_is_controller_alive(struct dwc2_hsotg *hsotg);
1306 int dwc2_check_core_version(struct dwc2_hsotg *hsotg);
1313 void dwc2_read_packet(struct dwc2_hsotg *hsotg, u8 *dest, u16 bytes);
1314 void dwc2_flush_tx_fifo(struct dwc2_hsotg *hsotg, const int num);
1315 void dwc2_flush_rx_fifo(struct dwc2_hsotg *hsotg);
1317 void dwc2_enable_global_interrupts(struct dwc2_hsotg *hcd);
1318 void dwc2_disable_global_interrupts(struct dwc2_hsotg *hcd);
1320 void dwc2_hib_restore_common(struct dwc2_hsotg *hsotg, int rem_wakeup,
1322 int dwc2_backup_global_registers(struct dwc2_hsotg *hsotg);
1323 int dwc2_restore_global_registers(struct dwc2_hsotg *hsotg);
1325 void dwc2_enable_acg(struct dwc2_hsotg *hsotg);
1335 int dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg);
1336 int dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg);
1339 int dwc2_hsotg_wait_bit_set(struct dwc2_hsotg *hs_otg, u32 reg, u32 bit,
1341 int dwc2_hsotg_wait_bit_clear(struct dwc2_hsotg *hs_otg, u32 reg, u32 bit,
1344 int dwc2_get_hwparams(struct dwc2_hsotg *hsotg);
1345 int dwc2_init_params(struct dwc2_hsotg *hsotg);
1355 unsigned int dwc2_op_mode(struct dwc2_hsotg *hsotg);
1356 bool dwc2_hw_is_otg(struct dwc2_hsotg *hsotg);
1357 bool dwc2_hw_is_host(struct dwc2_hsotg *hsotg);
1358 bool dwc2_hw_is_device(struct dwc2_hsotg *hsotg);
1363 static inline int dwc2_is_host_mode(struct dwc2_hsotg *hsotg) in dwc2_is_host_mode()
1368 static inline int dwc2_is_device_mode(struct dwc2_hsotg *hsotg) in dwc2_is_device_mode()
1373 int dwc2_drd_init(struct dwc2_hsotg *hsotg);
1374 void dwc2_drd_suspend(struct dwc2_hsotg *hsotg);
1375 void dwc2_drd_resume(struct dwc2_hsotg *hsotg);
1376 void dwc2_drd_exit(struct dwc2_hsotg *hsotg);
1381 void dwc2_dump_dev_registers(struct dwc2_hsotg *hsotg);
1382 void dwc2_dump_host_registers(struct dwc2_hsotg *hsotg);
1383 void dwc2_dump_global_registers(struct dwc2_hsotg *hsotg);
1388 int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg);
1389 int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2);
1390 int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2);
1391 int dwc2_gadget_init(struct dwc2_hsotg *hsotg);
1392 void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2,
1394 void dwc2_hsotg_core_disconnect(struct dwc2_hsotg *hsotg);
1395 void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg);
1396 void dwc2_hsotg_disconnect(struct dwc2_hsotg *dwc2);
1397 int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, int testmode);
1400 int dwc2_backup_device_registers(struct dwc2_hsotg *hsotg);
1401 int dwc2_restore_device_registers(struct dwc2_hsotg *hsotg, int remote_wakeup);
1402 int dwc2_gadget_enter_hibernation(struct dwc2_hsotg *hsotg);
1403 int dwc2_gadget_exit_hibernation(struct dwc2_hsotg *hsotg,
1405 int dwc2_gadget_enter_partial_power_down(struct dwc2_hsotg *hsotg);
1406 int dwc2_gadget_exit_partial_power_down(struct dwc2_hsotg *hsotg,
1408 void dwc2_gadget_enter_clock_gating(struct dwc2_hsotg *hsotg);
1409 void dwc2_gadget_exit_clock_gating(struct dwc2_hsotg *hsotg,
1411 int dwc2_hsotg_tx_fifo_count(struct dwc2_hsotg *hsotg);
1412 int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg);
1413 int dwc2_hsotg_tx_fifo_average_depth(struct dwc2_hsotg *hsotg);
1414 void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg);
1415 void dwc2_gadget_program_ref_clk(struct dwc2_hsotg *hsotg);
1416 static inline void dwc2_clear_fifo_map(struct dwc2_hsotg *hsotg) in dwc2_clear_fifo_map()
1419 static inline int dwc2_hsotg_remove(struct dwc2_hsotg *dwc2) in dwc2_hsotg_remove()
1421 static inline int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2) in dwc2_hsotg_suspend()
1423 static inline int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2) in dwc2_hsotg_resume()
1425 static inline int dwc2_gadget_init(struct dwc2_hsotg *hsotg) in dwc2_gadget_init()
1427 static inline void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2, in dwc2_hsotg_core_init_disconnected()
1429 static inline void dwc2_hsotg_core_disconnect(struct dwc2_hsotg *hsotg) {} in dwc2_hsotg_core_disconnect()
1430 static inline void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg) {} in dwc2_hsotg_core_connect()
1431 static inline void dwc2_hsotg_disconnect(struct dwc2_hsotg *dwc2) {} in dwc2_hsotg_disconnect()
1432 static inline int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, in dwc2_hsotg_set_test_mode()
1437 static inline int dwc2_backup_device_registers(struct dwc2_hsotg *hsotg) in dwc2_backup_device_registers()
1439 static inline int dwc2_restore_device_registers(struct dwc2_hsotg *hsotg, in dwc2_restore_device_registers()
1442 static inline int dwc2_gadget_enter_hibernation(struct dwc2_hsotg *hsotg) in dwc2_gadget_enter_hibernation()
1444 static inline int dwc2_gadget_exit_hibernation(struct dwc2_hsotg *hsotg, in dwc2_gadget_exit_hibernation()
1447 static inline int dwc2_gadget_enter_partial_power_down(struct dwc2_hsotg *hsotg) in dwc2_gadget_enter_partial_power_down()
1449 static inline int dwc2_gadget_exit_partial_power_down(struct dwc2_hsotg *hsotg, in dwc2_gadget_exit_partial_power_down()
1452 static inline void dwc2_gadget_enter_clock_gating(struct dwc2_hsotg *hsotg) {} in dwc2_gadget_enter_clock_gating()
1453 static inline void dwc2_gadget_exit_clock_gating(struct dwc2_hsotg *hsotg, in dwc2_gadget_exit_clock_gating()
1455 static inline int dwc2_hsotg_tx_fifo_count(struct dwc2_hsotg *hsotg) in dwc2_hsotg_tx_fifo_count()
1457 static inline int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg) in dwc2_hsotg_tx_fifo_total_depth()
1459 static inline int dwc2_hsotg_tx_fifo_average_depth(struct dwc2_hsotg *hsotg) in dwc2_hsotg_tx_fifo_average_depth()
1461 static inline void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg) {} in dwc2_gadget_init_lpm()
1462 static inline void dwc2_gadget_program_ref_clk(struct dwc2_hsotg *hsotg) {} in dwc2_gadget_program_ref_clk()
1463 static inline void dwc2_clear_fifo_map(struct dwc2_hsotg *hsotg) {} in dwc2_clear_fifo_map()
1467 int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg);
1468 int dwc2_hcd_get_future_frame_number(struct dwc2_hsotg *hsotg, int us);
1469 void dwc2_hcd_connect(struct dwc2_hsotg *hsotg);
1470 void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg, bool force);
1471 void dwc2_hcd_start(struct dwc2_hsotg *hsotg);
1472 int dwc2_core_init(struct dwc2_hsotg *hsotg, bool initial_setup);
1473 int dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex);
1474 int dwc2_port_resume(struct dwc2_hsotg *hsotg);
1475 int dwc2_backup_host_registers(struct dwc2_hsotg *hsotg);
1476 int dwc2_restore_host_registers(struct dwc2_hsotg *hsotg);
1477 int dwc2_host_enter_hibernation(struct dwc2_hsotg *hsotg);
1478 int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg,
1480 int dwc2_host_enter_partial_power_down(struct dwc2_hsotg *hsotg);
1481 int dwc2_host_exit_partial_power_down(struct dwc2_hsotg *hsotg,
1483 void dwc2_host_enter_clock_gating(struct dwc2_hsotg *hsotg);
1484 void dwc2_host_exit_clock_gating(struct dwc2_hsotg *hsotg, int rem_wakeup);
1485 bool dwc2_host_can_poweroff_phy(struct dwc2_hsotg *dwc2);
1486 static inline void dwc2_host_schedule_phy_reset(struct dwc2_hsotg *hsotg) in dwc2_host_schedule_phy_reset()
1489 static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) in dwc2_hcd_get_frame_number()
1491 static inline int dwc2_hcd_get_future_frame_number(struct dwc2_hsotg *hsotg, in dwc2_hcd_get_future_frame_number()
1494 static inline void dwc2_hcd_connect(struct dwc2_hsotg *hsotg) {} in dwc2_hcd_connect()
1495 static inline void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg, bool force) {} in dwc2_hcd_disconnect()
1496 static inline void dwc2_hcd_start(struct dwc2_hsotg *hsotg) {} in dwc2_hcd_start()
1497 static inline void dwc2_hcd_remove(struct dwc2_hsotg *hsotg) {} in dwc2_hcd_remove()
1498 static inline int dwc2_core_init(struct dwc2_hsotg *hsotg, bool initial_setup) in dwc2_core_init()
1500 static inline int dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex) in dwc2_port_suspend()
1502 static inline int dwc2_port_resume(struct dwc2_hsotg *hsotg) in dwc2_port_resume()
1504 static inline int dwc2_hcd_init(struct dwc2_hsotg *hsotg) in dwc2_hcd_init()
1506 static inline int dwc2_backup_host_registers(struct dwc2_hsotg *hsotg) in dwc2_backup_host_registers()
1508 static inline int dwc2_restore_host_registers(struct dwc2_hsotg *hsotg) in dwc2_restore_host_registers()
1510 static inline int dwc2_host_enter_hibernation(struct dwc2_hsotg *hsotg) in dwc2_host_enter_hibernation()
1512 static inline int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, in dwc2_host_exit_hibernation()
1515 static inline int dwc2_host_enter_partial_power_down(struct dwc2_hsotg *hsotg) in dwc2_host_enter_partial_power_down()
1517 static inline int dwc2_host_exit_partial_power_down(struct dwc2_hsotg *hsotg, in dwc2_host_exit_partial_power_down()
1520 static inline void dwc2_host_enter_clock_gating(struct dwc2_hsotg *hsotg) {} in dwc2_host_enter_clock_gating()
1521 static inline void dwc2_host_exit_clock_gating(struct dwc2_hsotg *hsotg, in dwc2_host_exit_clock_gating()
1523 static inline bool dwc2_host_can_poweroff_phy(struct dwc2_hsotg *dwc2) in dwc2_host_can_poweroff_phy()
1525 static inline void dwc2_host_schedule_phy_reset(struct dwc2_hsotg *hsotg) {} in dwc2_host_schedule_phy_reset()