Commit a993e0f5 authored by Quentin Schulz's avatar Quentin Schulz Committed by David S. Miller

net: phy: mscc: read 'vsc8531,vddmac' as an u32

In the DT binding, it is specified nowhere that 'vsc8531,vddmac' is an
u16, even though it's read as an u16 in the driver.

Let's update the driver to take into consideration that the
'vsc8531,vddmac' property is of the default type u32.
Signed-off-by: default avatarQuentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0969abaa
...@@ -128,7 +128,7 @@ struct vsc8531_private { ...@@ -128,7 +128,7 @@ struct vsc8531_private {
#ifdef CONFIG_OF_MDIO #ifdef CONFIG_OF_MDIO
struct vsc8531_edge_rate_table { struct vsc8531_edge_rate_table {
u16 vddmac; u32 vddmac;
u8 slowdown[8]; u8 slowdown[8];
}; };
...@@ -387,7 +387,7 @@ static void vsc85xx_wol_get(struct phy_device *phydev, ...@@ -387,7 +387,7 @@ static void vsc85xx_wol_get(struct phy_device *phydev,
static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)
{ {
u8 sd; u8 sd;
u16 vdd; u32 vdd;
int rc, i, j; int rc, i, j;
struct device *dev = &phydev->mdio.dev; struct device *dev = &phydev->mdio.dev;
struct device_node *of_node = dev->of_node; struct device_node *of_node = dev->of_node;
...@@ -396,7 +396,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) ...@@ -396,7 +396,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)
if (!of_node) if (!of_node)
return -ENODEV; return -ENODEV;
rc = of_property_read_u16(of_node, "vsc8531,vddmac", &vdd); rc = of_property_read_u32(of_node, "vsc8531,vddmac", &vdd);
if (rc != 0) if (rc != 0)
vdd = MSCC_VDDMAC_3300; vdd = MSCC_VDDMAC_3300;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment