Lines Matching refs:priv

39 	struct ohci_sunxi_priv *priv = dev_get_priv(dev);  in ohci_usb_probe()  local
43 priv->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; in ohci_usb_probe()
44 if (IS_ERR(priv->ccm)) in ohci_usb_probe()
45 return PTR_ERR(priv->ccm); in ohci_usb_probe()
53 priv->ahb_gate_mask = 1 << AHB_GATE_OFFSET_USB_OHCI0; in ohci_usb_probe()
57 priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK; in ohci_usb_probe()
58 priv->phy_index = ((uintptr_t)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST; in ohci_usb_probe()
59 priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST; in ohci_usb_probe()
60 extra_ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST; in ohci_usb_probe()
61 priv->usb_gate_mask <<= priv->phy_index; in ohci_usb_probe()
62 priv->phy_index++; /* Non otg phys start at 1 */ in ohci_usb_probe()
64 setbits_le32(&priv->ccm->ahb_gate0, in ohci_usb_probe()
65 priv->ahb_gate_mask | extra_ahb_gate_mask); in ohci_usb_probe()
66 setbits_le32(&priv->ccm->usb_clk_cfg, priv->usb_gate_mask); in ohci_usb_probe()
68 setbits_le32(&priv->ccm->ahb_reset0_cfg, in ohci_usb_probe()
69 priv->ahb_gate_mask | extra_ahb_gate_mask); in ohci_usb_probe()
72 sunxi_usb_phy_init(priv->phy_index); in ohci_usb_probe()
73 sunxi_usb_phy_power_on(priv->phy_index); in ohci_usb_probe()
80 struct ohci_sunxi_priv *priv = dev_get_priv(dev); in ohci_usb_remove() local
87 sunxi_usb_phy_exit(priv->phy_index); in ohci_usb_remove()
90 clrbits_le32(&priv->ccm->ahb_reset0_cfg, priv->ahb_gate_mask); in ohci_usb_remove()
92 clrbits_le32(&priv->ccm->usb_clk_cfg, priv->usb_gate_mask); in ohci_usb_remove()
93 clrbits_le32(&priv->ccm->ahb_gate0, priv->ahb_gate_mask); in ohci_usb_remove()