Lines Matching refs:hsotg
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()
133 dwc2_readl(hsotg, DCTL), in state_show()
134 dwc2_readl(hsotg, DSTS)); in state_show()
137 dwc2_readl(hsotg, DIEPMSK), dwc2_readl(hsotg, DOEPMSK)); in state_show()
140 dwc2_readl(hsotg, GINTMSK), in state_show()
141 dwc2_readl(hsotg, GINTSTS)); in state_show()
144 dwc2_readl(hsotg, DAINTMSK), in state_show()
145 dwc2_readl(hsotg, DAINT)); in state_show()
148 dwc2_readl(hsotg, GNPTXSTS), in state_show()
149 dwc2_readl(hsotg, GRXSTSR)); in state_show()
153 for (idx = 0; idx < hsotg->num_of_eps; idx++) { in state_show()
156 in = dwc2_readl(hsotg, DIEPCTL(idx)); in state_show()
157 out = dwc2_readl(hsotg, DOEPCTL(idx)); in state_show()
162 in = dwc2_readl(hsotg, DIEPTSIZ(idx)); in state_show()
163 out = dwc2_readl(hsotg, DOEPTSIZ(idx)); in state_show()
185 struct dwc2_hsotg *hsotg = seq->private; in fifo_show() local
186 int fifo_count = dwc2_hsotg_tx_fifo_count(hsotg); in fifo_show()
191 seq_printf(seq, "RXFIFO: Size %d\n", dwc2_readl(hsotg, GRXFSIZ)); in fifo_show()
193 val = dwc2_readl(hsotg, GNPTXFSIZ); in fifo_show()
201 val = dwc2_readl(hsotg, DPTXFSIZN(idx)); in fifo_show()
228 struct dwc2_hsotg *hsotg = ep->parent; in ep_show() local
240 dwc2_readl(hsotg, DIEPCTL(index)), in ep_show()
241 dwc2_readl(hsotg, DOEPCTL(index))); in ep_show()
244 dwc2_readl(hsotg, DIEPDMA(index)), in ep_show()
245 dwc2_readl(hsotg, DOEPDMA(index))); in ep_show()
248 dwc2_readl(hsotg, DIEPINT(index)), in ep_show()
249 dwc2_readl(hsotg, DOEPINT(index))); in ep_show()
252 dwc2_readl(hsotg, DIEPTSIZ(index)), in ep_show()
253 dwc2_readl(hsotg, DOEPTSIZ(index))); in ep_show()
262 spin_lock_irqsave(&hsotg->lock, flags); in ep_show()
277 spin_unlock_irqrestore(&hsotg->lock, flags); in ep_show()
292 static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) in dwc2_hsotg_create_debug() argument
297 root = hsotg->debug_root; in dwc2_hsotg_create_debug()
300 debugfs_create_file("state", 0444, root, hsotg, &state_fops); in dwc2_hsotg_create_debug()
301 debugfs_create_file("testmode", 0644, root, hsotg, &testmode_fops); in dwc2_hsotg_create_debug()
302 debugfs_create_file("fifo", 0444, root, hsotg, &fifo_fops); in dwc2_hsotg_create_debug()
305 for (epidx = 0; epidx < hsotg->num_of_eps; epidx++) { in dwc2_hsotg_create_debug()
308 ep = hsotg->eps_out[epidx]; in dwc2_hsotg_create_debug()
313 for (epidx = 1; epidx < hsotg->num_of_eps; epidx++) { in dwc2_hsotg_create_debug()
316 ep = hsotg->eps_in[epidx]; in dwc2_hsotg_create_debug()
322 static inline void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) {} in dwc2_hsotg_create_debug() argument
669 struct dwc2_hsotg *hsotg = seq->private; in params_show() local
670 struct dwc2_core_params *p = &hsotg->params; in params_show()
729 struct dwc2_hsotg *hsotg = seq->private; in hw_params_show() local
730 struct dwc2_hw_params *hw = &hsotg->hw_params; in hw_params_show()
764 struct dwc2_hsotg *hsotg = seq->private; in dr_mode_show() local
767 device_property_read_string(hsotg->dev, "dr_mode", &dr_mode); in dr_mode_show()
773 int dwc2_debugfs_init(struct dwc2_hsotg *hsotg) in dwc2_debugfs_init() argument
778 root = debugfs_create_dir(dev_name(hsotg->dev), usb_debug_root); in dwc2_debugfs_init()
779 hsotg->debug_root = root; in dwc2_debugfs_init()
781 debugfs_create_file("params", 0444, root, hsotg, ¶ms_fops); in dwc2_debugfs_init()
782 debugfs_create_file("hw_params", 0444, root, hsotg, &hw_params_fops); in dwc2_debugfs_init()
783 debugfs_create_file("dr_mode", 0444, root, hsotg, &dr_mode_fops); in dwc2_debugfs_init()
786 dwc2_hsotg_create_debug(hsotg); in dwc2_debugfs_init()
788 hsotg->regset = devm_kzalloc(hsotg->dev, sizeof(*hsotg->regset), in dwc2_debugfs_init()
790 if (!hsotg->regset) { in dwc2_debugfs_init()
795 hsotg->regset->regs = dwc2_regs; in dwc2_debugfs_init()
796 hsotg->regset->nregs = ARRAY_SIZE(dwc2_regs); in dwc2_debugfs_init()
797 hsotg->regset->base = hsotg->regs; in dwc2_debugfs_init()
799 debugfs_create_regset32("regdump", 0444, root, hsotg->regset); in dwc2_debugfs_init()
803 debugfs_remove_recursive(hsotg->debug_root); in dwc2_debugfs_init()
807 void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg) in dwc2_debugfs_exit() argument
809 debugfs_remove_recursive(hsotg->debug_root); in dwc2_debugfs_exit()
810 hsotg->debug_root = NULL; in dwc2_debugfs_exit()