• 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 int reg; in hisi_usb3_init_crg_clk() local
198 reg = readl(USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
199 reg &= ~(USB3_DEF_CFG_MASK); in hisi_usb3_init_crg_clk()
200 reg |= USB3_DEF_CRG; in hisi_usb3_init_crg_clk()
201 writel(reg, USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
205 reg = readl(MISC_REG_BASE + USB_PORT0); in hisi_usb3_init_crg_clk()
206 reg |= U3_PORT_DISABLE; in hisi_usb3_init_crg_clk()
207 writel(reg, MISC_REG_BASE + USB_PORT0); in hisi_usb3_init_crg_clk()
213 reg = readl(REG_BASE_SCTL + REG_SYSSTAT); in hisi_usb3_init_crg_clk()
214 if (get_combphy_mode(reg) == USB3) { in hisi_usb3_init_crg_clk()
216 reg = readl(USB3_COMBPHY_CFG); in hisi_usb3_init_crg_clk()
217 reg |= COMBPHY_SRST_REQ; in hisi_usb3_init_crg_clk()
218 writel(reg, USB3_COMBPHY_CFG); in hisi_usb3_init_crg_clk()
220 } else if (get_combphy_mode(reg) == PCIE_X1) { in hisi_usb3_init_crg_clk()
222 reg = readl(USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
223 reg |= USB3_PCLK_OCC_SEL; in hisi_usb3_init_crg_clk()
224 writel(reg, USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
229 reg = readl(USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
230 reg &= ~USB2_PHY0_PORT_TREQ; in hisi_usb3_init_crg_clk()
231 writel(reg, USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
235 reg = readl(USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
236 reg &= ~USB3_UTMI_CKSEL; in hisi_usb3_init_crg_clk()
237 writel(reg, USB3_CTRL_CFG); in hisi_usb3_init_crg_clk()
241 reg = readl(USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
242 reg |= USB2_PHY0_CKEN; in hisi_usb3_init_crg_clk()
243 writel(reg, USB2_PHY_CFG); in hisi_usb3_init_crg_clk()
249 unsigned int reg; in hisi_usb3_config() local
255 reg = readl(USB2_PHY_CFG); in hisi_usb3_config()
256 reg &= ~USB2_PHY0_REQ; in hisi_usb3_config()
257 writel(reg, USB2_PHY_CFG); in hisi_usb3_config()
261 reg = readl(REG_BASE_SCTL + REG_SYSSTAT); in hisi_usb3_config()
262 if (get_combphy_mode(reg) == USB3) { in hisi_usb3_config()
264 reg = readl(USB3_COMBPHY_CFG); in hisi_usb3_config()
265 reg |= COMBPHY0_REF_CKEN; in hisi_usb3_config()
266 writel(reg, USB3_COMBPHY_CFG); in hisi_usb3_config()
269 reg = readl(USB3_COMBPHY_CFG); in hisi_usb3_config()
270 reg &= ~COMBPHY_SRST_REQ; in hisi_usb3_config()
271 writel(reg, USB3_COMBPHY_CFG); in hisi_usb3_config()
276 reg = readl(USB3_CTRL_CFG); in hisi_usb3_config()
277 reg &= ~USB3_VCC_SRST_REQ; in hisi_usb3_config()
278 writel(reg, USB3_CTRL_CFG); in hisi_usb3_config()
281 reg = readl(USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
282 reg |= PCS_SSP_SOFT_RESET; in hisi_usb3_config()
283 writel(reg, USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
287 reg = readl(USB3_CTRL_REG_BASE + REG_GCTL); in hisi_usb3_config()
288 reg &= ~PORT_CAP_DIR; in hisi_usb3_config()
289 reg |= DEFAULT_HOST_MOD; in hisi_usb3_config()
290 writel(reg, USB3_CTRL_REG_BASE + REG_GCTL); in hisi_usb3_config()
293 reg = readl(USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
294 reg &= ~PCS_SSP_SOFT_RESET; in hisi_usb3_config()
295 reg &= ~SUSPEND_USB3_SS_PHY; /* disable suspend */ in hisi_usb3_config()
296 writel(reg, USB3_CTRL_REG_BASE + REG_GUSB3PIPECTL0); in hisi_usb3_config()
316 unsigned int reg; in xhci_hcd_stop() local
319 reg = readl(USB3_CTRL_CFG); in xhci_hcd_stop()
320 reg |= USB2_VCC_SRST_REQ; in xhci_hcd_stop()
321 writel(reg, USB3_CTRL_CFG); in xhci_hcd_stop()
325 reg = readl(USB3_CTRL_CFG); in xhci_hcd_stop()
326 reg |= USB3_VCC_SRST_REQ; in xhci_hcd_stop()
327 writel(reg, USB3_CTRL_CFG); in xhci_hcd_stop()
330 reg = readl(REG_BASE_SCTL + REG_SYSSTAT); in xhci_hcd_stop()
331 if (get_combphy_mode(reg) == USB3) { in xhci_hcd_stop()
333 reg = readl(USB3_COMBPHY_CFG); in xhci_hcd_stop()
334 reg |= COMBPHY_SRST_REQ; in xhci_hcd_stop()
335 writel(reg, USB3_COMBPHY_CFG); in xhci_hcd_stop()