Home
last modified time | relevance | path

Searched refs:portsc (Results 1 – 25 of 45) sorted by relevance

12

/openbmc/linux/drivers/usb/cdns3/
H A Dcdnsp-debug.h430 static inline const char *cdnsp_portsc_link_state_string(u32 portsc) in cdnsp_portsc_link_state_string() argument
432 switch (portsc & PORT_PLS_MASK) { in cdnsp_portsc_link_state_string()
467 u32 portsc) in cdnsp_decode_portsc() argument
472 portsc & PORT_POWER ? "Powered" : "Powered-off", in cdnsp_decode_portsc()
473 portsc & PORT_CONNECT ? "Connected" : "Not-connected", in cdnsp_decode_portsc()
474 portsc & PORT_PED ? "Enabled" : "Disabled", in cdnsp_decode_portsc()
475 cdnsp_portsc_link_state_string(portsc), in cdnsp_decode_portsc()
476 DEV_PORT_SPEED(portsc)); in cdnsp_decode_portsc()
478 if (portsc & PORT_RESET) in cdnsp_decode_portsc()
482 if (portsc & PORT_CSC) in cdnsp_decode_portsc()
[all …]
H A Dcdnsp-ring.c263 cdnsp_set_link_state(pdev, &pdev->active_port->regs->portsc, XDEV_U0); in cdnsp_force_l0_go()
792 u32 portsc, cmd_regs; in cdnsp_handle_port_status() local
812 portsc = readl(&port_regs->portsc); in cdnsp_handle_port_status()
813 writel(cdnsp_port_state_to_neutral(portsc) | in cdnsp_handle_port_status()
814 (portsc & PORT_CHANGE_BITS), &port_regs->portsc); in cdnsp_handle_port_status()
816 trace_cdnsp_handle_port_status(pdev->active_port->port_num, portsc); in cdnsp_handle_port_status()
818 pdev->gadget.speed = cdnsp_port_speed(portsc); in cdnsp_handle_port_status()
819 link_state = portsc & PORT_PLS_MASK; in cdnsp_handle_port_status()
822 if ((portsc & PORT_PLC)) { in cdnsp_handle_port_status()
829 if (DEV_SUPERSPEED_ANY(portsc)) { in cdnsp_handle_port_status()
[all …]
H A Dcdnsp-trace.h772 TP_PROTO(u32 portnum, u32 portsc),
773 TP_ARGS(portnum, portsc),
776 __field(u32, portsc)
780 __entry->portsc = portsc;
785 __entry->portsc)
790 TP_PROTO(u32 portnum, u32 portsc),
791 TP_ARGS(portnum, portsc)
795 TP_PROTO(u32 portnum, u32 portsc),
796 TP_ARGS(portnum, portsc)
H A Dcdnsp-gadget.c135 u32 portsc = readl(port_regs); in cdnsp_clear_port_change_bit() local
137 writel(cdnsp_port_state_to_neutral(portsc) | in cdnsp_clear_port_change_bit()
138 (portsc & PORT_CHANGE_BITS), port_regs); in cdnsp_clear_port_change_bit()
1279 cdnsp_set_link_state(pdev, &pdev->usb3_port.regs->portsc, in cdnsp_run()
1282 cdnsp_disable_port(pdev, &pdev->usb3_port.regs->portsc); in cdnsp_run()
1285 cdnsp_set_link_state(pdev, &pdev->usb2_port.regs->portsc, in cdnsp_run()
1438 cdnsp_disable_port(pdev, &pdev->usb2_port.regs->portsc); in cdnsp_stop()
1439 cdnsp_disable_port(pdev, &pdev->usb3_port.regs->portsc); in cdnsp_stop()
1448 cdnsp_clear_port_change_bit(pdev, &pdev->usb2_port.regs->portsc); in cdnsp_stop()
1449 cdnsp_clear_port_change_bit(pdev, &pdev->usb3_port.regs->portsc); in cdnsp_stop()
[all …]
/openbmc/linux/drivers/usb/early/
H A Dehci-dbgp.c495 u32 ctrl, portsc, cmd; in _dbgp_external_startup() local
509 portsc = readl(&ehci_regs->port_status[dbg_port - 1]); in _dbgp_external_startup()
510 if (!(portsc & PORT_CONNECT) && try_hard_once) { in _dbgp_external_startup()
518 portsc = readl(&ehci_regs->port_status[dbg_port - 1]); in _dbgp_external_startup()
519 portsc |= PORT_TEST_PKT; in _dbgp_external_startup()
520 writel(portsc, &ehci_regs->port_status[dbg_port - 1]); in _dbgp_external_startup()
546 portsc = readl(&ehci_regs->port_status[dbg_port - 1]); in _dbgp_external_startup()
547 portsc &= ~PORT_PE; in _dbgp_external_startup()
548 writel(portsc, &ehci_regs->port_status[dbg_port - 1]); in _dbgp_external_startup()
610 u32 portsc; in ehci_reset_port() local
[all …]
H A Dxhci-dbc.c351 void __iomem *portsc; in xdbc_do_reset_debug_port() local
360 portsc = ops_reg + 0x400 + i * 0x10; in xdbc_do_reset_debug_port()
361 val = readl(portsc); in xdbc_do_reset_debug_port()
363 writel(val | PORT_RESET, portsc); in xdbc_do_reset_debug_port()
436 ret = handshake(&xdbc.xdbc_reg->portsc, PORTSC_CONN_STATUS, PORTSC_CONN_STATUS, 5000000, 100); in xdbc_start()
693 port_reg = readl(&xdbc.xdbc_reg->portsc); in xdbc_handle_port_status()
714 writel(port_reg, &xdbc.xdbc_reg->portsc); in xdbc_handle_port_status()
/openbmc/linux/drivers/usb/host/
H A Dxhci-hub.c284 u32 portsc; in xhci_usb2_hub_descriptor() local
301 portsc = readl(rhub->ports[i]->addr); in xhci_usb2_hub_descriptor()
305 if (portsc & PORT_DEV_REMOVE) in xhci_usb2_hub_descriptor()
338 u32 portsc; in xhci_usb3_hub_descriptor() local
358 portsc = readl(rhub->ports[i]->addr); in xhci_usb3_hub_descriptor()
359 if (portsc & PORT_DEV_REMOVE) in xhci_usb3_hub_descriptor()
584 u32 portsc; in xhci_disable_port() local
600 portsc = readl(port->addr); in xhci_disable_port()
601 portsc = xhci_port_state_to_neutral(portsc); in xhci_disable_port()
604 writel(portsc | PORT_PE, port->addr); in xhci_disable_port()
[all …]
H A Dxhci-dbgcap.c681 u32 portsc; in dbc_handle_port_status() local
683 portsc = readl(&dbc->regs->portsc); in dbc_handle_port_status()
684 if (portsc & DBC_PORTSC_CONN_CHANGE) in dbc_handle_port_status()
687 if (portsc & DBC_PORTSC_RESET_CHANGE) in dbc_handle_port_status()
690 if (portsc & DBC_PORTSC_LINK_CHANGE) in dbc_handle_port_status()
693 if (portsc & DBC_PORTSC_CONFIG_CHANGE) in dbc_handle_port_status()
697 writel(portsc & ~DBC_PORTSC_RESET_CHANGE, &dbc->regs->portsc); in dbc_handle_port_status()
813 u32 ctrl, portsc; in xhci_dbc_do_handle_events() local
823 portsc = readl(&dbc->regs->portsc); in xhci_dbc_do_handle_events()
824 if (portsc & DBC_PORTSC_CONN_STATUS) { in xhci_dbc_do_handle_events()
[all …]
H A Dxhci-trace.h512 TP_PROTO(u32 portnum, u32 portsc),
513 TP_ARGS(portnum, portsc),
516 __field(u32, portsc)
520 __entry->portsc = portsc;
524 xhci_decode_portsc(__get_buf(XHCI_MSG_MAX), __entry->portsc)
529 TP_PROTO(u32 portnum, u32 portsc),
530 TP_ARGS(portnum, portsc)
534 TP_PROTO(u32 portnum, u32 portsc),
535 TP_ARGS(portnum, portsc)
539 TP_PROTO(u32 portnum, u32 portsc),
[all …]
H A Dxhci-debugfs.c349 u32 portsc; in xhci_portsc_show() local
352 portsc = readl(port->addr); in xhci_portsc_show()
353 seq_printf(s, "%s\n", xhci_decode_portsc(str, portsc)); in xhci_portsc_show()
370 u32 portsc; in xhci_port_write() local
382 portsc = readl(port->addr); in xhci_port_write()
383 if ((portsc & PORT_PLS_MASK) != XDEV_RXDETECT) { in xhci_port_write()
387 portsc = xhci_port_state_to_neutral(portsc); in xhci_port_write()
388 portsc &= ~PORT_PLS_MASK; in xhci_port_write()
389 portsc |= PORT_LINK_STROBE | XDEV_COMP_MODE; in xhci_port_write()
390 writel(portsc, port->addr); in xhci_port_write()
H A Dxhci.h2338 static inline const char *xhci_portsc_link_state_string(u32 portsc) in xhci_portsc_link_state_string() argument
2340 switch (portsc & PORT_PLS_MASK) { in xhci_portsc_link_state_string()
2373 static inline const char *xhci_decode_portsc(char *str, u32 portsc) in xhci_decode_portsc() argument
2378 portsc & PORT_POWER ? "Powered" : "Powered-off", in xhci_decode_portsc()
2379 portsc & PORT_CONNECT ? "Connected" : "Not-connected", in xhci_decode_portsc()
2380 portsc & PORT_PE ? "Enabled" : "Disabled", in xhci_decode_portsc()
2381 xhci_portsc_link_state_string(portsc), in xhci_decode_portsc()
2382 DEV_PORT_SPEED(portsc)); in xhci_decode_portsc()
2384 if (portsc & PORT_OC) in xhci_decode_portsc()
2386 if (portsc & PORT_RESET) in xhci_decode_portsc()
[all …]
H A Dehci-fsl.c195 u32 portsc, tmp; in ehci_fsl_setup_phy() local
206 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy()
207 portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW); in ehci_fsl_setup_phy()
224 portsc |= PORT_PTS_ULPI; in ehci_fsl_setup_phy()
227 portsc |= PORT_PTS_SERIAL; in ehci_fsl_setup_phy()
230 portsc |= PORT_PTS_PTW; in ehci_fsl_setup_phy()
270 portsc |= PORT_PTS_UTMI; in ehci_fsl_setup_phy()
283 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy()
H A Dehci.h659 ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) in ehci_port_speed() argument
662 switch ((portsc >> (ehci->has_hostpc ? 25 : 26)) & 3) { in ehci_port_speed()
679 #define ehci_port_speed(ehci, portsc) USB_PORT_STAT_HIGH_SPEED argument
716 #define ehci_has_ci_pec_bug(e, portsc) \ argument
718 && !(portsc & PORT_PEC) && !(portsc & PORT_PE))
H A Dxhci-tegra.c2041 static enum usb_device_speed tegra_xhci_portsc_to_speed(struct tegra_xusb *tegra, u32 portsc) in tegra_xhci_portsc_to_speed() argument
2043 if (DEV_LOWSPEED(portsc)) in tegra_xhci_portsc_to_speed()
2046 if (DEV_HIGHSPEED(portsc)) in tegra_xhci_portsc_to_speed()
2049 if (DEV_FULLSPEED(portsc)) in tegra_xhci_portsc_to_speed()
2052 if (DEV_SUPERSPEED_ANY(portsc)) in tegra_xhci_portsc_to_speed()
2067 u32 portsc; in tegra_xhci_enable_phy_sleepwalk_wake() local
2094 portsc = readl(rhub->ports[index]->addr); in tegra_xhci_enable_phy_sleepwalk_wake()
2095 speed = tegra_xhci_portsc_to_speed(tegra, portsc); in tegra_xhci_enable_phy_sleepwalk_wake()
2172 u32 portsc; in tegra_xusb_enter_elpg() local
2189 portsc = readl(xhci->usb2_rhub.ports[i]->addr); in tegra_xusb_enter_elpg()
[all …]
H A Dxhci-pci.c898 u32 portsc; in xhci_pci_poweroff_late() local
915 portsc = readl(port->addr); in xhci_pci_poweroff_late()
917 if ((portsc & PORT_PLS_MASK) != XDEV_U3) in xhci_pci_poweroff_late()
936 portsc = xhci_port_state_to_neutral(portsc); in xhci_pci_poweroff_late()
937 writel(portsc | PORT_PE, port->addr); in xhci_pci_poweroff_late()
/openbmc/qemu/hw/usb/
H A Dhcd-ehci.c695 uint32_t *portsc = &s->portsc[port->index]; in ehci_attach() local
696 const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; in ehci_attach()
700 if (*portsc & PORTSC_POWNER) { in ehci_attach()
707 *portsc |= PORTSC_CONNECT; in ehci_attach()
708 *portsc |= PORTSC_CSC; in ehci_attach()
716 uint32_t *portsc = &s->portsc[port->index]; in ehci_detach() local
717 const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; in ehci_detach()
721 if (*portsc & PORTSC_POWNER) { in ehci_detach()
729 *portsc &= ~PORTSC_POWNER; in ehci_detach()
736 *portsc &= ~(PORTSC_CONNECT|PORTSC_PED|PORTSC_SUSPEND); in ehci_detach()
[all …]
H A Dhcd-xhci.c2614 if ((port->portsc & bits) == bits) { in xhci_port_notify()
2618 port->portsc |= bits; in xhci_port_notify()
2630 port->portsc = PORTSC_PP; in xhci_port_update()
2632 port->portsc |= PORTSC_CCS; in xhci_port_update()
2635 port->portsc |= PORTSC_SPEED_LOW; in xhci_port_update()
2639 port->portsc |= PORTSC_SPEED_FULL; in xhci_port_update()
2643 port->portsc |= PORTSC_SPEED_HIGH; in xhci_port_update()
2647 port->portsc |= PORTSC_SPEED_SUPER; in xhci_port_update()
2648 port->portsc |= PORTSC_PED; in xhci_port_update()
2653 set_field(&port->portsc, pls, PORTSC_PLS); in xhci_port_update()
[all …]
/openbmc/u-boot/drivers/usb/host/
H A Dehci-vf.c183 writel((PORT_PTS_UTMI | PORT_PTS_PTW), &ehci->portsc); in ehci_hcd_init()
184 setbits_le32(&ehci->portsc, USB_EN); in ehci_hcd_init()
187 writel((PORT_PTS_UTMI | PORT_PTS_PTW), &ehci->portsc); in ehci_hcd_init()
188 setbits_le32(&ehci->portsc, USB_EN); in ehci_hcd_init()
283 writel((PORT_PTS_UTMI | PORT_PTS_PTW), &ehci->portsc); in vf_init_after_reset()
284 setbits_le32(&ehci->portsc, USB_EN); in vf_init_after_reset()
329 writel((PORT_PTS_UTMI | PORT_PTS_PTW), &ehci->portsc); in ehci_usb_probe()
330 setbits_le32(&ehci->portsc, USB_EN); in ehci_usb_probe()
H A Dehci-mx6.c375 writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); in ehci_hcd_init()
376 setbits_le32(&ehci->portsc, USB_EN); in ehci_hcd_init()
423 writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); in mx6_init_after_reset()
424 setbits_le32(&ehci->portsc, USB_EN); in mx6_init_after_reset()
543 writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); in ehci_usb_probe()
544 setbits_le32(&ehci->portsc, USB_EN); in ehci_usb_probe()
H A Dehci-mx5.c254 __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); in ehci_hcd_init()
255 setbits_le32(&ehci->portsc, USB_EN); in ehci_hcd_init()
/openbmc/linux/drivers/usb/gadget/udc/
H A Dmv_udc_core.c1006 u32 tmp, portsc; in udc_reset() local
1043 portsc = readl(&udc->op_regs->portsc[0]); in udc_reset()
1045 portsc &= (~PORTSCX_W1C_BITS | ~PORTSCX_PORT_POWER); in udc_reset()
1048 portsc |= PORTSCX_FORCE_FULL_SPEED_CONNECT; in udc_reset()
1050 portsc &= (~PORTSCX_FORCE_FULL_SPEED_CONNECT); in udc_reset()
1052 writel(portsc, &udc->op_regs->portsc[0]); in udc_reset()
1131 u32 portsc; in mv_udc_wakeup() local
1137 portsc = readl(&udc->op_regs->portsc); in mv_udc_wakeup()
1139 if (!(portsc & PORTSCX_PORT_SUSPEND)) in mv_udc_wakeup()
1142 portsc |= PORTSCX_PORT_FORCE_RESUME; in mv_udc_wakeup()
[all …]
H A Dtegra-xudc.c2980 u32 portsc, porthalt; in __tegra_xudc_handle_port_status() local
2990 portsc = xudc_readl(xudc, PORTSC); in __tegra_xudc_handle_port_status()
2991 if ((portsc & PORTSC_PRC) && (portsc & PORTSC_PR)) { in __tegra_xudc_handle_port_status()
2992 dev_dbg(xudc->dev, "PRC, PR, PORTSC = %#x\n", portsc); in __tegra_xudc_handle_port_status()
3002 if ((portsc & PORTSC_PRC) && !(portsc & PORTSC_PR)) { in __tegra_xudc_handle_port_status()
3003 dev_dbg(xudc->dev, "PRC, Not PR, PORTSC = %#x\n", portsc); in __tegra_xudc_handle_port_status()
3010 portsc = xudc_readl(xudc, PORTSC); in __tegra_xudc_handle_port_status()
3011 if (portsc & PORTSC_WRC) { in __tegra_xudc_handle_port_status()
3012 dev_dbg(xudc->dev, "WRC, PORTSC = %#x\n", portsc); in __tegra_xudc_handle_port_status()
3018 portsc = xudc_readl(xudc, PORTSC); in __tegra_xudc_handle_port_status()
[all …]
/openbmc/linux/drivers/usb/phy/
H A Dphy-fsl-usb.c158 tmp = fsl_readl(&usb_dr_regs->portsc) & ~PORTSC_W1C_BITS; in fsl_otg_drv_vbus()
159 fsl_writel(tmp | PORTSC_PORT_POWER, &usb_dr_regs->portsc); in fsl_otg_drv_vbus()
161 tmp = fsl_readl(&usb_dr_regs->portsc) & in fsl_otg_drv_vbus()
163 fsl_writel(tmp, &usb_dr_regs->portsc); in fsl_otg_drv_vbus()
194 tmp = fsl_readl(&fsl_otg_dev->dr_mem_map->portsc) & ~PORTSC_W1C_BITS; in fsl_otg_loc_sof()
200 fsl_writel(tmp, &fsl_otg_dev->dr_mem_map->portsc); in fsl_otg_loc_sof()
908 temp = fsl_readl(&p_otg->dr_mem_map->portsc); in usb_otg_start()
923 fsl_writel(temp, &p_otg->dr_mem_map->portsc); in usb_otg_start()
/openbmc/u-boot/drivers/usb/gadget/
H A Dci_udc.h19 u32 portsc; /* 0x174 */ member
40 u32 portsc; /* 0x184 */ member
/openbmc/linux/drivers/usb/fotg210/
H A Dfotg210-hcd.h611 fotg210_get_speed(struct fotg210_hcd *fotg210, unsigned int portsc) in fotg210_get_speed() argument
619 fotg210_port_speed(struct fotg210_hcd *fotg210, unsigned int portsc) in fotg210_port_speed() argument
621 switch (fotg210_get_speed(fotg210, portsc)) { in fotg210_port_speed()

12