realtek: pcs: add per-link port storage to rtpcs_serdes
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>
This commit is contained in:
parent
dbd9a35bf3
commit
c4f5c34fa4
@ -221,6 +221,7 @@ struct rtpcs_serdes {
|
||||
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;
|
||||
@ -4308,6 +4309,8 @@ static int rtpcs_probe(struct platform_device *pdev)
|
||||
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user