Lines Matching refs:ehci

30 	struct ehci_ctrl ehci;  member
38 static int ehci_fsl_init(struct ehci_fsl_priv *priv, struct usb_ehci *ehci,
41 static int ehci_fsl_init(int index, struct usb_ehci *ehci,
46 static int usb_phy_clk_valid(struct usb_ehci *ehci) in usb_phy_clk_valid() argument
48 if (!((in_be32(&ehci->control) & PHY_CLK_VALID) || in usb_phy_clk_valid()
49 in_be32(&ehci->prictrl))) { in usb_phy_clk_valid()
75 struct usb_ehci *ehci = NULL; in ehci_fsl_init_after_reset() local
77 ehci); in ehci_fsl_init_after_reset()
79 ehci = (struct usb_ehci *)priv->hcd_base; in ehci_fsl_init_after_reset()
80 if (ehci_fsl_init(priv, ehci, priv->ehci.hccr, priv->ehci.hcor) < 0) in ehci_fsl_init_after_reset()
93 struct usb_ehci *ehci = NULL; in ehci_fsl_probe() local
105 ehci = (struct usb_ehci *)priv->hcd_base; in ehci_fsl_probe()
106 hccr = (struct ehci_hccr *)(&ehci->caplength); in ehci_fsl_probe()
110 if (ehci_fsl_init(priv, ehci, hccr, hcor) < 0) in ehci_fsl_probe()
148 struct usb_ehci *ehci = NULL; in ehci_hcd_init() local
152 ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB1_ADDR; in ehci_hcd_init()
155 ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB2_ADDR; in ehci_hcd_init()
162 *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); in ehci_hcd_init()
166 return ehci_fsl_init(index, ehci, *hccr, *hcor); in ehci_hcd_init()
180 static int ehci_fsl_init(struct ehci_fsl_priv *priv, struct usb_ehci *ehci, in ehci_fsl_init() argument
183 static int ehci_fsl_init(int index, struct usb_ehci *ehci, in ehci_fsl_init()
208 setbits_le32(&ehci->usbmode, CM_HOST); in ehci_fsl_init()
210 out_be32(&ehci->snoop1, SNOOP_SIZE_2GB); in ehci_fsl_init()
211 out_be32(&ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB); in ehci_fsl_init()
242 clrsetbits_be32(&ehci->control, CONTROL_REGISTER_W1C_MASK, in ehci_fsl_init()
244 clrsetbits_be32(&ehci->control, CONTROL_REGISTER_W1C_MASK, in ehci_fsl_init()
249 clrsetbits_be32(&ehci->control, CONTROL_REGISTER_W1C_MASK, in ehci_fsl_init()
252 clrsetbits_be32(&ehci->control, CONTROL_REGISTER_W1C_MASK, in ehci_fsl_init()
254 clrsetbits_be32(&ehci->control, UTMI_PHY_EN | in ehci_fsl_init()
257 if (!usb_phy_clk_valid(ehci)) in ehci_fsl_init()
262 out_be32(&ehci->prictrl, 0x0000000c); in ehci_fsl_init()
263 out_be32(&ehci->age_cnt_limit, 0x00000040); in ehci_fsl_init()
264 out_be32(&ehci->sictrl, 0x00000001); in ehci_fsl_init()
266 in_le32(&ehci->usbmode); in ehci_fsl_init()
269 set_txfifothresh(ehci, TXFIFOTHRESH); in ehci_fsl_init()
289 static void set_txfifothresh(struct usb_ehci *ehci, u32 txfifo_thresh) in set_txfifothresh() argument
292 cmd = ehci_readl(&ehci->txfilltuning); in set_txfifothresh()
295 ehci_writel(&ehci->txfilltuning, cmd); in set_txfifothresh()