Lines Matching full:lane
46 struct a38x_comphy_lane lane[MAX_A38X_COMPHY]; member
58 static void a38x_set_conf(struct a38x_comphy_lane *lane, bool enable) in a38x_set_conf() argument
60 struct a38x_comphy *priv = lane->priv; in a38x_set_conf()
66 conf |= BIT(lane->port); in a38x_set_conf()
68 conf &= ~BIT(lane->port); in a38x_set_conf()
73 static void a38x_comphy_set_reg(struct a38x_comphy_lane *lane, in a38x_comphy_set_reg() argument
78 val = readl_relaxed(lane->base + offset) & ~mask; in a38x_comphy_set_reg()
79 writel(val | value, lane->base + offset); in a38x_comphy_set_reg()
82 static void a38x_comphy_set_speed(struct a38x_comphy_lane *lane, in a38x_comphy_set_speed() argument
85 a38x_comphy_set_reg(lane, COMPHY_CFG1, in a38x_comphy_set_speed()
91 static int a38x_comphy_poll(struct a38x_comphy_lane *lane, in a38x_comphy_poll() argument
97 ret = readl_relaxed_poll_timeout_atomic(lane->base + offset, val, in a38x_comphy_poll()
102 dev_err(lane->priv->dev, in a38x_comphy_poll()
103 "comphy%u: timed out waiting for status\n", lane->n); in a38x_comphy_poll()
114 struct a38x_comphy_lane *lane = phy_get_drvdata(phy); in a38x_comphy_set_mode() local
135 a38x_set_conf(lane, false); in a38x_comphy_set_mode()
137 a38x_comphy_set_speed(lane, gen, gen); in a38x_comphy_set_mode()
139 ret = a38x_comphy_poll(lane, COMPHY_STAT1, in a38x_comphy_set_mode()
146 a38x_set_conf(lane, true); in a38x_comphy_set_mode()
159 struct a38x_comphy_lane *lane; in a38x_comphy_xlate() local
170 lane = phy_get_drvdata(phy); in a38x_comphy_xlate()
171 if (lane->port >= 0) in a38x_comphy_xlate()
174 lane->port = args->args[0]; in a38x_comphy_xlate()
176 val = readl_relaxed(lane->priv->base + COMPHY_SELECTOR); in a38x_comphy_xlate()
177 val = (val >> (4 * lane->n)) & 0xf; in a38x_comphy_xlate()
179 if (!gbe_mux[lane->n][lane->port] || in a38x_comphy_xlate()
180 val != gbe_mux[lane->n][lane->port]) { in a38x_comphy_xlate()
181 dev_warn(lane->priv->dev, in a38x_comphy_xlate()
182 "comphy%u: not configured for GBE\n", lane->n); in a38x_comphy_xlate()
228 if (val >= MAX_A38X_COMPHY || priv->lane[val].base) { in a38x_comphy_probe()
239 priv->lane[val].base = base + 0x28 * val; in a38x_comphy_probe()
240 priv->lane[val].priv = priv; in a38x_comphy_probe()
241 priv->lane[val].n = val; in a38x_comphy_probe()
242 priv->lane[val].port = -1; in a38x_comphy_probe()
243 phy_set_drvdata(phy, &priv->lane[val]); in a38x_comphy_probe()