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>
This commit is contained in:
parent
a1faa69810
commit
e2a61fa313
@ -188,7 +188,7 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_GIANFAR
|
#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
|
||||||
static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
|
static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
|
||||||
{
|
{
|
||||||
struct gfar __iomem *enet_regs;
|
struct gfar __iomem *enet_regs;
|
||||||
@ -206,7 +206,7 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_UCC_GETH
|
#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
|
||||||
static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
|
static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
|
||||||
{
|
{
|
||||||
struct device_node *np = NULL;
|
struct device_node *np = NULL;
|
||||||
@ -291,7 +291,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
|
|||||||
if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
|
if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
|
||||||
of_device_is_compatible(np, "fsl,gianfar-tbi") ||
|
of_device_is_compatible(np, "fsl,gianfar-tbi") ||
|
||||||
of_device_is_compatible(np, "gianfar")) {
|
of_device_is_compatible(np, "gianfar")) {
|
||||||
#ifdef CONFIG_GIANFAR
|
#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
|
||||||
tbipa = get_gfar_tbipa(regs);
|
tbipa = get_gfar_tbipa(regs);
|
||||||
#else
|
#else
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
@ -299,7 +299,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
|
|||||||
#endif
|
#endif
|
||||||
} else if (of_device_is_compatible(np, "fsl,ucc-mdio") ||
|
} else if (of_device_is_compatible(np, "fsl,ucc-mdio") ||
|
||||||
of_device_is_compatible(np, "ucc_geth_phy")) {
|
of_device_is_compatible(np, "ucc_geth_phy")) {
|
||||||
#ifdef CONFIG_UCC_GETH
|
#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
|
||||||
u32 id;
|
u32 id;
|
||||||
static u32 mii_mng_master;
|
static u32 mii_mng_master;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user