Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/drivers/usb/dwc2/
Dcore_intr.c57 static const char *dwc2_op_state_str(struct dwc2_hsotg *hsotg) in dwc2_op_state_str() argument
59 switch (hsotg->op_state) { in dwc2_op_state_str()
82 static void dwc2_handle_usb_port_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_usb_port_intr() argument
84 u32 hprt0 = dwc2_readl(hsotg, HPRT0); in dwc2_handle_usb_port_intr()
88 dwc2_writel(hsotg, hprt0, HPRT0); in dwc2_handle_usb_port_intr()
97 static void dwc2_handle_mode_mismatch_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_mode_mismatch_intr() argument
100 dwc2_writel(hsotg, GINTSTS_MODEMIS, GINTSTS); in dwc2_handle_mode_mismatch_intr()
102 dev_warn(hsotg->dev, "Mode Mismatch Interrupt: currently in %s mode\n", in dwc2_handle_mode_mismatch_intr()
103 dwc2_is_host_mode(hsotg) ? "Host" : "Device"); in dwc2_handle_mode_mismatch_intr()
112 static void dwc2_handle_otg_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_otg_intr() argument
[all …]
Dcore.c67 int dwc2_backup_global_registers(struct dwc2_hsotg *hsotg) in dwc2_backup_global_registers() argument
71 dev_dbg(hsotg->dev, "%s\n", __func__); in dwc2_backup_global_registers()
74 gr = &hsotg->gr_backup; in dwc2_backup_global_registers()
76 gr->gotgctl = dwc2_readl(hsotg, GOTGCTL); in dwc2_backup_global_registers()
77 gr->gintmsk = dwc2_readl(hsotg, GINTMSK); in dwc2_backup_global_registers()
78 gr->gahbcfg = dwc2_readl(hsotg, GAHBCFG); in dwc2_backup_global_registers()
79 gr->gusbcfg = dwc2_readl(hsotg, GUSBCFG); in dwc2_backup_global_registers()
80 gr->grxfsiz = dwc2_readl(hsotg, GRXFSIZ); in dwc2_backup_global_registers()
81 gr->gnptxfsiz = dwc2_readl(hsotg, GNPTXFSIZ); in dwc2_backup_global_registers()
82 gr->gdfifocfg = dwc2_readl(hsotg, GDFIFOCFG); in dwc2_backup_global_registers()
[all …]
Dplatform.c82 static int dwc2_get_dr_mode(struct dwc2_hsotg *hsotg) in dwc2_get_dr_mode() argument
86 hsotg->dr_mode = usb_get_dr_mode(hsotg->dev); in dwc2_get_dr_mode()
87 if (hsotg->dr_mode == USB_DR_MODE_UNKNOWN) in dwc2_get_dr_mode()
88 hsotg->dr_mode = USB_DR_MODE_OTG; in dwc2_get_dr_mode()
90 mode = hsotg->dr_mode; in dwc2_get_dr_mode()
92 if (dwc2_hw_is_device(hsotg)) { in dwc2_get_dr_mode()
94 dev_err(hsotg->dev, in dwc2_get_dr_mode()
99 } else if (dwc2_hw_is_host(hsotg)) { in dwc2_get_dr_mode()
101 dev_err(hsotg->dev, in dwc2_get_dr_mode()
113 if (mode != hsotg->dr_mode) { in dwc2_get_dr_mode()
[all …]
Dhcd.c59 static void dwc2_port_resume(struct dwc2_hsotg *hsotg);
73 static void dwc2_enable_common_interrupts(struct dwc2_hsotg *hsotg) in dwc2_enable_common_interrupts() argument
78 dwc2_writel(hsotg, 0xffffffff, GOTGINT); in dwc2_enable_common_interrupts()
81 dwc2_writel(hsotg, 0xffffffff, GINTSTS); in dwc2_enable_common_interrupts()
86 if (!hsotg->params.host_dma) in dwc2_enable_common_interrupts()
88 if (!hsotg->params.external_id_pin_ctl) in dwc2_enable_common_interrupts()
94 if (dwc2_is_device_mode(hsotg) && hsotg->params.lpm) in dwc2_enable_common_interrupts()
97 dwc2_writel(hsotg, intmsk, GINTMSK); in dwc2_enable_common_interrupts()
100 static int dwc2_gahbcfg_init(struct dwc2_hsotg *hsotg) in dwc2_gahbcfg_init() argument
102 u32 ahbcfg = dwc2_readl(hsotg, GAHBCFG); in dwc2_gahbcfg_init()
[all …]
Dgadget.c52 static inline void dwc2_set_bit(struct dwc2_hsotg *hsotg, u32 offset, u32 val) in dwc2_set_bit() argument
54 dwc2_writel(hsotg, dwc2_readl(hsotg, offset) | val, offset); in dwc2_set_bit()
57 static inline void dwc2_clear_bit(struct dwc2_hsotg *hsotg, u32 offset, u32 val) in dwc2_clear_bit() argument
59 dwc2_writel(hsotg, dwc2_readl(hsotg, offset) & ~val, offset); in dwc2_clear_bit()
62 static inline struct dwc2_hsotg_ep *index_to_ep(struct dwc2_hsotg *hsotg, in index_to_ep() argument
66 return hsotg->eps_in[ep_index]; in index_to_ep()
68 return hsotg->eps_out[ep_index]; in index_to_ep()
72 static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg);
93 static inline bool using_dma(struct dwc2_hsotg *hsotg) in using_dma() argument
95 return hsotg->params.g_dma; in using_dma()
[all …]
Ddrd.c16 static void dwc2_ovr_init(struct dwc2_hsotg *hsotg) in dwc2_ovr_init() argument
21 spin_lock_irqsave(&hsotg->lock, flags); in dwc2_ovr_init()
23 gotgctl = dwc2_readl(hsotg, GOTGCTL); in dwc2_ovr_init()
27 dwc2_writel(hsotg, gotgctl, GOTGCTL); in dwc2_ovr_init()
29 spin_unlock_irqrestore(&hsotg->lock, flags); in dwc2_ovr_init()
31 dwc2_force_mode(hsotg, (hsotg->dr_mode == USB_DR_MODE_HOST)); in dwc2_ovr_init()
34 static int dwc2_ovr_avalid(struct dwc2_hsotg *hsotg, bool valid) in dwc2_ovr_avalid() argument
36 u32 gotgctl = dwc2_readl(hsotg, GOTGCTL); in dwc2_ovr_avalid()
48 dwc2_writel(hsotg, gotgctl, GOTGCTL); in dwc2_ovr_avalid()
53 static int dwc2_ovr_bvalid(struct dwc2_hsotg *hsotg, bool valid) in dwc2_ovr_bvalid() argument
[all …]
Dhcd_intr.c63 static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg) in dwc2_track_missed_sofs() argument
65 u16 curr_frame_number = hsotg->frame_number; in dwc2_track_missed_sofs()
66 u16 expected = dwc2_frame_num_inc(hsotg->last_frame_num, 1); in dwc2_track_missed_sofs()
69 dwc2_sch_vdbg(hsotg, "MISSED SOF %04x != %04x\n", in dwc2_track_missed_sofs()
73 if (hsotg->frame_num_idx < FRAME_NUM_ARRAY_SIZE) { in dwc2_track_missed_sofs()
75 hsotg->frame_num_array[hsotg->frame_num_idx] = in dwc2_track_missed_sofs()
77 hsotg->last_frame_num_array[hsotg->frame_num_idx] = in dwc2_track_missed_sofs()
78 hsotg->last_frame_num; in dwc2_track_missed_sofs()
79 hsotg->frame_num_idx++; in dwc2_track_missed_sofs()
81 } else if (!hsotg->dumped_frame_num_array) { in dwc2_track_missed_sofs()
[all …]
Dparams.c42 static void dwc2_set_bcm_params(struct dwc2_hsotg *hsotg) in dwc2_set_bcm_params() argument
44 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_bcm_params()
52 static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) in dwc2_set_his_params() argument
54 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_his_params()
74 static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg) in dwc2_set_s3c6400_params() argument
76 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_s3c6400_params()
82 static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg) in dwc2_set_rk_params() argument
84 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_rk_params()
95 static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg) in dwc2_set_ltq_params() argument
97 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_ltq_params()
[all …]
Dcore.h59 #define dwc2_sch_dbg(hsotg, fmt, ...) \ argument
61 dev_name(hsotg->dev), ##__VA_ARGS__)
64 #define dwc2_sch_vdbg(hsotg, fmt, ...) \ argument
66 dev_name(hsotg->dev), ##__VA_ARGS__)
1218 static inline u32 dwc2_readl(struct dwc2_hsotg *hsotg, u32 offset) in dwc2_readl() argument
1222 val = readl(hsotg->regs + offset); in dwc2_readl()
1223 if (hsotg->needs_byte_swap) in dwc2_readl()
1229 static inline void dwc2_writel(struct dwc2_hsotg *hsotg, u32 value, u32 offset) in dwc2_writel() argument
1231 if (hsotg->needs_byte_swap) in dwc2_writel()
1232 writel(swab32(value), hsotg->regs + offset); in dwc2_writel()
[all …]
Dhcd_ddma.c88 static int dwc2_desc_list_alloc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, in dwc2_desc_list_alloc() argument
95 desc_cache = hsotg->desc_hsisoc_cache; in dwc2_desc_list_alloc()
97 desc_cache = hsotg->desc_gen_cache; in dwc2_desc_list_alloc()
106 qh->desc_list_dma = dma_map_single(hsotg->dev, qh->desc_list, in dwc2_desc_list_alloc()
112 dma_unmap_single(hsotg->dev, qh->desc_list_dma, in dwc2_desc_list_alloc()
123 static void dwc2_desc_list_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_desc_list_free() argument
129 desc_cache = hsotg->desc_hsisoc_cache; in dwc2_desc_list_free()
131 desc_cache = hsotg->desc_gen_cache; in dwc2_desc_list_free()
134 dma_unmap_single(hsotg->dev, qh->desc_list_dma, in dwc2_desc_list_free()
144 static int dwc2_frame_list_alloc(struct dwc2_hsotg *hsotg, gfp_t mem_flags) in dwc2_frame_list_alloc() argument
[all …]
Dhcd_queue.c72 static int dwc2_periodic_channel_available(struct dwc2_hsotg *hsotg) in dwc2_periodic_channel_available() argument
82 num_channels = hsotg->params.host_channels; in dwc2_periodic_channel_available()
83 if ((hsotg->periodic_channels + hsotg->non_periodic_channels < in dwc2_periodic_channel_available()
84 num_channels) && (hsotg->periodic_channels < num_channels - 1)) { in dwc2_periodic_channel_available()
87 dev_dbg(hsotg->dev, in dwc2_periodic_channel_available()
90 hsotg->periodic_channels, hsotg->non_periodic_channels); in dwc2_periodic_channel_available()
109 static int dwc2_check_periodic_bandwidth(struct dwc2_hsotg *hsotg, in dwc2_check_periodic_bandwidth() argument
131 if (hsotg->periodic_usecs > max_claimed_usecs) { in dwc2_check_periodic_bandwidth()
132 dev_err(hsotg->dev, in dwc2_check_periodic_bandwidth()
134 __func__, hsotg->periodic_usecs, qh->host_us); in dwc2_check_periodic_bandwidth()
[all …]
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 …]
Dhcd.h341 struct dwc2_hsotg *hsotg; member
453 struct dwc2_hsotg *hsotg; member
458 u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg);
461 static inline struct usb_hcd *dwc2_hsotg_to_hcd(struct dwc2_hsotg *hsotg) in dwc2_hsotg_to_hcd() argument
463 return (struct usb_hcd *)hsotg->priv; in dwc2_hsotg_to_hcd()
473 static inline void disable_hc_int(struct dwc2_hsotg *hsotg, int chnum, u32 intr) in disable_hc_int() argument
475 u32 mask = dwc2_readl(hsotg, HCINTMSK(chnum)); in disable_hc_int()
478 dwc2_writel(hsotg, mask, HCINTMSK(chnum)); in disable_hc_int()
481 void dwc2_hc_cleanup(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan);
482 void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan,
[all …]
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
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/usb/
Dsamsung-hsotg.txt15 - compatible: "samsung,s3c6400-hsotg" should be used for all currently
29 hsotg@12480000 {
30 compatible = "samsung,s3c6400-hsotg";
/kernel/linux/linux-5.10/arch/arm/boot/dts/
Ds5pv210.dtsi409 hsotg: hsotg@ec000000 { label
410 compatible = "samsung,s3c6400-hsotg";
Ds5pv210-smdkv210.dts190 &hsotg {
Dexynos4412-itop-elite.dts165 &hsotg {
Dexynos3250.dtsi356 hsotg: hsotg@12480000 { label
357 compatible = "samsung,s3c6400-hsotg";
Dexynos4.dtsi365 hsotg: hsotg@12480000 { label
366 compatible = "samsung,s3c6400-hsotg";
Dexynos4210-origen.dts160 &hsotg {
Ds5pv210-aquila.dts361 &hsotg {
Ds5pv210-goni.dts339 &hsotg {
Dexynos4210-trats.dts251 &hsotg {
Dexynos4412-itop-scp-core.dtsi123 &hsotg {

12