Lines Matching defs:base
80 static unsigned int u2o_get(void __iomem *base, unsigned int offset)
82 return readl_relaxed(base + offset);
85 static void u2o_set(void __iomem *base, unsigned int offset,
90 reg = readl_relaxed(base + offset);
92 writel_relaxed(reg, base + offset);
93 readl_relaxed(base + offset);
96 static void u2o_clear(void __iomem *base, unsigned int offset,
101 reg = readl_relaxed(base + offset);
103 writel_relaxed(reg, base + offset);
104 readl_relaxed(base + offset);
107 static void u2o_write(void __iomem *base, unsigned int offset,
110 writel_relaxed(value, base + offset);
111 readl_relaxed(base + offset);
118 static int usb_phy_init_internal(void __iomem *base)
126 u2o_set(base, UTMI_CTRL, (1<<UTMI_CTRL_INPKT_DELAY_SOF_SHIFT)
130 u2o_set(base, UTMI_CTRL, 1<<UTMI_CTRL_PLL_PWR_UP_SHIFT);
131 u2o_set(base, UTMI_CTRL, 1<<UTMI_CTRL_PWR_UP_SHIFT);
134 u2o_clear(base, UTMI_PLL, UTMI_PLL_PLLVDD18_MASK
139 u2o_set(base, UTMI_PLL, 0xee<<UTMI_PLL_FBDIV_SHIFT
145 u2o_clear(base, UTMI_TX, UTMI_TX_REG_EXT_FS_RCAL_EN_MASK
149 u2o_set(base, UTMI_TX, 3<<UTMI_TX_TXVDD12_SHIFT
154 u2o_clear(base, UTMI_RX, UTMI_RX_SQ_THRESH_MASK
156 u2o_set(base, UTMI_RX, 7<<UTMI_RX_SQ_THRESH_SHIFT
163 u2o_write(base, UTMI_IVREF, 0x4bf);
167 u2o_set(base, UTMI_PLL, VCOCAL_START);
169 u2o_clear(base, UTMI_PLL, VCOCAL_START);
173 u2o_set(base, UTMI_TX, REG_RCAL_START);
175 u2o_clear(base, UTMI_TX, REG_RCAL_START);
180 while ((u2o_get(base, UTMI_PLL) & PLL_READY) == 0) {
185 u2o_get(base, UTMI_PLL));
191 u2o_set(base, UTMI_RESERVE, 1 << 5);
193 u2o_write(base, UTMI_OTG_ADDON, 1);
199 static int usb_phy_deinit_internal(void __iomem *base)
204 u2o_clear(base, UTMI_OTG_ADDON, UTMI_OTG_ADDON_OTG_ON);
206 u2o_clear(base, UTMI_CTRL, UTMI_CTRL_RXBUF_PDWN);
207 u2o_clear(base, UTMI_CTRL, UTMI_CTRL_TXBUF_PDWN);
208 u2o_clear(base, UTMI_CTRL, UTMI_CTRL_USB_CLK_EN);
209 u2o_clear(base, UTMI_CTRL, 1<<UTMI_CTRL_PWR_UP_SHIFT);
210 u2o_clear(base, UTMI_CTRL, 1<<UTMI_CTRL_PLL_PWR_UP_SHIFT);