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
190 seq_printf(seq, "RXFIFO: Size %d\n", dwc2_readl(hsotg, GRXFSIZ)); in fifo_show()
192 val = dwc2_readl(hsotg, GNPTXFSIZ); in fifo_show()
199 for (idx = 1; idx < hsotg->num_of_eps; idx++) { in fifo_show()
200 val = dwc2_readl(hsotg, DPTXFSIZN(idx)); in fifo_show()
227 struct dwc2_hsotg *hsotg = ep->parent; in ep_show() local
239 dwc2_readl(hsotg, DIEPCTL(index)), in ep_show()
240 dwc2_readl(hsotg, DOEPCTL(index))); in ep_show()
243 dwc2_readl(hsotg, DIEPDMA(index)), in ep_show()
244 dwc2_readl(hsotg, DOEPDMA(index))); in ep_show()
247 dwc2_readl(hsotg, DIEPINT(index)), in ep_show()
248 dwc2_readl(hsotg, DOEPINT(index))); in ep_show()
251 dwc2_readl(hsotg, DIEPTSIZ(index)), in ep_show()
252 dwc2_readl(hsotg, DOEPTSIZ(index))); in ep_show()
261 spin_lock_irqsave(&hsotg->lock, flags); in ep_show()
276 spin_unlock_irqrestore(&hsotg->lock, flags); in ep_show()
291 static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) in dwc2_hsotg_create_debug() argument
296 root = hsotg->debug_root; in dwc2_hsotg_create_debug()
299 debugfs_create_file("state", 0444, root, hsotg, &state_fops); in dwc2_hsotg_create_debug()
300 debugfs_create_file("testmode", 0644, root, hsotg, &testmode_fops); in dwc2_hsotg_create_debug()
301 debugfs_create_file("fifo", 0444, root, hsotg, &fifo_fops); in dwc2_hsotg_create_debug()
304 for (epidx = 0; epidx < hsotg->num_of_eps; epidx++) { in dwc2_hsotg_create_debug()
307 ep = hsotg->eps_out[epidx]; in dwc2_hsotg_create_debug()
312 for (epidx = 1; epidx < hsotg->num_of_eps; epidx++) { in dwc2_hsotg_create_debug()
315 ep = hsotg->eps_in[epidx]; in dwc2_hsotg_create_debug()
321 static inline void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) {} in dwc2_hsotg_create_debug() argument
668 struct dwc2_hsotg *hsotg = seq->private; in params_show() local
669 struct dwc2_core_params *p = &hsotg->params; in params_show()
724 struct dwc2_hsotg *hsotg = seq->private; in hw_params_show() local
725 struct dwc2_hw_params *hw = &hsotg->hw_params; in hw_params_show()
759 struct dwc2_hsotg *hsotg = seq->private; in dr_mode_show() local
762 device_property_read_string(hsotg->dev, "dr_mode", &dr_mode); in dr_mode_show()
768 int dwc2_debugfs_init(struct dwc2_hsotg *hsotg) in dwc2_debugfs_init() argument
773 root = debugfs_create_dir(dev_name(hsotg->dev), NULL); in dwc2_debugfs_init()
774 hsotg->debug_root = root; in dwc2_debugfs_init()
776 debugfs_create_file("params", 0444, root, hsotg, &params_fops); in dwc2_debugfs_init()
777 debugfs_create_file("hw_params", 0444, root, hsotg, &hw_params_fops); in dwc2_debugfs_init()
778 debugfs_create_file("dr_mode", 0444, root, hsotg, &dr_mode_fops); in dwc2_debugfs_init()
781 dwc2_hsotg_create_debug(hsotg); in dwc2_debugfs_init()
783 hsotg->regset = devm_kzalloc(hsotg->dev, sizeof(*hsotg->regset), in dwc2_debugfs_init()
785 if (!hsotg->regset) { in dwc2_debugfs_init()
790 hsotg->regset->regs = dwc2_regs; in dwc2_debugfs_init()
791 hsotg->regset->nregs = ARRAY_SIZE(dwc2_regs); in dwc2_debugfs_init()
792 hsotg->regset->base = hsotg->regs; in dwc2_debugfs_init()
794 debugfs_create_regset32("regdump", 0444, root, hsotg->regset); in dwc2_debugfs_init()
798 debugfs_remove_recursive(hsotg->debug_root); in dwc2_debugfs_init()
802 void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg) in dwc2_debugfs_exit() argument
804 debugfs_remove_recursive(hsotg->debug_root); in dwc2_debugfs_exit()
805 hsotg->debug_root = NULL; in dwc2_debugfs_exit()