public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] phy: introduce structure fixed-link
@ 2013-11-14 11:00 shh.xie at gmail.com
  2013-11-21 18:02 ` York Sun
  2013-11-25 21:00 ` York Sun
  0 siblings, 2 replies; 4+ messages in thread
From: shh.xie at gmail.com @ 2013-11-14 11:00 UTC (permalink / raw)
  To: u-boot

From: Shaohui Xie <Shaohui.Xie@freescale.com>

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

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
 include/phy.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/phy.h b/include/phy.h
index f0f522a..f86ffb9 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -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;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] phy: introduce structure fixed-link
  2013-11-14 11:00 [U-Boot] [PATCH] phy: introduce structure fixed-link shh.xie at gmail.com
@ 2013-11-21 18:02 ` York Sun
  2013-11-22  2:25   ` Shaohui Xie
  2013-11-25 21:00 ` York Sun
  1 sibling, 1 reply; 4+ messages in thread
From: York Sun @ 2013-11-21 18:02 UTC (permalink / raw)
  To: u-boot

On 11/14/2013 03:00 AM, shh.xie at gmail.com wrote:
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
> 
> fixed-link is used in kernel for PHY-less MAC, so introduce this
> structure that U-boot can use it to fixup dtb dynamically.
> 
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
>  include/phy.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/phy.h b/include/phy.h
> index f0f522a..f86ffb9 100644
> --- a/include/phy.h
> +++ b/include/phy.h
> @@ -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;
> +};
> +

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

York

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] phy: introduce structure fixed-link
  2013-11-21 18:02 ` York Sun
@ 2013-11-22  2:25   ` Shaohui Xie
  0 siblings, 0 replies; 4+ messages in thread
From: Shaohui Xie @ 2013-11-22  2:25 UTC (permalink / raw)
  To: u-boot

> -----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
> 
> On 11/14/2013 03:00 AM, shh.xie at gmail.com wrote:
> > From: Shaohui Xie <Shaohui.Xie@freescale.com>
> >
> > fixed-link is used in kernel for PHY-less MAC, so introduce this
> > structure that U-boot can use it to fixup dtb dynamically.
> >
> > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > ---
> >  include/phy.h | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/include/phy.h b/include/phy.h index f0f522a..f86ffb9
> > 100644
> > --- a/include/phy.h
> > +++ b/include/phy.h
> > @@ -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;
> > +};
> > +
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] phy: introduce structure fixed-link
  2013-11-14 11:00 [U-Boot] [PATCH] phy: introduce structure fixed-link shh.xie at gmail.com
  2013-11-21 18:02 ` York Sun
@ 2013-11-25 21:00 ` York Sun
  1 sibling, 0 replies; 4+ messages in thread
From: York Sun @ 2013-11-25 21:00 UTC (permalink / raw)
  To: u-boot

On 11/14/2013 03:00 AM, shh.xie at gmail.com wrote:
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
> 
> fixed-link is used in kernel for PHY-less MAC, so introduce this
> structure that U-boot can use it to fixup dtb dynamically.
> 
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---


Applied to u-boot-mpc85xx/master. Thanks.

York

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-25 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 11:00 [U-Boot] [PATCH] phy: introduce structure fixed-link shh.xie at gmail.com
2013-11-21 18:02 ` York Sun
2013-11-22  2:25   ` Shaohui Xie
2013-11-25 21:00 ` York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox