aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fsl_pq_mdio.c
diff options
context:
space:
mode:
authorIonut Nicu <ionut.nicu@freescale.com>2009-06-24 18:23:39 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-25 23:03:53 -0400
commite2a61fa31382b1ac2b22f76f9c439892e5dc4b86 (patch)
tree9664d739beb3d23fa31e23c1f4925d68599d019f /drivers/net/fsl_pq_mdio.c
parenta1faa69810b2af562b70b2a71c116c7d03575dd3 (diff)
fsl_pq_mdio: Fix fsl_pq_mdio to work with modules
This patch fixes the case when ucc_geth or gianfar are compiled as modules. Without this patch the call to phy_connect() fails. Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fsl_pq_mdio.c')
-rw-r--r--drivers/net/fsl_pq_mdio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index 3af581303ca2..d167090248e2 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -188,7 +188,7 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
188} 188}
189 189
190 190
191#ifdef CONFIG_GIANFAR 191#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
192static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs) 192static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
193{ 193{
194 struct gfar __iomem *enet_regs; 194 struct gfar __iomem *enet_regs;
@@ -206,7 +206,7 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
206#endif 206#endif
207 207
208 208
209#ifdef CONFIG_UCC_GETH 209#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
210static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) 210static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
211{ 211{
212 struct device_node *np = NULL; 212 struct device_node *np = NULL;
@@ -291,7 +291,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
291 if (of_device_is_compatible(np, "fsl,gianfar-mdio") || 291 if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
292 of_device_is_compatible(np, "fsl,gianfar-tbi") || 292 of_device_is_compatible(np, "fsl,gianfar-tbi") ||
293 of_device_is_compatible(np, "gianfar")) { 293 of_device_is_compatible(np, "gianfar")) {
294#ifdef CONFIG_GIANFAR 294#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
295 tbipa = get_gfar_tbipa(regs); 295 tbipa = get_gfar_tbipa(regs);
296#else 296#else
297 err = -ENODEV; 297 err = -ENODEV;
@@ -299,7 +299,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
299#endif 299#endif
300 } else if (of_device_is_compatible(np, "fsl,ucc-mdio") || 300 } else if (of_device_is_compatible(np, "fsl,ucc-mdio") ||
301 of_device_is_compatible(np, "ucc_geth_phy")) { 301 of_device_is_compatible(np, "ucc_geth_phy")) {
302#ifdef CONFIG_UCC_GETH 302#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
303 u32 id; 303 u32 id;
304 static u32 mii_mng_master; 304 static u32 mii_mng_master;
305 305