Lines Matching refs:hsotg

38 	struct dwc2_hsotg	*hsotg = s->private;  in testmode_write()  local
59 spin_lock_irqsave(&hsotg->lock, flags); in testmode_write()
60 dwc2_hsotg_set_test_mode(hsotg, testmode); in testmode_write()
61 spin_unlock_irqrestore(&hsotg->lock, flags); in testmode_write()
74 struct dwc2_hsotg *hsotg = s->private; in testmode_show() local
78 spin_lock_irqsave(&hsotg->lock, flags); in testmode_show()
79 dctl = dwc2_readl(hsotg->regs + DCTL); in testmode_show()
82 spin_unlock_irqrestore(&hsotg->lock, flags); in testmode_show()
135 struct dwc2_hsotg *hsotg = seq->private; in state_show() local
136 void __iomem *regs = hsotg->regs; in state_show()
161 for (idx = 0; idx < hsotg->num_of_eps; idx++) { in state_show()
205 struct dwc2_hsotg *hsotg = seq->private; in fifo_show() local
206 void __iomem *regs = hsotg->regs; in fifo_show()
220 for (idx = 1; idx < hsotg->num_of_eps; idx++) { in fifo_show()
260 struct dwc2_hsotg *hsotg = ep->parent; in ep_show() local
262 void __iomem *regs = hsotg->regs; in ep_show()
295 spin_lock_irqsave(&hsotg->lock, flags); in ep_show()
310 spin_unlock_irqrestore(&hsotg->lock, flags); in ep_show()
337 static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) in dwc2_hsotg_create_debug() argument
343 root = hsotg->debug_root; in dwc2_hsotg_create_debug()
347 file = debugfs_create_file("state", S_IRUGO, root, hsotg, &state_fops); in dwc2_hsotg_create_debug()
349 dev_err(hsotg->dev, "%s: failed to create state\n", __func__); in dwc2_hsotg_create_debug()
351 file = debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root, hsotg, in dwc2_hsotg_create_debug()
354 dev_err(hsotg->dev, "%s: failed to create testmode\n", in dwc2_hsotg_create_debug()
357 file = debugfs_create_file("fifo", S_IRUGO, root, hsotg, &fifo_fops); in dwc2_hsotg_create_debug()
359 dev_err(hsotg->dev, "%s: failed to create fifo\n", __func__); in dwc2_hsotg_create_debug()
362 for (epidx = 0; epidx < hsotg->num_of_eps; epidx++) { in dwc2_hsotg_create_debug()
365 ep = hsotg->eps_out[epidx]; in dwc2_hsotg_create_debug()
370 dev_err(hsotg->dev, "failed to create %s debug file\n", in dwc2_hsotg_create_debug()
375 for (epidx = 1; epidx < hsotg->num_of_eps; epidx++) { in dwc2_hsotg_create_debug()
378 ep = hsotg->eps_in[epidx]; in dwc2_hsotg_create_debug()
383 dev_err(hsotg->dev, "failed to create %s debug file\n", in dwc2_hsotg_create_debug()
389 static inline void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) {} in dwc2_hsotg_create_debug() argument
728 int dwc2_debugfs_init(struct dwc2_hsotg *hsotg) in dwc2_debugfs_init() argument
733 hsotg->debug_root = debugfs_create_dir(dev_name(hsotg->dev), NULL); in dwc2_debugfs_init()
734 if (!hsotg->debug_root) { in dwc2_debugfs_init()
740 dwc2_hsotg_create_debug(hsotg); in dwc2_debugfs_init()
742 hsotg->regset = devm_kzalloc(hsotg->dev, sizeof(*hsotg->regset), in dwc2_debugfs_init()
744 if (!hsotg->regset) { in dwc2_debugfs_init()
749 hsotg->regset->regs = dwc2_regs; in dwc2_debugfs_init()
750 hsotg->regset->nregs = ARRAY_SIZE(dwc2_regs); in dwc2_debugfs_init()
751 hsotg->regset->base = hsotg->regs; in dwc2_debugfs_init()
753 file = debugfs_create_regset32("regdump", S_IRUGO, hsotg->debug_root, in dwc2_debugfs_init()
754 hsotg->regset); in dwc2_debugfs_init()
762 debugfs_remove_recursive(hsotg->debug_root); in dwc2_debugfs_init()
767 void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg) in dwc2_debugfs_exit() argument
769 debugfs_remove_recursive(hsotg->debug_root); in dwc2_debugfs_exit()
770 hsotg->debug_root = NULL; in dwc2_debugfs_exit()