add new LAN8710 and LAN8720 device ids to smsc phy driver

转载 2013年12月02日 12:49:03

[PATCH] phy: add new LAN8710 and LAN8720 device ids to smsc phy driver

LAN8710 and LAN8720 are two new 10/100 ethernet PHY models. The two
share the same phy id, this patch adds it to the smsc phy driver.

Signed-off-by: Steve Glendinning <steve.glendinning <at> smsc.com>
---
 drivers/net/phy/smsc.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 1387187..5123bb9 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
 <at>  <at>  -159,6 +159,30  <at>  <at>  static struct phy_driver lan911x_int_driver = {
 	.driver		= { .owner = THIS_MODULE, }
 };

+static struct phy_driver lan8710_driver = {
+	.phy_id		= 0x0007c0f0, /* OUI=0x00800f, Model#=0x0f */
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "SMSC LAN8710/LAN8720",
+
+	.features	= (PHY_BASIC_FEATURES | SUPPORTED_Pause
+				| SUPPORTED_Asym_Pause),
+	.flags		= PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+
+	/* basic functions */
+	.config_aneg	= genphy_config_aneg,
+	.read_status	= genphy_read_status,
+	.config_init	= smsc_phy_config_init,
+
+	/* IRQ related */
+	.ack_interrupt	= smsc_phy_ack_interrupt,
+	.config_intr	= smsc_phy_config_intr,
+
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
+
+	.driver		= { .owner = THIS_MODULE, }
+};
+
 static int __init smsc_init(void)
 {
 	int ret;
 <at>  <at>  -179,8 +203,14  <at>  <at>  static int __init smsc_init(void)
 	if (ret)
 		goto err4;

+	ret = phy_driver_register (&lan8710_driver);
+	if (ret)
+		goto err5;
+
 	return 0;

+err5:
+	phy_driver_unregister (&lan911x_int_driver);
 err4:
 	phy_driver_unregister (&lan8700_driver);
 err3:
 <at>  <at>  -193,6 +223,7  <at>  <at>  err1:

 static void __exit smsc_exit(void)
 {
+	phy_driver_unregister (&lan8710_driver);
 	phy_driver_unregister (&lan911x_int_driver);
 	phy_driver_unregister (&lan8700_driver);
 	phy_driver_unregister (&lan8187_driver);
--

-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

2-lan8720a的kernel驱动

1.iomux部分 arch/arm/plat-mxc/include/mach/iomux-mx6q.h定义iomux值 arch/arm/mach-mx6/board-mx6q-sabresd.h...

uboot.2015.07移植之驱动DM9000(8)

移植u-boot-2015.07之修改程序支持 DM9000 网卡

u-boot下网络驱动程序的修改

Eth.c工作之前的初始化static struct eth_device *eth_devices, *eth_current;Eth.c中有个eth_devices需要外部调用函数eth_regi...
  • xgbing
  • xgbing
  • 2011年06月28日 14:38
  • 7217

AM335X连接LAN8720的调试过程

在调试过程中遇到一些问题, 1. 硬件原理图的问题  8720可使用两种外部晶振 25M和50M,这两种晶振需要通过引脚配置电平来决定的!而并非自适应。       所以如果外部使用50M晶振的...
  • idoming
  • idoming
  • 2017年11月03日 11:28
  • 83

LAN8710AI-EZK

  • 2014年05月10日 22:44
  • 1.06MB
  • 下载

No compatible targets were found,Do you wish to add a new Android Virtual Device?问题解决方法。

当一个android项目要在虚拟机上测试时,有时会发现提示No compatible targets were found,Do you wish to add a new Android Virtu...

LAN8720A 原理图

  • 2017年11月16日 17:03
  • 52KB
  • 下载

Linux Platform Device and Driver,platform_add_devices()->platform_driver_register()

来自: http://www.diybl.com/course/6_system/linux/Linuxjs/200871/129585.html从 Linux 2.6 起引入了一套新的驱动管理和注册...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:add new LAN8710 and LAN8720 device ids to smsc phy driver
举报原因:
原因补充:

(最多只允许输入30个字)