/linux-4.4.14/drivers/usb/dwc2/ |
D | core_intr.c | 56 static const char *dwc2_op_state_str(struct dwc2_hsotg *hsotg) in dwc2_op_state_str() argument 58 switch (hsotg->op_state) { in dwc2_op_state_str() 81 static void dwc2_handle_usb_port_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_usb_port_intr() argument 83 u32 hprt0 = dwc2_readl(hsotg->regs + HPRT0); in dwc2_handle_usb_port_intr() 87 dwc2_writel(hprt0, hsotg->regs + HPRT0); in dwc2_handle_usb_port_intr() 91 dwc2_writel(GINTSTS_PRTINT, hsotg->regs + GINTSTS); in dwc2_handle_usb_port_intr() 99 static void dwc2_handle_mode_mismatch_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_mode_mismatch_intr() argument 101 dev_warn(hsotg->dev, "Mode Mismatch Interrupt: currently in %s mode\n", in dwc2_handle_mode_mismatch_intr() 102 dwc2_is_host_mode(hsotg) ? "Host" : "Device"); in dwc2_handle_mode_mismatch_intr() 105 dwc2_writel(GINTSTS_MODEMIS, hsotg->regs + GINTSTS); in dwc2_handle_mode_mismatch_intr() [all …]
|
D | hcd.c | 68 static void dwc2_dump_channel_info(struct dwc2_hsotg *hsotg, in dwc2_dump_channel_info() argument 72 int num_channels = hsotg->core_params->host_channels; in dwc2_dump_channel_info() 83 hcchar = dwc2_readl(hsotg->regs + HCCHAR(chan->hc_num)); in dwc2_dump_channel_info() 84 hcsplt = dwc2_readl(hsotg->regs + HCSPLT(chan->hc_num)); in dwc2_dump_channel_info() 85 hctsiz = dwc2_readl(hsotg->regs + HCTSIZ(chan->hc_num)); in dwc2_dump_channel_info() 86 hc_dma = dwc2_readl(hsotg->regs + HCDMA(chan->hc_num)); in dwc2_dump_channel_info() 88 dev_dbg(hsotg->dev, " Assigned to channel %p:\n", chan); in dwc2_dump_channel_info() 89 dev_dbg(hsotg->dev, " hcchar 0x%08x, hcsplt 0x%08x\n", in dwc2_dump_channel_info() 91 dev_dbg(hsotg->dev, " hctsiz 0x%08x, hc_dma 0x%08x\n", in dwc2_dump_channel_info() 93 dev_dbg(hsotg->dev, " dev_addr: %d, ep_num: %d, ep_is_in: %d\n", in dwc2_dump_channel_info() [all …]
|
D | core.c | 67 static int dwc2_backup_host_registers(struct dwc2_hsotg *hsotg) in dwc2_backup_host_registers() argument 72 dev_dbg(hsotg->dev, "%s\n", __func__); in dwc2_backup_host_registers() 75 hr = &hsotg->hr_backup; in dwc2_backup_host_registers() 76 hr->hcfg = dwc2_readl(hsotg->regs + HCFG); in dwc2_backup_host_registers() 77 hr->haintmsk = dwc2_readl(hsotg->regs + HAINTMSK); in dwc2_backup_host_registers() 78 for (i = 0; i < hsotg->core_params->host_channels; ++i) in dwc2_backup_host_registers() 79 hr->hcintmsk[i] = dwc2_readl(hsotg->regs + HCINTMSK(i)); in dwc2_backup_host_registers() 81 hr->hprt0 = dwc2_read_hprt0(hsotg); in dwc2_backup_host_registers() 82 hr->hfir = dwc2_readl(hsotg->regs + HFIR); in dwc2_backup_host_registers() 95 static int dwc2_restore_host_registers(struct dwc2_hsotg *hsotg) in dwc2_restore_host_registers() argument [all …]
|
D | gadget.c | 63 static inline struct dwc2_hsotg_ep *index_to_ep(struct dwc2_hsotg *hsotg, in index_to_ep() argument 67 return hsotg->eps_in[ep_index]; in index_to_ep() 69 return hsotg->eps_out[ep_index]; in index_to_ep() 73 static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg); 94 static inline bool using_dma(struct dwc2_hsotg *hsotg) in using_dma() argument 96 return hsotg->g_using_dma; in using_dma() 104 static void dwc2_hsotg_en_gsint(struct dwc2_hsotg *hsotg, u32 ints) in dwc2_hsotg_en_gsint() argument 106 u32 gsintmsk = dwc2_readl(hsotg->regs + GINTMSK); in dwc2_hsotg_en_gsint() 112 dev_dbg(hsotg->dev, "gsintmsk now 0x%08x\n", new_gsintmsk); in dwc2_hsotg_en_gsint() 113 dwc2_writel(new_gsintmsk, hsotg->regs + GINTMSK); in dwc2_hsotg_en_gsint() [all …]
|
D | platform.c | 118 static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg) in __dwc2_lowlevel_hw_enable() argument 120 struct platform_device *pdev = to_platform_device(hsotg->dev); in __dwc2_lowlevel_hw_enable() 123 ret = regulator_bulk_enable(ARRAY_SIZE(hsotg->supplies), in __dwc2_lowlevel_hw_enable() 124 hsotg->supplies); in __dwc2_lowlevel_hw_enable() 128 if (hsotg->clk) { in __dwc2_lowlevel_hw_enable() 129 ret = clk_prepare_enable(hsotg->clk); in __dwc2_lowlevel_hw_enable() 134 if (hsotg->uphy) in __dwc2_lowlevel_hw_enable() 135 ret = usb_phy_init(hsotg->uphy); in __dwc2_lowlevel_hw_enable() 136 else if (hsotg->plat && hsotg->plat->phy_init) in __dwc2_lowlevel_hw_enable() 137 ret = hsotg->plat->phy_init(pdev, hsotg->plat->phy_type); in __dwc2_lowlevel_hw_enable() [all …]
|
D | hcd_intr.c | 56 static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg) in dwc2_track_missed_sofs() argument 59 u16 curr_frame_number = hsotg->frame_number; in dwc2_track_missed_sofs() 61 if (hsotg->frame_num_idx < FRAME_NUM_ARRAY_SIZE) { in dwc2_track_missed_sofs() 62 if (((hsotg->last_frame_num + 1) & HFNUM_MAX_FRNUM) != in dwc2_track_missed_sofs() 64 hsotg->frame_num_array[hsotg->frame_num_idx] = in dwc2_track_missed_sofs() 66 hsotg->last_frame_num_array[hsotg->frame_num_idx] = in dwc2_track_missed_sofs() 67 hsotg->last_frame_num; in dwc2_track_missed_sofs() 68 hsotg->frame_num_idx++; in dwc2_track_missed_sofs() 70 } else if (!hsotg->dumped_frame_num_array) { in dwc2_track_missed_sofs() 73 dev_info(hsotg->dev, "Frame Last Frame\n"); in dwc2_track_missed_sofs() [all …]
|
D | hcd_queue.c | 65 static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, in dwc2_qh_init() argument 71 dev_vdbg(hsotg->dev, "%s()\n", __func__); in dwc2_qh_init() 83 dev_speed = dwc2_host_get_speed(hsotg, urb->priv); in dwc2_qh_init() 85 dwc2_host_hub_info(hsotg, urb->priv, &hub_addr, &hub_port); in dwc2_qh_init() 89 dev_vdbg(hsotg->dev, in dwc2_qh_init() 111 hsotg->frame_number = dwc2_hcd_get_frame_number(hsotg); in dwc2_qh_init() 113 qh->sched_frame = dwc2_frame_num_inc(hsotg->frame_number, in dwc2_qh_init() 121 hprt = dwc2_readl(hsotg->regs + HPRT0); in dwc2_qh_init() 130 dev_dbg(hsotg->dev, "interval=%d\n", qh->interval); in dwc2_qh_init() 133 dev_vdbg(hsotg->dev, "DWC OTG HCD QH Initialized\n"); in dwc2_qh_init() [all …]
|
D | hcd_ddma.c | 87 static int dwc2_desc_list_alloc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, in dwc2_desc_list_alloc() argument 90 qh->desc_list = dma_alloc_coherent(hsotg->dev, in dwc2_desc_list_alloc() 103 dma_free_coherent(hsotg->dev, sizeof(struct dwc2_hcd_dma_desc) in dwc2_desc_list_alloc() 113 static void dwc2_desc_list_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_desc_list_free() argument 116 dma_free_coherent(hsotg->dev, sizeof(struct dwc2_hcd_dma_desc) in dwc2_desc_list_free() 126 static int dwc2_frame_list_alloc(struct dwc2_hsotg *hsotg, gfp_t mem_flags) in dwc2_frame_list_alloc() argument 128 if (hsotg->frame_list) in dwc2_frame_list_alloc() 131 hsotg->frame_list = dma_alloc_coherent(hsotg->dev, in dwc2_frame_list_alloc() 133 &hsotg->frame_list_dma, in dwc2_frame_list_alloc() 135 if (!hsotg->frame_list) in dwc2_frame_list_alloc() [all …]
|
D | core.h | 867 extern void dwc2_core_host_init(struct dwc2_hsotg *hsotg); 868 extern int dwc2_enter_hibernation(struct dwc2_hsotg *hsotg); 869 extern int dwc2_exit_hibernation(struct dwc2_hsotg *hsotg, bool restore); 876 extern void dwc2_hc_init(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan); 877 extern void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan, 879 extern void dwc2_hc_cleanup(struct dwc2_hsotg *hsotg, 881 extern void dwc2_hc_start_transfer(struct dwc2_hsotg *hsotg, 883 extern void dwc2_hc_start_transfer_ddma(struct dwc2_hsotg *hsotg, 885 extern int dwc2_hc_continue_transfer(struct dwc2_hsotg *hsotg, 887 extern void dwc2_hc_do_ping(struct dwc2_hsotg *hsotg, [all …]
|
D | hcd.h | 354 struct dwc2_hsotg *hsotg; member 360 static inline struct usb_hcd *dwc2_hsotg_to_hcd(struct dwc2_hsotg *hsotg) in dwc2_hsotg_to_hcd() argument 362 return (struct usb_hcd *)hsotg->priv; in dwc2_hsotg_to_hcd() 372 static inline void disable_hc_int(struct dwc2_hsotg *hsotg, int chnum, u32 intr) in disable_hc_int() argument 374 u32 mask = dwc2_readl(hsotg->regs + HCINTMSK(chnum)); in disable_hc_int() 377 dwc2_writel(mask, hsotg->regs + HCINTMSK(chnum)); in disable_hc_int() 383 static inline int dwc2_is_host_mode(struct dwc2_hsotg *hsotg) in dwc2_is_host_mode() argument 385 return (dwc2_readl(hsotg->regs + GINTSTS) & GINTSTS_CURMODE_HOST) != 0; in dwc2_is_host_mode() 387 static inline int dwc2_is_device_mode(struct dwc2_hsotg *hsotg) in dwc2_is_device_mode() argument 389 return (dwc2_readl(hsotg->regs + GINTSTS) & GINTSTS_CURMODE_HOST) == 0; in dwc2_is_device_mode() [all …]
|
D | debugfs.c | 38 struct dwc2_hsotg *hsotg = s->private; in testmode_write() local 59 spin_lock_irqsave(&hsotg->lock, flags); in testmode_write() 60 dwc2_hsotg_set_test_mode(hsotg, testmode); in testmode_write() 61 spin_unlock_irqrestore(&hsotg->lock, flags); in testmode_write() 74 struct dwc2_hsotg *hsotg = s->private; in testmode_show() local 78 spin_lock_irqsave(&hsotg->lock, flags); in testmode_show() 79 dctl = dwc2_readl(hsotg->regs + DCTL); in testmode_show() 82 spin_unlock_irqrestore(&hsotg->lock, flags); in testmode_show() 135 struct dwc2_hsotg *hsotg = seq->private; in state_show() local 136 void __iomem *regs = hsotg->regs; in state_show() [all …]
|
D | debug.h | 23 static inline int dwc2_debugfs_init(struct dwc2_hsotg *hsotg) in dwc2_debugfs_init() argument 25 static inline void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg) in dwc2_debugfs_exit() argument
|
/linux-4.4.14/Documentation/devicetree/bindings/usb/ |
D | samsung-hsotg.txt | 15 - compatible: "samsung,s3c6400-hsotg" should be used for all currently 31 hsotg@12480000 { 32 compatible = "samsung,s3c6400-hsotg";
|
/linux-4.4.14/arch/arm/boot/dts/ |
D | s5pv210.dtsi | 421 hsotg: hsotg@ec000000 { label 422 compatible = "samsung,s3c6400-hsotg";
|
D | exynos4415.dtsi | 282 hsotg: hsotg@12480000 { label 283 compatible = "samsung,s3c6400-hsotg";
|
D | s5pv210-smdkv210.dts | 183 &hsotg {
|
D | exynos4.dtsi | 337 hsotg: hsotg@12480000 { label 338 compatible = "samsung,s3c6400-hsotg";
|
D | exynos3250.dtsi | 324 hsotg: hsotg@12480000 { label
|
D | s5pv210-aquila.dts | 355 &hsotg {
|
D | s5pv210-goni.dts | 333 &hsotg {
|
D | exynos4210-trats.dts | 262 &hsotg {
|
D | exynos4412-odroid-common.dtsi | 195 &hsotg {
|
D | exynos4210-universal_c210.dts | 283 &hsotg {
|
D | exynos3250-monk.dts | 168 &hsotg {
|
D | exynos3250-rinato.dts | 159 &hsotg {
|
D | exynos4412-trats2.dts | 474 &hsotg {
|
/linux-4.4.14/Documentation/usb/ |
D | gadget_configfs.txt | 211 $ echo s3c-hsotg > UDC
|