Skip to contentSkip to conversation

phy: introduce structure fixed-link

PATCH New shh.xie at gmail.com 3 participants 4 messages Nov 14, 2013 – Nov 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: introduce structure fixed-link

From: Shaohui Xie <[email protected]>

fixed-link is used in kernel for PHY-less MAC, so introduce this structure that U-boot can use it to fixup dtb dynamically.

---
 include/phy.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/phy.h +8 -0
index f0f522a..f86ffb9 100644
@@ -160,6 +160,14 @@ struct phy_device {
 	u32 flags;
 };
 
+struct fixed_link {
+	int phy_id;
+	int duplex;
+	int link_speed;
+	int pause;
+	int asym_pause;
+};
+
 static inline int phy_read(struct phy_device *phydev, int devad, int regnum)
 {
 	struct mii_dev *bus = phydev->bus;
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/1 phy: introduce structure fixed-link

Quoted 16 lines · shh.xie at gmail.com

From: Shaohui Xie <[email protected]>

fixed-link is used in kernel for PHY-less MAC, so introduce this structure that U-boot can use it to fixup dtb dynamically.

---
 include/phy.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/phy.h +0 -0
index f0f522a..f86ffb9 100644
@@ -160,6 +160,14 @@ struct phy_device {
 	u32 flags;

include/phy.h struct phy_device { · line 170

Quoted 10 lines
include/phy.h +8 -0
 };
 
+struct fixed_link {
+	int phy_id;
+	int duplex;
+	int link_speed;
+	int pause;
+	int asym_pause;
+};
+

How is this code used? Do you have other patches following?

York

#2 lore raw

PATCH 1/1 phy: introduce structure fixed-link

Quoted 26 lines

-----Original Message-----
From: York Sun [mailto:yorksun at freescale.com]
Sent: Friday, November 22, 2013 2:03 AM
To: shh.xie at gmail.com; u-boot at lists.denx.de
Cc: Xie Shaohui-B21989
Subject: Re: [PATCH] phy: introduce structure fixed-link

Quoted 18 lines · shh.xie at gmail.com

From: Shaohui Xie <[email protected]>

fixed-link is used in kernel for PHY-less MAC, so introduce this structure that U-boot can use it to fixup dtb dynamically.

---
 include/phy.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/phy.h index f0f522a..f86ffb9 renamed from include/phy.h +0 -0

100644

include/phy.h +0 -0
@@ -160,6 +160,14 @@ struct phy_device {
 	u32 flags;
 };
 
Quoted 11 lines

include/phy.h struct phy_device { · line 170

Quoted 8 lines
include/phy.h +8 -0
+struct fixed_link {
+	int phy_id;
+	int duplex;
+	int link_speed;
+	int pause;
+	int asym_pause;
+};
+

How is this code used? Do you have other patches following?

[S.H] Shengzhou has posted patches, link: http://patchwork.ozlabs.org/patch/291206/

It uses as below (quoted some codes):

+ switch (srds_s1) {
+ case 0x66: /* XFI interface */
+ case 0x6b:
+ case 0x6c:
+ case 0x6d:
+ case 0x71:
+ f_link.phy_id = port;
+ f_link.duplex = 1;
+ f_link.link_speed = 10000;
+ f_link.pause = 0;
+ f_link.asym_pause = 0;
+ /* no PHY for XFI */
+ fdt_delprop(fdt, offset, "phy-handle");
+ fdt_setprop(fdt, offset, "fixed-link", &f_link,
+ sizeof(f_link));
+ break;
+ default:
+ break;
+ }

Best Regards,
Shaohui Xie