提交 75cea9cb 编写于 作者: V Vladimir Oltean 提交者: David S. Miller

net: dsa: felix: use ocelot_field_{read,write} helpers consistently

Since these helpers for regmap fields are available, use them.
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 42ccf1cd
......@@ -727,7 +727,7 @@ static int vsc9959_gcb_soft_rst_status(struct ocelot *ocelot)
{
int val;
regmap_field_read(ocelot->regfields[GCB_SOFT_RST_SWC_RST], &val);
ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val);
return val;
}
......@@ -742,7 +742,7 @@ static int vsc9959_reset(struct ocelot *ocelot)
int val, err;
/* soft-reset the switch core */
regmap_field_write(ocelot->regfields[GCB_SOFT_RST_SWC_RST], 1);
ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1);
err = readx_poll_timeout(vsc9959_gcb_soft_rst_status, ocelot, val, !val,
VSC9959_GCB_RST_SLEEP, VSC9959_INIT_TIMEOUT);
......@@ -762,7 +762,7 @@ static int vsc9959_reset(struct ocelot *ocelot)
}
/* enable switch core */
regmap_field_write(ocelot->regfields[SYS_RESET_CFG_CORE_ENA], 1);
ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册