Lines Matching +full:num +full:- +full:ss +full:- +full:bits
1 // SPDX-License-Identifier: GPL-2.0+
10 * Copyright (C) 2014 Ricardo Ribalda - Qtechnology/AS
16 /*-------------------------------------------------------------------------*/
26 writel(index, ®s->idxaddr); in get_idx_reg()
28 return readl(®s->idxdata); in get_idx_reg()
34 writel(index, ®s->idxaddr); in set_idx_reg()
35 writel(value, ®s->idxdata); in set_idx_reg()
74 /*-------------------------------------------------------------------------*/
86 /*-------------------------------------------------------------------------*/
100 /* analogous to a host-side qh */
103 unsigned num : 8, member
120 &ep->regs->ep_rsp); in allow_status()
121 ep->stopped = 1; in allow_status()
131 writel(BIT(CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE), &ep->regs->ep_rsp); in allow_status_338x()
133 ep->stopped = 1; in allow_status_338x()
136 ep->responded = 0; in allow_status_338x()
194 ((ep->dev->chiprev == CHIPREV_1) << SET_NAK_OUT_PACKETS) | in set_halt()
196 &ep->regs->ep_rsp); in set_halt()
208 ((ep->dev->chiprev == CHIPREV_1) << CLEAR_NAK_OUT_PACKETS), in clear_halt()
209 &ep->regs->ep_rsp); in clear_halt()
219 * - A transition to this state indicates a fresh USB connection,
222 * - Starting state: This state can be thought of as the FSM's typical
224 * - Tip: Upon the first SS Control Read the FSM never
229 /* Non-SS Control Read:
230 * - A transition to this state indicates detection of the first HS
232 * - Tip: Upon the first SS Control Read the FSM never
237 /* SS Control Read:
238 * - A transition to this state indicates detection of the
239 * first SS Control Read.
240 * - This state indicates workaround completion. Workarounds no longer
242 * - Tip: Once in this state the FSM state does not change (until
244 * - This can be thought of as the final state of the FSM;
245 * the FSM 'locks-up' in this state until the chip loses power.
259 &dev->regs->gpioctl); in net2280_led_init()
262 /* indicate speed with bi-color LED 0/1 */
266 u32 val = readl(&dev->regs->gpioctl); in net2280_led_speed()
283 writel(val, &dev->regs->gpioctl); in net2280_led_speed()
289 u32 val = readl(&dev->regs->gpioctl); in net2280_led_active()
296 writel(val, &dev->regs->gpioctl); in net2280_led_active()
301 /* turn off all four GPIO*_DATA bits */ in net2280_led_shutdown()
302 writel(readl(&dev->regs->gpioctl) & ~0x0f, in net2280_led_shutdown()
303 &dev->regs->gpioctl); in net2280_led_shutdown()
314 /*-------------------------------------------------------------------------*/
317 dev_dbg((&((ndev)->pdev->dev)), fmt, ##args)
320 dev_vdbg((&((ndev)->pdev->dev)), fmt, ##args)
323 dev_info((&((ndev)->pdev->dev)), fmt, ##args)
326 dev_warn((&((ndev)->pdev->dev)), fmt, ##args)
329 dev_err((&((ndev)->pdev->dev)), fmt, ##args)
331 /*-------------------------------------------------------------------------*/
335 if (ep->dev->pdev->vendor == 0x17cc) in set_fifo_bytecount()
336 writeb(count, 2 + (u8 __iomem *) &ep->regs->ep_cfg); in set_fifo_bytecount()
338 u32 tmp = readl(&ep->cfg->ep_cfg) & in set_fifo_bytecount()
340 writel(tmp | (count << EP_FIFO_BYTE_COUNT), &ep->cfg->ep_cfg); in set_fifo_bytecount()
347 writel(BIT(SET_NAK_OUT_PACKETS), &ep->regs->ep_rsp); in start_out_naking()
349 readl(&ep->regs->ep_rsp); in start_out_naking()
356 tmp = readl(&ep->regs->ep_stat); in stop_out_naking()
358 writel(BIT(CLEAR_NAK_OUT_PACKETS), &ep->regs->ep_rsp); in stop_out_naking()
368 if (ep->dev->enhanced_mode) { in set_max_speed()
369 reg = ep_enhanced[ep->num]; in set_max_speed()
370 switch (ep->dev->gadget.speed) { in set_max_speed()
382 reg = (ep->num + 1) * 0x10; in set_max_speed()
383 if (ep->dev->gadget.speed != USB_SPEED_HIGH) in set_max_speed()
387 set_idx_reg(ep->dev->regs, reg, max); in set_max_speed()