From: "Marek Behún" <kabel@kernel.org>
To: Ramon Fried <rfried.dev@gmail.com>
Cc: "Joe Hershberger" <joe.hershberger@ni.com>,
u-boot@lists.denx.de, "Marek Behún" <marek.behun@nic.cz>,
"Grygorii Strashko" <grygorii.strashko@ti.com>,
"Murali Karicheri" <m-karicheri2@ti.com>
Subject: [PATCH u-boot-net 3/3] driver: net: ti: keystone_net: Change priv member type
Date: Mon, 11 Apr 2022 21:20:55 +0200 [thread overview]
Message-ID: <20220411192055.31080-4-kabel@kernel.org> (raw)
In-Reply-To: <20220411192055.31080-1-kabel@kernel.org>
From: Marek Behún <marek.behun@nic.cz>
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>
---
drivers/net/ti/keystone_net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 3c1f616086..fbec69f571 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) {
--
2.35.1
next prev parent reply other threads:[~2022-04-11 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 19:20 [PATCH u-boot-net 0/3] A tiny batch of keystone_net changes Marek Behún
2022-04-11 19:20 ` [PATCH u-boot-net 1/3] driver: net: ti: keystone_net: Deduplicate code Marek Behún
2022-04-12 19:53 ` Ramon Fried
2022-04-11 19:20 ` [PATCH u-boot-net 2/3] driver: net: ti: keystone_net: Convert to ofnode functions Marek Behún
2022-04-12 19:54 ` Ramon Fried
2022-04-11 19:20 ` Marek Behún [this message]
2022-04-12 19:54 ` [PATCH u-boot-net 3/3] driver: net: ti: keystone_net: Change priv member type Ramon Fried
2022-04-12 19:57 ` [PATCH u-boot-net 0/3] A tiny batch of keystone_net changes Ramon Fried
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220411192055.31080-4-kabel@kernel.org \
--to=kabel@kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=joe.hershberger@ni.com \
--cc=m-karicheri2@ti.com \
--cc=marek.behun@nic.cz \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.