summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2015-07-29 00:08:59 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-29 00:13:24 -0700
commit07ca3749cec2b8c7967d73cfa030a144610d3d4e (patch)
tree5f3632c738b560e190c17b6dc6de9ba20a7d7a6d /drivers/net/ethernet/stmicro
parent149adedd7696cbcf1d72d143ca181334000d0ee7 (diff)
downloadlinux-07ca3749cec2b8c7967d73cfa030a144610d3d4e.tar.gz
linux-07ca3749cec2b8c7967d73cfa030a144610d3d4e.tar.bz2
linux-07ca3749cec2b8c7967d73cfa030a144610d3d4e.zip
stmmac: dwmac-sti: use custom of match structure
Create a new private structure for OF match data in the dwmac-sti driver. This enables us to eventually drop the common OF match data structure which contains a lot of unused fields. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 8a977fde1a46..83c501edb688 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -131,6 +131,11 @@ struct sti_dwmac {
u32 speed;
};
+struct sti_dwmac_of_data {
+ void (*fix_mac_speed)(void *priv, unsigned int speed);
+ int (*init)(struct platform_device *pdev, void *priv);
+};
+
static u32 phy_intf_sels[] = {
[PHY_INTERFACE_MODE_MII] = ETH_PHY_SEL_MII,
[PHY_INTERFACE_MODE_GMII] = ETH_PHY_SEL_GMII,
@@ -338,7 +343,7 @@ static int sti_dwmac_parse_data(struct sti_dwmac *dwmac,
static int sti_dwmac_probe(struct platform_device *pdev)
{
struct plat_stmmacenet_data *plat_dat;
- const struct stmmac_of_data *data;
+ const struct sti_dwmac_of_data *data;
struct stmmac_resources stmmac_res;
struct sti_dwmac *dwmac;
int ret;
@@ -379,12 +384,12 @@ static int sti_dwmac_probe(struct platform_device *pdev)
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
-static const struct stmmac_of_data stih4xx_dwmac_data = {
+static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
.fix_mac_speed = stih4xx_fix_retime_src,
.init = stix4xx_init,
};
-static const struct stmmac_of_data stid127_dwmac_data = {
+static const struct sti_dwmac_of_data stid127_dwmac_data = {
.fix_mac_speed = stid127_fix_retime_src,
.init = stid127_init,
};