Lines Matching refs:u3h
16 static void host_ports_num_get(struct mtu3_host *u3h) in host_ports_num_get() argument
20 xhci_cap = mtu3_readl(u3h->ippc_base, U3D_SSUSB_IP_XHCI_CAP); in host_ports_num_get()
21 u3h->u2_ports = SSUSB_IP_XHCI_U2_PORT_NUM(xhci_cap); in host_ports_num_get()
22 u3h->u3_ports = SSUSB_IP_XHCI_U3_PORT_NUM(xhci_cap); in host_ports_num_get()
24 dev_dbg(u3h->dev, "host - u2_ports:%d, u3_ports:%d\n", in host_ports_num_get()
25 u3h->u2_ports, u3h->u3_ports); in host_ports_num_get()
29 static int ssusb_host_enable(struct mtu3_host *u3h) in ssusb_host_enable() argument
31 void __iomem *ibase = u3h->ippc_base; in ssusb_host_enable()
32 int num_u3p = u3h->u3_ports; in ssusb_host_enable()
33 int num_u2p = u3h->u2_ports; in ssusb_host_enable()
45 if ((0x1 << i) & u3h->u3p_dis_msk) { in ssusb_host_enable()
68 return ssusb_check_clocks(u3h->ssusb, check_clk); in ssusb_host_enable()
71 static void ssusb_host_disable(struct mtu3_host *u3h) in ssusb_host_disable() argument
73 void __iomem *ibase = u3h->ippc_base; in ssusb_host_disable()
74 int num_u3p = u3h->u3_ports; in ssusb_host_disable()
75 int num_u2p = u3h->u2_ports; in ssusb_host_disable()
81 if ((0x1 << i) & u3h->u3p_dis_msk) in ssusb_host_disable()
108 struct mtu3_host *u3h = ssusb->u3h; in ssusb_host_init() local
109 struct udevice *dev = u3h->dev; in ssusb_host_init()
112 u3h->ssusb = ssusb; in ssusb_host_init()
113 u3h->hcd = ssusb->mac_base; in ssusb_host_init()
114 u3h->ippc_base = ssusb->ippc_base; in ssusb_host_init()
117 dev_read_u32(dev, "mediatek,u3p-dis-msk", &u3h->u3p_dis_msk); in ssusb_host_init()
119 host_ports_num_get(u3h); in ssusb_host_init()
120 ret = ssusb_host_enable(u3h); in ssusb_host_init()
140 ssusb_host_disable(ssusb->u3h); in ssusb_host_exit()