mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 02:28:43 +04:00
realtek: mdio: enable global polling flag for RTL839x
The RTL839x has a global polling enable bit. This is set by the dsa driver and misses in the mdio driver. Before removing the dsa logic move the setup where it belongs. Link: https://github.com/openwrt/openwrt/pull/24918 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
1 parent
6eb718ab30
commit
2fb70bfb79
1 file changed
+9
@@ -141,6 +141,7 @@
|
||||
#define RTMD_839X_PHYREG_PORT_CTRL(x) (0x03e4 + (x) * 4)
|
||||
#define RTMD_839X_SMI_PORT_POLLING_CTRL 0x03fc
|
||||
#define RTMD_839X_SMI_GLB_CTRL 0x03f8
|
||||
#define RTMD_839X_SMI_GLB_MDX_POLLING_EN BIT(7)
|
||||
|
||||
#define RTMD_930X_SMI_GLB_CTRL 0xca00
|
||||
#define RTMD_930X_SMI_GLB_INTF_SEL(bus) BIT(16 + (bus))
|
||||
@@ -788,6 +789,13 @@ static int rtmd_838x_setup_polling(struct rtmd_ctrl *ctrl)
|
||||
test_bit(24, ctrl->phy_ports));
|
||||
}
|
||||
|
||||
static int rtmd_839x_setup_polling(struct rtmd_ctrl *ctrl)
|
||||
{
|
||||
/* This is the only device that has a global polling enable bit */
|
||||
return regmap_set_bits(ctrl->map, RTMD_839X_SMI_GLB_CTRL,
|
||||
RTMD_839X_SMI_GLB_MDX_POLLING_EN);
|
||||
}
|
||||
|
||||
static int rtmd_930x_setup_ctrl(struct rtmd_ctrl *ctrl)
|
||||
{
|
||||
int ret;
|
||||
@@ -1180,6 +1188,7 @@ static const struct rtmd_config rtmd_839x_cfg = {
|
||||
.poll_ctrl = RTMD_839X_SMI_PORT_POLLING_CTRL,
|
||||
.read_c22 = rtmd_839x_read_c22,
|
||||
.read_c45 = rtmd_839x_read_c45,
|
||||
.setup_polling = rtmd_839x_setup_polling,
|
||||
.write_c22 = rtmd_839x_write_c22,
|
||||
.write_c45 = rtmd_839x_write_c45,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user