Date: Sun, 6 May 2012 23:03:19 +0000 (UTC) From: Damjan Marion <dmarion@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r235113 - projects/armv6/sys/arm/ti/cpsw Message-ID: <201205062303.q46N3JTr035769@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dmarion Date: Sun May 6 23:03:19 2012 New Revision: 235113 URL: http://svn.freebsd.org/changeset/base/235113 Log: Fix cpsw driver on beaglebone after r234858 Modified: projects/armv6/sys/arm/ti/cpsw/if_cpsw.c projects/armv6/sys/arm/ti/cpsw/if_cpswvar.h Modified: projects/armv6/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- projects/armv6/sys/arm/ti/cpsw/if_cpsw.c Sun May 6 22:50:07 2012 (r235112) +++ projects/armv6/sys/arm/ti/cpsw/if_cpsw.c Sun May 6 23:03:19 2012 (r235113) @@ -76,8 +76,6 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -static struct cpsw_softc *cpsw_sc = NULL; - static int cpsw_probe(device_t dev); static int cpsw_attach(device_t dev); static int cpsw_detach(device_t dev); @@ -227,11 +225,8 @@ cpsw_attach(device_t dev) memcpy(sc->mac_addr, mac_addr, ETHER_ADDR_LEN); sc->node = ofw_bus_get_node(dev); - if (device_get_unit(dev) == 0) - cpsw_sc = sc; - /* Get phy address from fdt */ - if (fdt_get_phyaddr(sc->node, &phy) != 0) { + if (fdt_get_phyaddr(sc->node, sc->dev, &phy, (void **)&sc->phy_sc) != 0) { device_printf(dev, "failed to get PHY address from FDT\n"); return (ENXIO); } Modified: projects/armv6/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- projects/armv6/sys/arm/ti/cpsw/if_cpswvar.h Sun May 6 22:50:07 2012 (r235112) +++ projects/armv6/sys/arm/ti/cpsw/if_cpswvar.h Sun May 6 23:03:19 2012 (r235113) @@ -70,6 +70,8 @@ struct cpsw_softc { int eoq; int tc[CPSW_MAX_TX_BUFFERS]; int tc_unload[CPSW_MAX_TX_BUFFERS]; + + struct cpsw_softc *phy_sc; }; #define CPDMA_BD_SOP (1<<15)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205062303.q46N3JTr035769>