/linux-6.1.9/drivers/usb/dwc2/ |
D | core_intr.c | 27 static const char *dwc2_op_state_str(struct dwc2_hsotg *hsotg) in dwc2_op_state_str() argument 29 switch (hsotg->op_state) { in dwc2_op_state_str() 52 static void dwc2_handle_usb_port_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_usb_port_intr() argument 54 u32 hprt0 = dwc2_readl(hsotg, HPRT0); in dwc2_handle_usb_port_intr() 58 dwc2_writel(hsotg, hprt0, HPRT0); in dwc2_handle_usb_port_intr() 67 static void dwc2_handle_mode_mismatch_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_mode_mismatch_intr() argument 70 dwc2_writel(hsotg, GINTSTS_MODEMIS, GINTSTS); in dwc2_handle_mode_mismatch_intr() 72 dev_warn(hsotg->dev, "Mode Mismatch Interrupt: currently in %s mode\n", in dwc2_handle_mode_mismatch_intr() 73 dwc2_is_host_mode(hsotg) ? "Host" : "Device"); in dwc2_handle_mode_mismatch_intr() 82 static void dwc2_handle_otg_intr(struct dwc2_hsotg *hsotg) in dwc2_handle_otg_intr() argument [all …]
|
D | core.c | 37 int dwc2_backup_global_registers(struct dwc2_hsotg *hsotg) in dwc2_backup_global_registers() argument 41 dev_dbg(hsotg->dev, "%s\n", __func__); in dwc2_backup_global_registers() 44 gr = &hsotg->gr_backup; in dwc2_backup_global_registers() 46 gr->gotgctl = dwc2_readl(hsotg, GOTGCTL); in dwc2_backup_global_registers() 47 gr->gintmsk = dwc2_readl(hsotg, GINTMSK); in dwc2_backup_global_registers() 48 gr->gahbcfg = dwc2_readl(hsotg, GAHBCFG); in dwc2_backup_global_registers() 49 gr->gusbcfg = dwc2_readl(hsotg, GUSBCFG); in dwc2_backup_global_registers() 50 gr->grxfsiz = dwc2_readl(hsotg, GRXFSIZ); in dwc2_backup_global_registers() 51 gr->gnptxfsiz = dwc2_readl(hsotg, GNPTXFSIZ); in dwc2_backup_global_registers() 52 gr->gdfifocfg = dwc2_readl(hsotg, GDFIFOCFG); in dwc2_backup_global_registers() [all …]
|
D | platform.c | 52 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 …]
|
D | hcd.c | 42 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 …]
|
D | gadget.c | 52 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 …]
|
D | drd.c | 20 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() 41 static int dwc2_ovr_avalid(struct dwc2_hsotg *hsotg, bool valid) in dwc2_ovr_avalid() argument 43 u32 gotgctl = dwc2_readl(hsotg, GOTGCTL); in dwc2_ovr_avalid() [all …]
|
D | hcd_intr.c | 33 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 …]
|
D | core.h | 30 #define dwc2_sch_dbg(hsotg, fmt, ...) \ argument 32 dev_name(hsotg->dev), ##__VA_ARGS__) 35 #define dwc2_sch_vdbg(hsotg, fmt, ...) \ argument 37 dev_name(hsotg->dev), ##__VA_ARGS__) 1203 static inline u32 dwc2_readl(struct dwc2_hsotg *hsotg, u32 offset) in dwc2_readl() argument 1207 val = readl(hsotg->regs + offset); in dwc2_readl() 1208 if (hsotg->needs_byte_swap) in dwc2_readl() 1214 static inline void dwc2_writel(struct dwc2_hsotg *hsotg, u32 value, u32 offset) in dwc2_writel() argument 1216 if (hsotg->needs_byte_swap) in dwc2_writel() 1217 writel(swab32(value), hsotg->regs + offset); in dwc2_writel() [all …]
|
D | params.c | 13 static void dwc2_set_bcm_params(struct dwc2_hsotg *hsotg) in dwc2_set_bcm_params() argument 15 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_bcm_params() 23 static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) in dwc2_set_his_params() argument 25 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_his_params() 46 static void dwc2_set_jz4775_params(struct dwc2_hsotg *hsotg) in dwc2_set_jz4775_params() argument 48 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_jz4775_params() 55 !device_property_read_bool(hsotg->dev, "disable-over-current"); in dwc2_set_jz4775_params() 58 static void dwc2_set_x1600_params(struct dwc2_hsotg *hsotg) in dwc2_set_x1600_params() argument 60 struct dwc2_core_params *p = &hsotg->params; in dwc2_set_x1600_params() 68 !device_property_read_bool(hsotg->dev, "disable-over-current"); in dwc2_set_x1600_params() [all …]
|
D | hcd_ddma.c | 58 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 …]
|
D | hcd_queue.c | 42 static int dwc2_periodic_channel_available(struct dwc2_hsotg *hsotg) in dwc2_periodic_channel_available() argument 52 num_channels = hsotg->params.host_channels; in dwc2_periodic_channel_available() 53 if ((hsotg->periodic_channels + hsotg->non_periodic_channels < in dwc2_periodic_channel_available() 54 num_channels) && (hsotg->periodic_channels < num_channels - 1)) { in dwc2_periodic_channel_available() 57 dev_dbg(hsotg->dev, in dwc2_periodic_channel_available() 60 hsotg->periodic_channels, hsotg->non_periodic_channels); in dwc2_periodic_channel_available() 79 static int dwc2_check_periodic_bandwidth(struct dwc2_hsotg *hsotg, in dwc2_check_periodic_bandwidth() argument 101 if (hsotg->periodic_usecs > max_claimed_usecs) { in dwc2_check_periodic_bandwidth() 102 dev_err(hsotg->dev, in dwc2_check_periodic_bandwidth() 104 __func__, hsotg->periodic_usecs, qh->host_us); in dwc2_check_periodic_bandwidth() [all …]
|
D | debugfs.c | 31 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 …]
|
D | hcd.h | 312 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 …]
|
D | debug.h | 12 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-6.1.9/Documentation/devicetree/bindings/usb/ |
D | samsung-hsotg.txt | 15 - compatible: "samsung,s3c6400-hsotg" should be used for all currently 29 hsotg@12480000 { 30 compatible = "samsung,s3c6400-hsotg";
|
D | dwc2.yaml | 53 - intel,socfpga-agilex-hsotg 59 - const: st,stm32f4x9-hsotg 60 - const: st,stm32f7-hsotg 63 - const: st,stm32mp15-hsotg 65 - const: samsung,s3c6400-hsotg 66 - const: intel,socfpga-agilex-hsotg
|
/linux-6.1.9/arch/arm/boot/dts/ |
D | exynos4412-odroidx.dts | 109 &hsotg {
|
D | exynos4412-odroidu3.dts | 131 &hsotg {
|
D | s5pv210.dtsi | 404 hsotg: hsotg@ec000000 { label 405 compatible = "samsung,s3c6400-hsotg";
|
D | s5pv210-smdkv210.dts | 190 &hsotg {
|
D | exynos4412-itop-elite.dts | 168 &hsotg {
|
D | exynos3250.dtsi | 368 hsotg: hsotg@12480000 { label 369 compatible = "samsung,s3c6400-hsotg";
|
D | exynos4.dtsi | 365 hsotg: hsotg@12480000 { label 366 compatible = "samsung,s3c6400-hsotg";
|
D | exynos4210-origen.dts | 162 &hsotg {
|
/linux-6.1.9/arch/arm64/boot/dts/intel/ |
D | socfpga_agilex.dtsi | 503 compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2"; 517 compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";
|