Commit fbcc0e2c authored by Haiying Wang's avatar Haiying Wang Committed by David S. Miller

fsl_pq_mido: Set the first UCC as the mii management interface master

Current code makes the UCC whose register range includes the current mdio
register to be the MII managemnt interface master of the QE. If there is more
than one mdio bus for QE, the UCC of the last mdio bus will be the MII
management interface master which will make the primary mdio bus working
unproperly, e.g. can not get the right clock. Normally the primary mdio bus is
the first UEC's mdio bus.
This patch allows the first UCC to be the MII management interface master of the
multiple UCC mdio buses.
Signed-off-by: default avatarHaiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 32d0c1e1
...@@ -301,13 +301,17 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev, ...@@ -301,13 +301,17 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
of_device_is_compatible(np, "ucc_geth_phy")) { of_device_is_compatible(np, "ucc_geth_phy")) {
#ifdef CONFIG_UCC_GETH #ifdef CONFIG_UCC_GETH
u32 id; u32 id;
static u32 mii_mng_master;
tbipa = &regs->utbipar; tbipa = &regs->utbipar;
if ((err = get_ucc_id_for_range(addr, addr + size, &id))) if ((err = get_ucc_id_for_range(addr, addr + size, &id)))
goto err_free_irqs; goto err_free_irqs;
ucc_set_qe_mux_mii_mng(id - 1); if (!mii_mng_master) {
mii_mng_master = id;
ucc_set_qe_mux_mii_mng(id - 1);
}
#else #else
err = -ENODEV; err = -ENODEV;
goto err_free_irqs; goto err_free_irqs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment