Lines Matching refs:lane
216 struct padctl_lane *lane; member
253 struct padctl_lane *lane);
255 struct padctl_lane *lane);
262 static int usb2_powerup(struct padctl_softc *sc, struct padctl_lane *lane);
263 static int usb2_powerdown(struct padctl_softc *sc, struct padctl_lane *lane);
264 static int pcie_powerup(struct padctl_softc *sc, struct padctl_lane *lane);
265 static int pcie_powerdown(struct padctl_softc *sc, struct padctl_lane *lane);
266 static int sata_powerup(struct padctl_softc *sc, struct padctl_lane *lane);
267 static int sata_powerdown(struct padctl_softc *sc, struct padctl_lane *lane);
358 struct padctl_lane *lane);
408 pcie_powerup(struct padctl_softc *sc, struct padctl_lane *lane) in pcie_powerup() argument
441 reg |= USB3_PAD_MUX_PCIE_IDDQ_DISABLE(lane->idx); in pcie_powerup()
448 pcie_powerdown(struct padctl_softc *sc, struct padctl_lane *lane) in pcie_powerdown() argument
453 reg &= ~USB3_PAD_MUX_PCIE_IDDQ_DISABLE(lane->idx); in pcie_powerdown()
466 sata_powerup(struct padctl_softc *sc, struct padctl_lane *lane) in sata_powerup() argument
511 sata_powerdown(struct padctl_softc *sc, struct padctl_lane *lane) in sata_powerdown() argument
545 usb2_powerup(struct padctl_softc *sc, struct padctl_lane *lane) in usb2_powerup() argument
551 port = search_lane_port(sc, lane); in usb2_powerup()
554 lane->name); in usb2_powerup()
564 reg &= ~USB2_PORT_CAP_PORT_CAP(lane->idx, ~0); in usb2_powerup()
565 reg |= USB2_PORT_CAP_PORT_CAP(lane->idx, USB2_PORT_CAP_PORT_CAP_HOST); in usb2_powerup()
568 reg = RD4(sc, XUSB_PADCTL_USB2_OTG_PAD_CTL0(lane->idx)); in usb2_powerup()
577 if (lane->idx == 0) { in usb2_powerup()
584 WR4(sc, XUSB_PADCTL_USB2_OTG_PAD_CTL0(lane->idx), reg); in usb2_powerup()
586 reg = RD4(sc, XUSB_PADCTL_USB2_OTG_PAD_CTL1(lane->idx)); in usb2_powerup()
595 WR4(sc, XUSB_PADCTL_USB2_OTG_PAD_CTL1(lane->idx), reg); in usb2_powerup()
613 usb2_powerdown(struct padctl_softc *sc, struct padctl_lane *lane) in usb2_powerdown() argument
619 port = search_lane_port(sc, lane); in usb2_powerdown()
622 lane->name); in usb2_powerdown()
691 struct padctl_lane *lane; in xusbpadctl_phy_enable() local
703 lane = lanes_tbl + id; in xusbpadctl_phy_enable()
704 if (!lane->enabled) { in xusbpadctl_phy_enable()
706 lane->name); in xusbpadctl_phy_enable()
709 pad = lane->pad; in xusbpadctl_phy_enable()
720 rv = pad->powerup(sc, lane); in xusbpadctl_phy_enable()
722 rv = pad->powerdown(sc, lane); in xusbpadctl_phy_enable()
755 search_lane_port(struct padctl_softc *sc, struct padctl_lane *lane) in search_lane_port() argument
762 if (ports_tbl[i].lane == lane) in search_lane_port()
798 struct padctl_lane *lane, *tmp; in search_usb3_pad_lane() local
800 lane = NULL; in search_usb3_pad_lane()
810 if (lane != NULL) { in search_usb3_pad_lane()
812 " lanes: %s and %s\n", lane->name, tmp->name); in search_usb3_pad_lane()
815 lane = tmp; in search_usb3_pad_lane()
817 return (lane); in search_usb3_pad_lane()
833 search_mux(struct padctl_softc *sc, struct padctl_lane *lane, char *fnc_name) in search_mux() argument
837 for (i = 0; i < lane->nmux; i++) { in search_mux()
838 if (strcmp(fnc_name, lane->mux[i]) == 0) in search_mux()
845 config_lane(struct padctl_softc *sc, struct padctl_lane *lane) in config_lane() argument
849 reg = RD4(sc, lane->reg); in config_lane()
850 reg &= ~(lane->mask << lane->shift); in config_lane()
851 reg |= (lane->mux_idx & lane->mask) << lane->shift; in config_lane()
852 WR4(sc, lane->reg, reg); in config_lane()
859 struct padctl_lane *lane; in process_lane() local
874 lane = search_lane(sc, name); in process_lane()
875 if (lane == NULL) { in process_lane()
889 lane->mux_idx = search_mux(sc, lane, function); in process_lane()
890 if (lane->mux_idx == ~0) { in process_lane()
897 rv = config_lane(sc, lane); in process_lane()
904 lane->pad = pad; in process_lane()
905 lane->enabled = true; in process_lane()
906 pad->lanes[pad->nlanes++] = lane; in process_lane()
910 phy_init.id = lane - lanes_tbl; in process_lane()
1026 if (port->lane == NULL) { in process_port()
1030 port->lane = search_pad_lane(sc, PADCTL_PAD_USB2, in process_port()
1034 port->lane = search_pad_lane(sc, PADCTL_PAD_ULPI, in process_port()
1038 port->lane = search_pad_lane(sc, PADCTL_PAD_HSIC, in process_port()
1042 port->lane = search_usb3_pad_lane(sc, port->idx); in process_port()
1046 if (port->lane == NULL) { in process_port()