Lines Matching refs:base
117 void __iomem *base;
125 static unsigned int u2o_get(void __iomem *base, unsigned int offset)
127 return readl_relaxed(base + offset);
130 static void u2o_set(void __iomem *base, unsigned int offset,
135 reg = readl_relaxed(base + offset);
137 writel_relaxed(reg, base + offset);
138 readl_relaxed(base + offset);
141 static void u2o_clear(void __iomem *base, unsigned int offset,
146 reg = readl_relaxed(base + offset);
148 writel_relaxed(reg, base + offset);
149 readl_relaxed(base + offset);
152 static void u2o_write(void __iomem *base, unsigned int offset,
155 writel_relaxed(value, base + offset);
156 readl_relaxed(base + offset);
162 void __iomem *base = pxa_usb_phy->base;
169 u2o_set(base, UTMI_CTRL, (1<<UTMI_CTRL_INPKT_DELAY_SOF_SHIFT)
173 u2o_set(base, UTMI_CTRL, 1<<UTMI_CTRL_PLL_PWR_UP_SHIFT);
174 u2o_set(base, UTMI_CTRL, 1<<UTMI_CTRL_PWR_UP_SHIFT);
177 u2o_clear(base, UTMI_PLL, UTMI_PLL_PLLVDD18_MASK
182 u2o_set(base, UTMI_PLL, 0xee<<UTMI_PLL_FBDIV_SHIFT
188 u2o_clear(base, UTMI_TX, UTMI_TX_REG_EXT_FS_RCAL_EN_MASK
192 u2o_set(base, UTMI_TX, 3<<UTMI_TX_TXVDD12_SHIFT
197 u2o_clear(base, UTMI_RX, UTMI_RX_SQ_THRESH_MASK
199 u2o_set(base, UTMI_RX, 7<<UTMI_RX_SQ_THRESH_SHIFT
208 u2o_write(base, UTMI_IVREF, 0x4bf);
213 u2o_set(base, UTMI_PLL, VCOCAL_START);
215 u2o_clear(base, UTMI_PLL, VCOCAL_START);
219 u2o_set(base, UTMI_TX, REG_RCAL_START);
221 u2o_clear(base, UTMI_TX, REG_RCAL_START);
226 while ((u2o_get(base, UTMI_PLL) & PLL_READY) == 0) {
231 u2o_get(base, UTMI_PLL));
237 u2o_set(base, UTMI_RESERVE, 1 << 5);
239 u2o_write(base, UTMI_OTG_ADDON, 1);
249 void __iomem *base = pxa_usb_phy->base;
254 u2o_clear(base, UTMI_OTG_ADDON, UTMI_OTG_ADDON_OTG_ON);
256 u2o_clear(base, UTMI_CTRL, UTMI_CTRL_RXBUF_PDWN);
257 u2o_clear(base, UTMI_CTRL, UTMI_CTRL_TXBUF_PDWN);
258 u2o_clear(base, UTMI_CTRL, UTMI_CTRL_USB_CLK_EN);
259 u2o_clear(base, UTMI_CTRL, 1<<UTMI_CTRL_PWR_UP_SHIFT);
260 u2o_clear(base, UTMI_CTRL, 1<<UTMI_CTRL_PLL_PWR_UP_SHIFT);
303 pxa_usb_phy->base = devm_platform_ioremap_resource(pdev, 0);
304 if (IS_ERR(pxa_usb_phy->base)) {
306 return PTR_ERR(pxa_usb_phy->base);