Lines Matching refs:lane

447 static int tegra210_usb3_lane_map(struct tegra_xusb_lane *lane)  in tegra210_usb3_lane_map()  argument
452 if (map->index == lane->index && in tegra210_usb3_lane_map()
453 strcmp(map->type, lane->pad->soc->name) == 0) { in tegra210_usb3_lane_map()
454 dev_dbg(lane->pad->padctl->dev, "lane = %s map to port = usb3-%d\n", in tegra210_usb3_lane_map()
455 lane->pad->soc->lanes[lane->index].name, map->port); in tegra210_usb3_lane_map()
706 struct tegra_xusb_lane *lane = tegra_xusb_find_lane(padctl, "sata", 0); in tegra210_sata_uphy_enable() local
716 if (IS_ERR(lane)) in tegra210_sata_uphy_enable()
722 usb = tegra_xusb_lane_check(lane, "usb3-ss"); in tegra210_sata_uphy_enable()
1058 static int tegra210_usb3_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, in tegra210_usb3_enable_phy_sleepwalk() argument
1061 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_enable_phy_sleepwalk()
1062 int port = tegra210_usb3_lane_map(lane); in tegra210_usb3_enable_phy_sleepwalk()
1090 static int tegra210_usb3_disable_phy_sleepwalk(struct tegra_xusb_lane *lane) in tegra210_usb3_disable_phy_sleepwalk() argument
1092 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_disable_phy_sleepwalk()
1093 int port = tegra210_usb3_lane_map(lane); in tegra210_usb3_disable_phy_sleepwalk()
1119 static int tegra210_usb3_enable_phy_wake(struct tegra_xusb_lane *lane) in tegra210_usb3_enable_phy_wake() argument
1121 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_enable_phy_wake()
1122 int port = tegra210_usb3_lane_map(lane); in tegra210_usb3_enable_phy_wake()
1150 static int tegra210_usb3_disable_phy_wake(struct tegra_xusb_lane *lane) in tegra210_usb3_disable_phy_wake() argument
1152 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_disable_phy_wake()
1153 int port = tegra210_usb3_lane_map(lane); in tegra210_usb3_disable_phy_wake()
1181 static bool tegra210_usb3_phy_remote_wake_detected(struct tegra_xusb_lane *lane) in tegra210_usb3_phy_remote_wake_detected() argument
1183 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_phy_remote_wake_detected()
1184 int index = tegra210_usb3_lane_map(lane); in tegra210_usb3_phy_remote_wake_detected()
1197 static int tegra210_utmi_enable_phy_wake(struct tegra_xusb_lane *lane) in tegra210_utmi_enable_phy_wake() argument
1199 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_utmi_enable_phy_wake()
1200 unsigned int index = lane->index; in tegra210_utmi_enable_phy_wake()
1222 static int tegra210_utmi_disable_phy_wake(struct tegra_xusb_lane *lane) in tegra210_utmi_disable_phy_wake() argument
1224 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_utmi_disable_phy_wake()
1225 unsigned int index = lane->index; in tegra210_utmi_disable_phy_wake()
1247 static bool tegra210_utmi_phy_remote_wake_detected(struct tegra_xusb_lane *lane) in tegra210_utmi_phy_remote_wake_detected() argument
1249 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_utmi_phy_remote_wake_detected()
1250 unsigned int index = lane->index; in tegra210_utmi_phy_remote_wake_detected()
1261 static int tegra210_hsic_enable_phy_wake(struct tegra_xusb_lane *lane) in tegra210_hsic_enable_phy_wake() argument
1263 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_enable_phy_wake()
1264 unsigned int index = lane->index; in tegra210_hsic_enable_phy_wake()
1286 static int tegra210_hsic_disable_phy_wake(struct tegra_xusb_lane *lane) in tegra210_hsic_disable_phy_wake() argument
1288 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_disable_phy_wake()
1289 unsigned int index = lane->index; in tegra210_hsic_disable_phy_wake()
1311 static bool tegra210_hsic_phy_remote_wake_detected(struct tegra_xusb_lane *lane) in tegra210_hsic_phy_remote_wake_detected() argument
1313 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_remote_wake_detected()
1314 unsigned int index = lane->index; in tegra210_hsic_phy_remote_wake_detected()
1335 static int tegra210_pmc_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, in tegra210_pmc_utmi_enable_phy_sleepwalk() argument
1338 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_utmi_enable_phy_sleepwalk()
1340 unsigned int port = lane->index; in tegra210_pmc_utmi_enable_phy_sleepwalk()
1508 static int tegra210_pmc_utmi_disable_phy_sleepwalk(struct tegra_xusb_lane *lane) in tegra210_pmc_utmi_disable_phy_sleepwalk() argument
1510 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_utmi_disable_phy_sleepwalk()
1512 unsigned int port = lane->index; in tegra210_pmc_utmi_disable_phy_sleepwalk()
1556 static int tegra210_pmc_hsic_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, in tegra210_pmc_hsic_enable_phy_sleepwalk() argument
1559 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_hsic_enable_phy_sleepwalk()
1658 static int tegra210_pmc_hsic_disable_phy_sleepwalk(struct tegra_xusb_lane *lane) in tegra210_pmc_hsic_disable_phy_sleepwalk() argument
1660 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_hsic_disable_phy_sleepwalk()
1699 struct tegra_xusb_lane *lane; in tegra210_usb3_set_lfps_detect() local
1706 lane = port->lane; in tegra210_usb3_set_lfps_detect()
1708 if (lane->pad == padctl->pcie) in tegra210_usb3_set_lfps_detect()
1709 offset = XUSB_PADCTL_UPHY_MISC_PAD_PX_CTL1(lane->index); in tegra210_usb3_set_lfps_detect()
1781 static void tegra210_usb2_lane_remove(struct tegra_xusb_lane *lane) in tegra210_usb2_lane_remove() argument
1783 struct tegra_xusb_usb2_lane *usb2 = to_usb2_lane(lane); in tegra210_usb2_lane_remove()
1800 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb2_phy_init() local
1801 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_init()
1802 unsigned int index = lane->index; in tegra210_usb2_phy_init()
1835 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb2_phy_exit() local
1836 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_exit()
1840 port = tegra_xusb_find_usb2_port(padctl, lane->index); in tegra210_usb2_phy_exit()
1842 dev_err(&phy->dev, "no port found for USB2 lane %u\n", lane->index); in tegra210_usb2_phy_exit()
1916 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb2_phy_set_mode() local
1917 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_set_mode()
1919 lane->index); in tegra210_usb2_phy_set_mode()
1954 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb2_phy_power_on() local
1955 struct tegra_xusb_usb2_lane *usb2 = to_usb2_lane(lane); in tegra210_usb2_phy_power_on()
1956 struct tegra_xusb_usb2_pad *pad = to_usb2_pad(lane->pad); in tegra210_usb2_phy_power_on()
1957 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_power_on()
1960 unsigned int index = lane->index; in tegra210_usb2_phy_power_on()
2114 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb2_phy_power_off() local
2115 struct tegra_xusb_usb2_pad *pad = to_usb2_pad(lane->pad); in tegra210_usb2_phy_power_off()
2116 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_power_off()
2120 port = tegra_xusb_find_usb2_port(padctl, lane->index); in tegra210_usb2_phy_power_off()
2123 lane->index); in tegra210_usb2_phy_power_off()
2277 static void tegra210_hsic_lane_remove(struct tegra_xusb_lane *lane) in tegra210_hsic_lane_remove() argument
2279 struct tegra_xusb_hsic_lane *hsic = to_hsic_lane(lane); in tegra210_hsic_lane_remove()
2296 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_hsic_phy_init() local
2297 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_init()
2317 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_hsic_phy_power_on() local
2318 struct tegra_xusb_hsic_lane *hsic = to_hsic_lane(lane); in tegra210_hsic_phy_power_on()
2319 struct tegra_xusb_hsic_pad *pad = to_hsic_pad(lane->pad); in tegra210_hsic_phy_power_on()
2320 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_power_on()
2321 unsigned int index = lane->index; in tegra210_hsic_phy_power_on()
2402 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_hsic_phy_power_off() local
2403 struct tegra_xusb_hsic_pad *pad = to_hsic_pad(lane->pad); in tegra210_hsic_phy_power_off()
2404 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_power_off()
2405 unsigned int index = lane->index; in tegra210_hsic_phy_power_off()
2496 static void tegra210_uphy_lane_iddq_enable(struct tegra_xusb_lane *lane) in tegra210_uphy_lane_iddq_enable() argument
2498 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_uphy_lane_iddq_enable()
2501 value = padctl_readl(padctl, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_enable()
2512 padctl_writel(padctl, value, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_enable()
2515 static void tegra210_uphy_lane_iddq_disable(struct tegra_xusb_lane *lane) in tegra210_uphy_lane_iddq_disable() argument
2517 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_uphy_lane_iddq_disable()
2520 value = padctl_readl(padctl, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_disable()
2531 padctl_writel(padctl, value, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_disable()
2563 tegra210_lane_to_usb3_port(struct tegra_xusb_lane *lane) in tegra210_lane_to_usb3_port() argument
2567 if (!lane || !lane->pad || !lane->pad->padctl) in tegra210_lane_to_usb3_port()
2570 port = tegra210_usb3_lane_map(lane); in tegra210_lane_to_usb3_port()
2574 return tegra_xusb_find_usb3_port(lane->pad->padctl, port); in tegra210_lane_to_usb3_port()
2580 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb3_phy_power_on() local
2581 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_phy_power_on()
2582 struct tegra_xusb_usb3_port *usb3 = tegra210_lane_to_usb3_port(lane); in tegra210_usb3_phy_power_on()
2587 dev_err(dev, "no USB3 port found for lane %u\n", lane->index); in tegra210_usb3_phy_power_on()
2653 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_usb3_phy_power_off() local
2654 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_phy_power_off()
2655 struct tegra_xusb_usb3_port *usb3 = tegra210_lane_to_usb3_port(lane); in tegra210_usb3_phy_power_off()
2660 dev_err(dev, "no USB3 port found for lane %u\n", lane->index); in tegra210_usb3_phy_power_off()
2710 static void tegra210_pcie_lane_remove(struct tegra_xusb_lane *lane) in tegra210_pcie_lane_remove() argument
2712 struct tegra_xusb_pcie_lane *pcie = to_pcie_lane(lane); in tegra210_pcie_lane_remove()
2731 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_pcie_phy_init() local
2732 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pcie_phy_init()
2745 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_pcie_phy_power_on() local
2746 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pcie_phy_power_on()
2751 if (tegra_xusb_lane_check(lane, "usb3-ss")) in tegra210_pcie_phy_power_on()
2760 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_pcie_phy_power_off() local
2761 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pcie_phy_power_off()
2766 if (tegra_xusb_lane_check(lane, "usb3-ss")) in tegra210_pcie_phy_power_off()
2880 static void tegra210_sata_lane_remove(struct tegra_xusb_lane *lane) in tegra210_sata_lane_remove() argument
2882 struct tegra_xusb_sata_lane *sata = to_sata_lane(lane); in tegra210_sata_lane_remove()
2901 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_sata_phy_init() local
2902 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_sata_phy_init()
2914 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_sata_phy_power_on() local
2915 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_sata_phy_power_on()
2920 if (tegra_xusb_lane_check(lane, "usb3-ss")) in tegra210_sata_phy_power_on()
2929 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra210_sata_phy_power_off() local
2930 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_sata_phy_power_off()
2935 if (tegra_xusb_lane_check(lane, "usb3-ss")) in tegra210_sata_phy_power_off()
3089 struct tegra_xusb_lane *lane; in tegra210_utmi_port_reset() local
3092 lane = phy_get_drvdata(phy); in tegra210_utmi_port_reset()
3093 padctl = lane->pad->padctl; in tegra210_utmi_port_reset()
3096 XUSB_PADCTL_USB2_BATTERY_CHRG_OTGPADX_CTL0(lane->index)); in tegra210_utmi_port_reset()
3204 struct tegra_xusb_lane *lane; in tegra210_xusb_padctl_restore() local
3213 list_for_each_entry(lane, &padctl->lanes, list) { in tegra210_xusb_padctl_restore()
3214 if (lane->pad->ops->iddq_enable) in tegra210_xusb_padctl_restore()
3215 tegra210_uphy_lane_iddq_enable(lane); in tegra210_xusb_padctl_restore()
3221 list_for_each_entry(lane, &padctl->lanes, list) { in tegra210_xusb_padctl_restore()
3222 if (lane->pad->ops->iddq_disable) in tegra210_xusb_padctl_restore()
3223 tegra210_uphy_lane_iddq_disable(lane); in tegra210_xusb_padctl_restore()