Add an s16 link_port[] array to struct rtpcs_serdes, initialised to
-1 in probe. This is preparatory storage for the port number that
each link serves; it will be populated in the follow-up fwnode_pcs
migration commit by scanning consumer DT nodes for their reg, and
consumed by the resolver when allocating rtpcs_link.
Assisted-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Link: https://github.com/openwrt/openwrt/pull/23539
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
struct regmap_field *usxgmii_submode; /* nullable, 93xx only */
} swcore_regs;
struct rtpcs_link *link[RTPCS_MAX_LINKS_PER_SDS];
+ s16 link_port[RTPCS_MAX_LINKS_PER_SDS];
enum rtpcs_sds_mode hw_mode;
u8 id;
sds->id = i;
sds->ops = ctrl->cfg->sds_ops;
sds->regs = ctrl->cfg->sds_regs;
+ for (int j = 0; j < RTPCS_MAX_LINKS_PER_SDS; j++)
+ sds->link_port[j] = -1;
ret = ctrl->cfg->sds_probe(sds);
if (ret)