• Home
  • Raw
  • Download

Lines Matching refs:reg

109 	unsigned int reg;  in hisi_usb_eye_config()  local
113 reg = readl(MISC_REG_BASE + USB2_PHY0); in hisi_usb_eye_config()
114 reg &= ~USB2_PHY0_TXVREFTUNE; in hisi_usb_eye_config()
115 reg &= ~USB2_PHY0_TXPRE; in hisi_usb_eye_config()
116 reg |= USB2_PHY0_VREF_VAL; in hisi_usb_eye_config()
117 reg |= USB2_PHY0_PRE_VAL; in hisi_usb_eye_config()
118 writel(reg, MISC_REG_BASE + USB2_PHY0); in hisi_usb_eye_config()
123 reg = readl(MISC_REG_BASE + USB2_PHY1); in hisi_usb_eye_config()
124 reg &= ~USB2_PHY1_TXVREFTUNE; in hisi_usb_eye_config()
125 reg &= ~USB2_PHY1_TXPRE; in hisi_usb_eye_config()
126 reg |= USB2_PHY1_VREF_VAL; in hisi_usb_eye_config()
127 reg |= USB2_PHY1_PRE_VAL; in hisi_usb_eye_config()
128 writel(reg, MISC_REG_BASE + USB2_PHY1); in hisi_usb_eye_config()
132 reg = readl(USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb_eye_config()
133 reg &= ~USB3_TX_MARGIN; in hisi_usb_eye_config()
134 reg |= USB3_TX_MARGIN_VAL; in hisi_usb_eye_config()
135 writel(reg, USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb_eye_config()
140 unsigned int reg; in hisi_usb_config() local
143 reg = readl(USB3_CTRL_CFG); in hisi_usb_config()
144 reg &= ~(USB2_DEF_CFG_MASK); in hisi_usb_config()
145 reg |= USB2_DEF_CRG; in hisi_usb_config()
146 writel(reg, USB3_CTRL_CFG); in hisi_usb_config()
150 reg = readl(USB3_CTRL_CFG); in hisi_usb_config()
151 reg |= USB2_VCC_SRST_REQ; in hisi_usb_config()
152 writel(reg, USB3_CTRL_CFG); in hisi_usb_config()
156 reg = readl(USB2_PHY_CFG); in hisi_usb_config()
157 reg &= ~USB2_PHY1_PORT_TREQ; in hisi_usb_config()
158 writel(reg, USB2_PHY_CFG); in hisi_usb_config()
162 reg = readl(USB3_CTRL_CFG); in hisi_usb_config()
163 reg &= ~USB2_UTMI_CKSEL; in hisi_usb_config()
164 writel(reg, USB3_CTRL_CFG); in hisi_usb_config()
168 reg = readl(USB2_PHY_CFG); in hisi_usb_config()
169 reg |= USB2_PHY1_CKEN; in hisi_usb_config()
170 writel(reg, USB2_PHY_CFG); in hisi_usb_config()
174 reg = readl(USB2_PHY_CFG); in hisi_usb_config()
175 reg &= ~USB2_PHY1_REQ; in hisi_usb_config()
176 writel(reg, USB2_PHY_CFG); in hisi_usb_config()
180 reg = readl(USB3_CTRL_CFG); in hisi_usb_config()
181 reg &= ~USB2_VCC_SRST_REQ; in hisi_usb_config()
182 writel(reg, USB3_CTRL_CFG); in hisi_usb_config()
186 reg = readl(USB2_CTRL_REG_BASE + REG_GCTL); in hisi_usb_config()
187 reg &= ~PORT_CAP_DIR; in hisi_usb_config()
188 reg |= DEFAULT_HOST_MOD; in hisi_usb_config()
189 writel(reg, USB2_CTRL_REG_BASE + REG_GCTL); in hisi_usb_config()
195 unsigned int reg; in hisi_usb3_init_crg_clk() local
197 reg = readl(USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
198 reg &= ~(USB3_DEF_CFG_MASK); in hisi_usb3_init_crg_clk()
199 reg |= USB3_DEF_CRG; in hisi_usb3_init_crg_clk()
200 writel(reg, USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
204 reg = readl(MISC_REG_BASE + USB_PORT0); in hisi_usb3_init_crg_clk()
205 reg |= U3_PORT_DISABLE; in hisi_usb3_init_crg_clk()
206 writel(reg, MISC_REG_BASE + USB_PORT0); in hisi_usb3_init_crg_clk()
212 reg = readl(REG_BASE_SCTL + REG_SYSSTAT); in hisi_usb3_init_crg_clk()
213 if (get_combphy_mode(reg) == USB3) { in hisi_usb3_init_crg_clk()
215 reg = readl(USB3_COMBPHY_CFG); in hisi_usb3_init_crg_clk()
216 reg |= COMBPHY_SRST_REQ; in hisi_usb3_init_crg_clk()
217 writel(reg, USB3_COMBPHY_CFG); in hisi_usb3_init_crg_clk()
219 } else if (get_combphy_mode(reg) == PCIE_X1) { in hisi_usb3_init_crg_clk()
221 reg = readl(USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
222 reg |= USB3_PCLK_OCC_SEL; in hisi_usb3_init_crg_clk()
223 writel(reg, USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
228 reg = readl(USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
229 reg &= ~USB2_PHY0_PORT_TREQ; in hisi_usb3_init_crg_clk()
230 writel(reg, USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
234 reg = readl(USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
235 reg &= ~USB3_UTMI_CKSEL; in hisi_usb3_init_crg_clk()
236 writel(reg, USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
240 reg = readl(USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
241 reg |= USB2_PHY0_CKEN; in hisi_usb3_init_crg_clk()
242 writel(reg, USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
248 unsigned int reg; in hisi_usb3_config() local
254 reg = readl(USB2_PHY_CFG); in hisi_usb3_config()
255 reg &= ~USB2_PHY0_REQ; in hisi_usb3_config()
256 writel(reg, USB2_PHY_CFG); in hisi_usb3_config()
260 reg = readl(REG_BASE_SCTL + REG_SYSSTAT); in hisi_usb3_config()
261 if (get_combphy_mode(reg) == USB3) { in hisi_usb3_config()
263 reg = readl(USB3_COMBPHY_CFG); in hisi_usb3_config()
264 reg |= COMBPHY0_REF_CKEN; in hisi_usb3_config()
265 writel(reg, USB3_COMBPHY_CFG); in hisi_usb3_config()
268 reg = readl(USB3_COMBPHY_CFG); in hisi_usb3_config()
269 reg &= ~COMBPHY_SRST_REQ; in hisi_usb3_config()
270 writel(reg, USB3_COMBPHY_CFG); in hisi_usb3_config()
275 reg = readl(USB3_CTRL_CFG); in hisi_usb3_config()
276 reg &= ~USB3_VCC_SRST_REQ; in hisi_usb3_config()
277 writel(reg, USB3_CTRL_CFG); in hisi_usb3_config()
280 reg = readl(USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
281 reg |= PCS_SSP_SOFT_RESET; in hisi_usb3_config()
282 writel(reg, USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
286 reg = readl(USB3_CTRL_REG_BASE + REG_GCTL); in hisi_usb3_config()
287 reg &= ~PORT_CAP_DIR; in hisi_usb3_config()
288 reg |= DEFAULT_HOST_MOD; in hisi_usb3_config()
289 writel(reg, USB3_CTRL_REG_BASE + REG_GCTL); in hisi_usb3_config()
292 reg = readl(USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
293 reg &= ~PCS_SSP_SOFT_RESET; in hisi_usb3_config()
294 reg &= ~SUSPEND_USB3_SS_PHY; /* disable suspend */ in hisi_usb3_config()
295 writel(reg, USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
315 unsigned int reg; in xhci_hcd_stop() local
318 reg = readl(USB3_CTRL_CFG); in xhci_hcd_stop()
319 reg |= USB2_VCC_SRST_REQ; in xhci_hcd_stop()
320 writel(reg, USB3_CTRL_CFG); in xhci_hcd_stop()
324 reg = readl(USB3_CTRL_CFG); in xhci_hcd_stop()
325 reg |= USB3_VCC_SRST_REQ; in xhci_hcd_stop()
326 writel(reg, USB3_CTRL_CFG); in xhci_hcd_stop()
329 reg = readl(REG_BASE_SCTL + REG_SYSSTAT); in xhci_hcd_stop()
330 if (get_combphy_mode(reg) == USB3) { in xhci_hcd_stop()
332 reg = readl(USB3_COMBPHY_CFG); in xhci_hcd_stop()
333 reg |= COMBPHY_SRST_REQ; in xhci_hcd_stop()
334 writel(reg, USB3_COMBPHY_CFG); in xhci_hcd_stop()