aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek BehĂșn2022-04-11 21:20:55 +0200
committerRamon Fried2022-04-13 15:12:03 +0300
commitaf8b0a8d2c983a15232ff125292a65e4e6b8bd21 (patch)
tree7b2f3c510980c7169fc2916e44d07bfa97548166 /drivers
parent71b65d8210934d8d3fa4b9b697ff088b21a0f838 (diff)
driver: net: ti: keystone_net: Change priv member type
Change type of private struct member mdio_base from void * to phys_addr_t. This allows us to drop 2 casts. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ti/keystone_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 3c1f6160861..fbec69f5717 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -92,7 +92,7 @@ struct ks2_eth_priv {
phy_interface_t phy_if;
ofnode phy_ofnode;
int sgmii_link_type;
- void * mdio_base;
+ phys_addr_t mdio_base;
struct rx_buff_desc net_rx_buffs;
struct pktdma_cfg *netcp_pktdma;
void *hd;
@@ -569,7 +569,7 @@ static int ks2_eth_probe(struct udevice *dev)
* to re-use the same
*/
mdio_bus = cpsw_mdio_init("ethernet-mdio",
- (u32)priv->mdio_base,
+ priv->mdio_base,
EMAC_MDIO_CLOCK_FREQ,
EMAC_MDIO_BUS_FREQ);
if (!mdio_bus) {
@@ -701,7 +701,7 @@ static int ks2_eth_parse_slave_interface(ofnode netcp, ofnode slave,
pr_err("mdio dt not found\n");
return -ENODEV;
}
- priv->mdio_base = (void *)ofnode_get_addr(mdio);
+ priv->mdio_base = ofnode_get_addr(mdio);
}
if (priv->link_type == LINK_TYPE_SGMII_MAC_TO_PHY_MODE) {