Lines Matching refs:kdwc

51 static void kdwc3_enable_irqs(struct dwc3_keystone *kdwc)  in kdwc3_enable_irqs()  argument
55 val = kdwc3_readl(kdwc->usbss, USBSS_IRQENABLE_SET_0); in kdwc3_enable_irqs()
57 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_SET_0, val); in kdwc3_enable_irqs()
60 static void kdwc3_disable_irqs(struct dwc3_keystone *kdwc) in kdwc3_disable_irqs() argument
64 val = kdwc3_readl(kdwc->usbss, USBSS_IRQENABLE_SET_0); in kdwc3_disable_irqs()
66 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_SET_0, val); in kdwc3_disable_irqs()
71 struct dwc3_keystone *kdwc = _kdwc; in dwc3_keystone_interrupt() local
73 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_CLR_0, USBSS_IRQ_COREIRQ_CLR); in dwc3_keystone_interrupt()
74 kdwc3_writel(kdwc->usbss, USBSS_IRQSTATUS_0, USBSS_IRQ_EVENT_ST); in dwc3_keystone_interrupt()
75 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_SET_0, USBSS_IRQ_COREIRQ_EN); in dwc3_keystone_interrupt()
76 kdwc3_writel(kdwc->usbss, USBSS_IRQ_EOI, USBSS_IRQ_EOI_LINE(0)); in dwc3_keystone_interrupt()
85 struct dwc3_keystone *kdwc; in kdwc3_probe() local
88 kdwc = devm_kzalloc(dev, sizeof(*kdwc), GFP_KERNEL); in kdwc3_probe()
89 if (!kdwc) in kdwc3_probe()
92 platform_set_drvdata(pdev, kdwc); in kdwc3_probe()
94 kdwc->dev = dev; in kdwc3_probe()
96 kdwc->usbss = devm_platform_ioremap_resource(pdev, 0); in kdwc3_probe()
97 if (IS_ERR(kdwc->usbss)) in kdwc3_probe()
98 return PTR_ERR(kdwc->usbss); in kdwc3_probe()
101 kdwc->usb3_phy = devm_phy_optional_get(dev, "usb3-phy"); in kdwc3_probe()
102 if (IS_ERR(kdwc->usb3_phy)) in kdwc3_probe()
103 return dev_err_probe(dev, PTR_ERR(kdwc->usb3_phy), "couldn't get usb3 phy\n"); in kdwc3_probe()
105 phy_pm_runtime_get_sync(kdwc->usb3_phy); in kdwc3_probe()
107 error = phy_reset(kdwc->usb3_phy); in kdwc3_probe()
113 error = phy_init(kdwc->usb3_phy); in kdwc3_probe()
119 error = phy_power_on(kdwc->usb3_phy); in kdwc3_probe()
122 phy_exit(kdwc->usb3_phy); in kdwc3_probe()
126 pm_runtime_enable(kdwc->dev); in kdwc3_probe()
127 error = pm_runtime_get_sync(kdwc->dev); in kdwc3_probe()
129 dev_err(kdwc->dev, "pm_runtime_get_sync failed, error %d\n", in kdwc3_probe()
145 dev_name(dev), kdwc); in kdwc3_probe()
152 kdwc3_enable_irqs(kdwc); in kdwc3_probe()
164 kdwc3_disable_irqs(kdwc); in kdwc3_probe()
166 pm_runtime_put_sync(kdwc->dev); in kdwc3_probe()
167 pm_runtime_disable(kdwc->dev); in kdwc3_probe()
168 phy_power_off(kdwc->usb3_phy); in kdwc3_probe()
169 phy_exit(kdwc->usb3_phy); in kdwc3_probe()
170 phy_pm_runtime_put_sync(kdwc->usb3_phy); in kdwc3_probe()
186 struct dwc3_keystone *kdwc = platform_get_drvdata(pdev); in kdwc3_remove() local
190 kdwc3_disable_irqs(kdwc); in kdwc3_remove()
193 pm_runtime_put_sync(kdwc->dev); in kdwc3_remove()
194 pm_runtime_disable(kdwc->dev); in kdwc3_remove()
196 phy_power_off(kdwc->usb3_phy); in kdwc3_remove()
197 phy_exit(kdwc->usb3_phy); in kdwc3_remove()
198 phy_pm_runtime_put_sync(kdwc->usb3_phy); in kdwc3_remove()