[PATCH 18/27] UBUNTU: SAUCE: fsl_pq_mdio: Add support for FMan
Andy Fleming
bcollins at ubuntu.com
Mon Jun 11 23:02:33 UTC 2012
This patch is being maintained and will eventually be merged upstream by
Freescale directly. The powerpc-e500mc flavour uses this.
Signed-off-by: Andy Fleming <afleming at freescale.com>
Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
Signed-off-by: Ben Collins <bcollins at ubuntu.com>
---
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index 935a1b6..7eee784 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -302,6 +302,7 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
of_device_is_compatible(np, "fsl,gianfar-tbi") ||
+ of_device_is_compatible(np, "fsl,fman-mdio") ||
of_device_is_compatible(np, "fsl,ucc-mdio") ||
of_device_is_compatible(np, "ucc_geth_phy"))
map -= offsetof(struct fsl_pq_mdio, miimcfg);
@@ -342,6 +343,13 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
mii_mng_master = id;
ucc_set_qe_mux_mii_mng(id - 1);
}
+ } else if (of_device_is_compatible(np, "fsl,fman-mdio")) {
+#ifdef CONFIG_FSL_FMAN
+ tbiaddr = 5;
+#else
+ err = -ENODEV;
+ goto err_free_irqs;
+#endif
} else {
err = -ENODEV;
goto err_free_irqs;
@@ -362,7 +370,9 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
err = -EBUSY;
goto err_free_irqs;
} else {
+#ifndef CONFIG_FSL_FMAN
out_be32(tbipa, tbiaddr);
+#endif
}
}
@@ -429,6 +439,9 @@ static struct of_device_id fsl_pq_mdio_match[] = {
{
.compatible = "fsl,etsec2-mdio",
},
+ {
+ .compatible = "fsl,fman-mdio",
+ },
{},
};
MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match);
--
1.7.9.5
More information about the kernel-team
mailing list