OSDN Git Service

net: hisilicon: add support of acpi for hns-mdio
authorKejian Yan <yankejian@huawei.com>
Fri, 3 Jun 2016 02:55:12 +0000 (10:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Jun 2016 01:32:40 +0000 (21:32 -0400)
commit8a99ff5ab4f4f209358b177b376660066c9c4400
tree47964310f160ccfa6909b2fcacded79c470a2297
parent16a9f36150aa3cc516e8df0d1a979b5ca0c907ba
net: hisilicon: add support of acpi for hns-mdio

hns-mdio needs to register itself to mii-bus. The info of the device can
be read by both DT and ACPI.
HNS tries to call Linux PHY driver to help access PHY-devices, the HNS
hardware topology is as below. The MDIO controller may control several
PHY-devices, and each PHY-device connects to a MAC device. The MDIO will
be registered to mdiobus, then PHY-devices will register when each mac
find PHY device.
                       cpu
                        |
                        |
     -------------------------------------------
    |                   |                       |
    |                   |                       |
    |                  dsaf                     |
   MDIO                 |                      MDIO
    |      ---------------------------          |
    |     |         |         |       |         |
    |     |         |         |       |         |
    |    MAC       MAC       MAC     MAC        |
    |     |         |         |       |         |
     ---- |-------- |-------- |       | --------
         ||        ||        ||       ||
         PHY       PHY       PHY     PHY

And the driver can handle reset sequence by _RST method in DSDT in ACPI
case.

Signed-off-by: Kejian Yan <yankejian@huawei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns_mdio.c