Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Pass the phy ID to dwc_gmac_attach.



details:   https://anonhg.NetBSD.org/src/rev/fadccbfa7b04
branches:  trunk
changeset: 449126:fadccbfa7b04
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Feb 23 17:18:07 2019 +0000

description:
Pass the phy ID to dwc_gmac_attach.

diffstat:

 sys/dev/ic/dwc_gmac.c     |  8 ++++----
 sys/dev/ic/dwc_gmac_var.h |  5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (53 lines):

diff -r 7416aa05cd6a -r fadccbfa7b04 sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c     Sat Feb 23 12:28:22 2019 +0000
+++ b/sys/dev/ic/dwc_gmac.c     Sat Feb 23 17:18:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.56 2019/01/22 03:42:26 msaitoh Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.57 2019/02/23 17:18:07 martin Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.56 2019/01/22 03:42:26 msaitoh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.57 2019/02/23 17:18:07 martin Exp $");
 
 /* #define     DWC_GMAC_DEBUG  1 */
 
@@ -185,7 +185,7 @@
 #endif
 
 int
-dwc_gmac_attach(struct dwc_gmac_softc *sc, uint32_t mii_clk)
+dwc_gmac_attach(struct dwc_gmac_softc *sc, int phy_id, uint32_t mii_clk)
 {
        uint8_t enaddr[ETHER_ADDR_LEN];
        uint32_t maclo, machi, ver, hwft;
@@ -306,7 +306,7 @@
         mii->mii_readreg = dwc_gmac_miibus_read_reg;
         mii->mii_writereg = dwc_gmac_miibus_write_reg;
         mii->mii_statchg = dwc_gmac_miibus_statchg;
-        mii_attach(sc->sc_dev, mii, 0xffffffff, MII_PHY_ANY, MII_OFFSET_ANY,
+        mii_attach(sc->sc_dev, mii, phy_id, MII_PHY_ANY, MII_OFFSET_ANY,
            MIIF_DOPAUSE);
 
         if (LIST_EMPTY(&mii->mii_phys)) {
diff -r 7416aa05cd6a -r fadccbfa7b04 sys/dev/ic/dwc_gmac_var.h
--- a/sys/dev/ic/dwc_gmac_var.h Sat Feb 23 12:28:22 2019 +0000
+++ b/sys/dev/ic/dwc_gmac_var.h Sat Feb 23 17:18:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac_var.h,v 1.12 2018/10/08 17:09:31 martin Exp $ */
+/* $NetBSD: dwc_gmac_var.h,v 1.13 2019/02/23 17:18:07 martin Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -117,5 +117,6 @@
        void (*sc_set_speed)(struct dwc_gmac_softc *, int);
 };
 
-int dwc_gmac_attach(struct dwc_gmac_softc*, uint32_t /*mii_clk*/);
+int dwc_gmac_attach(struct dwc_gmac_softc*, int /*phy_id*/,
+    uint32_t /*mii_clk*/);
 int dwc_gmac_intr(struct dwc_gmac_softc*);



Home | Main Index | Thread Index | Old Index