Home
last modified time | relevance | path

Searched refs:hsotg (Results 1 – 25 of 36) sorted by relevance

12

/linux/drivers/usb/dwc2/
H A Dplatform.c52 static int dwc2_get_dr_mode(struct dwc2_hsotg *hsotg) in dwc2_get_dr_mode() argument
56 hsotg->dr_mode = usb_get_dr_mode(hsotg->dev); in dwc2_get_dr_mode()
57 if (hsotg->dr_mode == USB_DR_MODE_UNKNOWN) in dwc2_get_dr_mode()
58 hsotg->dr_mode = USB_DR_MODE_OTG; in dwc2_get_dr_mode()
60 mode = hsotg->dr_mode; in dwc2_get_dr_mode()
62 if (dwc2_hw_is_device(hsotg)) { in dwc2_get_dr_mode()
64 dev_err(hsotg->dev, in dwc2_get_dr_mode()
69 } else if (dwc2_hw_is_host(hsotg)) { in dwc2_get_dr_mode()
71 dev_err(hsotg->dev, in dwc2_get_dr_mode()
83 if (mode != hsotg->dr_mode) { in dwc2_get_dr_mode()
[all …]
H A Dhcd.c42 static void dwc2_enable_common_interrupts(struct dwc2_hsotg *hsotg) in dwc2_enable_common_interrupts() argument
47 dwc2_writel(hsotg, 0xffffffff, GOTGINT); in dwc2_enable_common_interrupts()
50 dwc2_writel(hsotg, 0xffffffff, GINTSTS); in dwc2_enable_common_interrupts()
55 if (!hsotg->params.host_dma) in dwc2_enable_common_interrupts()
57 if (!hsotg->params.external_id_pin_ctl) in dwc2_enable_common_interrupts()
63 if (dwc2_is_device_mode(hsotg) && hsotg->params.lpm) in dwc2_enable_common_interrupts()
66 dwc2_writel(hsotg, intmsk, GINTMSK); in dwc2_enable_common_interrupts()
69 static int dwc2_gahbcfg_init(struct dwc2_hsotg *hsotg) in dwc2_gahbcfg_init() argument
71 u32 ahbcfg = dwc2_readl(hsotg, GAHBCFG); in dwc2_gahbcfg_init()
73 switch (hsotg->hw_params.arch) { in dwc2_gahbcfg_init()
[all …]
H A Dgadget.c51 static inline void dwc2_set_bit(struct dwc2_hsotg *hsotg, u32 offset, u32 val) in dwc2_set_bit() argument
53 dwc2_writel(hsotg, dwc2_readl(hsotg, offset) | val, offset); in dwc2_set_bit()
56 static inline void dwc2_clear_bit(struct dwc2_hsotg *hsotg, u32 offset, u32 val) in dwc2_clear_bit() argument
58 dwc2_writel(hsotg, dwc2_readl(hsotg, offset) & ~val, offset); in dwc2_clear_bit()
61 static inline struct dwc2_hsotg_ep *index_to_ep(struct dwc2_hsotg *hsotg, in index_to_ep() argument
65 return hsotg->eps_in[ep_index]; in index_to_ep()
67 return hsotg->eps_out[ep_index]; in index_to_ep()
71 static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg);
92 static inline bool using_dma(struct dwc2_hsotg *hsotg) in using_dma() argument
94 return hsotg->params.g_dma; in using_dma()
[all …]
H A Ddrd.c20 static void dwc2_ovr_init(struct dwc2_hsotg *hsotg) in dwc2_ovr_init() argument
25 spin_lock_irqsave(&hsotg->lock, flags); in dwc2_ovr_init()
27 gotgctl = dwc2_readl(hsotg, GOTGCTL); in dwc2_ovr_init()
30 if (hsotg->role_sw_default_mode == USB_DR_MODE_HOST) in dwc2_ovr_init()
32 else if (hsotg->role_sw_default_mode == USB_DR_MODE_PERIPHERAL) in dwc2_ovr_init()
34 dwc2_writel(hsotg, gotgctl, GOTGCTL); in dwc2_ovr_init()
36 spin_unlock_irqrestore(&hsotg->lock, flags); in dwc2_ovr_init()
38 dwc2_force_mode(hsotg, (hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_ovr_init()
39 (hsotg->role_sw_default_mode == USB_DR_MODE_HOST)); in dwc2_ovr_init()
42 static int dwc2_ovr_avalid(struct dwc2_hsotg *hsotg, bool valid) in dwc2_ovr_avalid() argument
[all …]
H A Dhcd_intr.c33 static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg) in dwc2_track_missed_sofs() argument
35 u16 curr_frame_number = hsotg->frame_number; in dwc2_track_missed_sofs()
36 u16 expected = dwc2_frame_num_inc(hsotg->last_frame_num, 1); in dwc2_track_missed_sofs()
39 dwc2_sch_vdbg(hsotg, "MISSED SOF %04x != %04x\n", in dwc2_track_missed_sofs()
43 if (hsotg->frame_num_idx < FRAME_NUM_ARRAY_SIZE) { in dwc2_track_missed_sofs()
45 hsotg->frame_num_array[hsotg->frame_num_idx] = in dwc2_track_missed_sofs()
47 hsotg->last_frame_num_array[hsotg->frame_num_idx] = in dwc2_track_missed_sofs()
48 hsotg->last_frame_num; in dwc2_track_missed_sofs()
49 hsotg->frame_num_idx++; in dwc2_track_missed_sofs()
51 } else if (!hsotg->dumped_frame_num_array) { in dwc2_track_missed_sofs()
[all …]
H A Dhcd_ddma.c58 static int dwc2_desc_list_alloc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, in dwc2_desc_list_alloc() argument
65 desc_cache = hsotg->desc_hsisoc_cache; in dwc2_desc_list_alloc()
67 desc_cache = hsotg->desc_gen_cache; in dwc2_desc_list_alloc()
76 qh->desc_list_dma = dma_map_single(hsotg->dev, qh->desc_list, in dwc2_desc_list_alloc()
82 dma_unmap_single(hsotg->dev, qh->desc_list_dma, in dwc2_desc_list_alloc()
93 static void dwc2_desc_list_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_desc_list_free() argument
99 desc_cache = hsotg->desc_hsisoc_cache; in dwc2_desc_list_free()
101 desc_cache = hsotg->desc_gen_cache; in dwc2_desc_list_free()
104 dma_unmap_single(hsotg->dev, qh->desc_list_dma, in dwc2_desc_list_free()
114 static int dwc2_frame_list_alloc(struct dwc2_hsotg *hsotg, gfp_t mem_flags) in dwc2_frame_list_alloc() argument
[all …]
H A Dhcd_queue.c43 static int dwc2_periodic_channel_available(struct dwc2_hsotg *hsotg) in dwc2_periodic_channel_available() argument
53 num_channels = hsotg->params.host_channels; in dwc2_periodic_channel_available()
54 if ((hsotg->periodic_channels + hsotg->non_periodic_channels < in dwc2_periodic_channel_available()
55 num_channels) && (hsotg->periodic_channels < num_channels - 1)) { in dwc2_periodic_channel_available()
58 dev_dbg(hsotg->dev, in dwc2_periodic_channel_available()
61 hsotg->periodic_channels, hsotg->non_periodic_channels); in dwc2_periodic_channel_available()
80 static int dwc2_check_periodic_bandwidth(struct dwc2_hsotg *hsotg, in dwc2_check_periodic_bandwidth() argument
102 if (hsotg->periodic_usecs > max_claimed_usecs) { in dwc2_check_periodic_bandwidth()
103 dev_err(hsotg->dev, in dwc2_check_periodic_bandwidth()
105 __func__, hsotg->periodic_usecs, qh->host_us); in dwc2_check_periodic_bandwidth()
[all …]
H A Ddebugfs.c31 struct dwc2_hsotg *hsotg = s->private; in testmode_write() local
52 spin_lock_irqsave(&hsotg->lock, flags); in testmode_write()
53 dwc2_hsotg_set_test_mode(hsotg, testmode); in testmode_write()
54 spin_unlock_irqrestore(&hsotg->lock, flags); in testmode_write()
67 struct dwc2_hsotg *hsotg = s->private; in testmode_show() local
71 spin_lock_irqsave(&hsotg->lock, flags); in testmode_show()
72 dctl = dwc2_readl(hsotg, DCTL); in testmode_show()
75 spin_unlock_irqrestore(&hsotg->lock, flags); in testmode_show()
128 struct dwc2_hsotg *hsotg = seq->private; in state_show() local
132 dwc2_readl(hsotg, DCFG), in state_show()
[all …]
H A Dhcd.h312 struct dwc2_hsotg *hsotg; member
424 struct dwc2_hsotg *hsotg; member
429 u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg);
432 static inline struct usb_hcd *dwc2_hsotg_to_hcd(struct dwc2_hsotg *hsotg) in dwc2_hsotg_to_hcd() argument
434 return (struct usb_hcd *)hsotg->priv; in dwc2_hsotg_to_hcd()
444 static inline void disable_hc_int(struct dwc2_hsotg *hsotg, int chnum, u32 intr) in disable_hc_int() argument
446 u32 mask = dwc2_readl(hsotg, HCINTMSK(chnum)); in disable_hc_int()
449 dwc2_writel(hsotg, mask, HCINTMSK(chnum)); in disable_hc_int()
452 void dwc2_hc_cleanup(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan);
453 void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan,
[all …]
H A Ddebug.h12 int dwc2_debugfs_init(struct dwc2_hsotg *hsotg);
13 void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg);
15 static inline int dwc2_debugfs_init(struct dwc2_hsotg *hsotg) in dwc2_debugfs_init() argument
17 static inline void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg) in dwc2_debugfs_exit() argument
/linux/arch/arm/boot/dts/samsung/
H A Dexynos4412-odroidx.dts109 &hsotg {
H A Dexynos4412-odroidu3.dts131 &hsotg {
H A Ds5pv210-smdkv210.dts198 &hsotg {
H A Dexynos4412-itop-elite.dts172 &hsotg {
H A Ds5pv210.dtsi406 hsotg: usb@ec000000 { label
407 compatible = "samsung,s3c6400-hsotg";
H A Dexynos4210-origen.dts167 &hsotg {
H A Ds5pv210-aquila.dts360 &hsotg {
H A Ds5pv210-goni.dts339 &hsotg {
H A Dexynos3250.dtsi540 hsotg: usb@12480000 { label
541 compatible = "samsung,s3c6400-hsotg";
H A Dexynos4412-itop-scp-core.dtsi127 &hsotg {
H A Dexynos4412-odroid-common.dtsi261 &hsotg {
H A Dexynos4210-trats.dts256 &hsotg {
H A Dexynos4.dtsi364 hsotg: usb@12480000 { label
365 compatible = "samsung,s3c6400-hsotg";
H A Dexynos4210-universal_c210.dts295 &hsotg {
/linux/arch/arm64/boot/dts/intel/
H A Dsocfpga_agilex.dtsi545 compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";
559 compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";

12