aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/b44.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-06-10b44: Utilize BRCM_PSEUDO_PHY_ADDRFlorian Fainelli1-2/+6
What B44 has been locally using as B44_PHY_ADDR_NO_LOCAL_PHY is in fact the Broadcom Ethernet switches pseudo-PHY address (30). Update the header to use the newly introduced constant and update comments so they are within 80 columns and consistent. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: use fixed PHY device if we do not find anyHauke Mehrtens1-0/+3
The ADM6996L switch and some Broadcom switches with two MII interfaces like the BCM5325F connected to two MACs on the SoC, used on some routers do not return a valid value when reading the PHY id register and Linux thinks there is no PHY at all, but that is wrong. This patch registers a fixed phy in the arch code and then searches it when there is no other phy in the Ethernet driver code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: add phylib supportHauke Mehrtens1-0/+3
Most of the older home routers based on the Broadcom BCM47XX SoC series are using a MAC that is supported by b44. On most of these routers not the internal PHY of this MAC core is used, but a switch sometimes on an external chip or integrated into the same SoC as the Ethernet core. For this switch a special PHY driver is needed which should not be integrated into b44 as the same switches are also used by other Broadcom home networking SoCs which are using different Ethernet MAC drivers. This was tested with the b53 switch driver which is currently on its way to mainline. If the internal PHY is not used, b44 will now search on the MDIO bus for a phy and use the Linux phylib subsystem to register a driver. Support for the internal PHY must stay here, because there are some device which are suing the internal phy. With this patch we scan the mdio bus when the sprom or nvram says that the PHY address is 30, if a PHY was found at this address b44 uses it. This was tested with a BCM4704, BCM4712 and BCM5354. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: abort when no PHY is available at allHauke Mehrtens1-0/+1
When the phy address is 31, this means that there is no PHY connected to this MAC at all, no internal and no external PHY. Reading these PHY registers causes a system reset on some routers. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: rename B44_PHY_ADDR_NO_PHY to B44_PHY_ADDR_NO_LOCAL_PHYHauke Mehrtens1-3/+3
The PHY address 30 means there is no local PHY, but there could be an external PHY like a switch connected via MII. This is the case on most embedded home routers where this driver is used. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-20b44: check register instead of PHY address to detect external PHYHauke Mehrtens1-1/+1
The Ethernet core supported by b44 supports an internal PHY integrated into the mac core, which is supported by the b44 driver and an external PHY to which the mac core is connected. This external PHY could be a switch connected through MII, which is often the case when this core is used on home routers. The usage of an external PHY was assumed when the PHY address 30 was used and an internal PHY was assumed when the PHY address was different. To verify that b44_phy_reset() was called and checked if it worked, otherwise PHY address 30 was assumed, an external PHY. It is better to check the register which says which PHY is connected to the MAC instead of checking the PHY address. The interface to an external PHY was only activated when this register was set. This also changes B44_FLAG_INTERNAL_PHY to B44_FLAG_EXTERNAL_PHY, it is easier to check. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18b44: add 64 bit statsKevin Groeneveld1-1/+2
Add support for 64 bit stats to Broadcom b44 ethernet driver. Signed-off-by: Kevin Groeneveld <kgroeneveld@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-10broadcom: Move the Broadcom driversJeff Kirsher1-0/+401
Moves the drivers for Broadcom devices into drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile changes. CC: Eilon Greenstein <eilong@broadcom.com> CC: Michael Chan <mchan@broadcom.com> CC: Matt Carlson <mcarlson@broadcom.com> CC: Gary Zambrano <zambrano@broadcom.com> CC: "Maciej W. Rozycki" <macro@linux-mips.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>