Skip to contentSkip to conversation

phy: export genphy_parse_link()

PATCH New yegorslists at googlemail.com 4 participants 16 messages Nov 28, 2012 – Jul 8, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 phy: export genphy_parse_link()

From: Yegor Yefremov <[email protected]>

---
 drivers/net/phy/phy.c |    2 +-
 include/phy.h         |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/phy/phy.c +1 -1
index 1ffa791..c28ea70 100644
@@ -279,7 +279,7 @@ int genphy_update_link(struct phy_device *phydev)
  *
  * Stolen from Linux's mii.c and phy_device.c
  */
-static int genphy_parse_link(struct phy_device *phydev)
+int genphy_parse_link(struct phy_device *phydev)
 {
 	int mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);
 
include/phy.h +1 -0
index 3c30f11..1342ef7 100644
@@ -209,6 +209,7 @@ int phy_register(struct phy_driver *drv);
 int genphy_config_aneg(struct phy_device *phydev);
 int genphy_restart_aneg(struct phy_device *phydev);
 int genphy_update_link(struct phy_device *phydev);
+int genphy_parse_link(struct phy_device *phydev);
 int genphy_config(struct phy_device *phydev);
 int genphy_startup(struct phy_device *phydev);
 int genphy_shutdown(struct phy_device *phydev);
Signature · 1 line
1.7.7
#1 lore raw

PATCH 1/2 phy: export genphy_parse_link()

Quoted 34 lines · On Wed, Nov 28, 2012 at 11:15 AM, <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

---
 drivers/net/phy/phy.c |    2 +-
 include/phy.h         |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/phy/phy.c +1 -1
index 1ffa791..c28ea70 100644
@@ -279,7 +279,7 @@ int genphy_update_link(struct phy_device *phydev)
  *
  * Stolen from Linux's mii.c and phy_device.c
  */
-static int genphy_parse_link(struct phy_device *phydev)
+int genphy_parse_link(struct phy_device *phydev)
 {
        int mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);
 
include/phy.h +1 -1
index 3c30f11..1342ef7 100644
@@ -209,6 +209,7 @@ int phy_register(struct phy_driver *drv);
 int genphy_config_aneg(struct phy_device *phydev);
 int genphy_restart_aneg(struct phy_device *phydev);
 int genphy_update_link(struct phy_device *phydev);
+int genphy_parse_link(struct phy_device *phydev);
 int genphy_config(struct phy_device *phydev);
 int genphy_startup(struct phy_device *phydev);
 int genphy_shutdown(struct phy_device *phydev);
--
Quoted 2 lines

1.7.7

Hi Joe,

could you please take a look at this patch series (the second patch is about adding ICPlus phy)?

Yegor

#3 lore raw

PATCH 2/2 net: add ICPlus PHY driver

In reply to yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

---
 drivers/net/phy/Makefile |    1 +
 drivers/net/phy/icplus.c |   90 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/phy/phy.c    |    3 ++
 3 files changed, 94 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/phy/icplus.c
drivers/net/phy/Makefile +1 -0
index 5e90d70..2c5ab5f 100644
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_PHYLIB_10G) += generic_10g.o
 COBJS-$(CONFIG_PHY_ATHEROS) += atheros.o
 COBJS-$(CONFIG_PHY_BROADCOM) += broadcom.o
 COBJS-$(CONFIG_PHY_DAVICOM) += davicom.o
+COBJS-$(CONFIG_PHY_ICPLUS) += icplus.o
 COBJS-$(CONFIG_PHY_LXT) += lxt.o
 COBJS-$(CONFIG_PHY_MARVELL) += marvell.o
 COBJS-$(CONFIG_PHY_MICREL) += micrel.o
drivers/net/phy/icplus.c new file +90 -0

90 lines not on this page · raw message

drivers/net/phy/phy.c +3 -0
index c28ea70..9eccf40 100644
@@ -429,6 +429,9 @@ int phy_init(void)
 #ifdef CONFIG_PHY_DAVICOM
 	phy_davicom_init();
 #endif
+#ifdef CONFIG_PHY_ICPLUS
+	phy_icplus_init();
+#endif
 #ifdef CONFIG_PHY_LXT
 	phy_lxt_init();
 #endif
Signature · 1 line
1.7.7
#4 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

[...]

Is there any user for this PHY please?

Best regards,
Marek Vasut

#5 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Quoted 11 lines · Marek Vasut

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

[...]

Is there any user for this PHY please?

Yes, our new device, that will be soon introduced. The successor of this one http://www.visionsystems.de/produkte/6806.html.

Yegor

#6 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Dear Yegor Yefremov,

Quoted 8 lines · Marek Vasut
Quoted 7 lines

Dear yegorslists at googlemail.com,

Quoted 5 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

[...]

Is there any user for this PHY please?

Yes, our new device, that will be soon introduced. The successor of this one http://www.visionsystems.de/produkte/6806.html.

Good, ok ... just make sure the board support also hits u-boot, so we won't have dead code.

Best regards,
Marek Vasut

#7 lore raw

PATCH 2/2 net: add ICPlus PHY driver

In reply to Marek Vasut

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 11 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

Regards
Henrik

#8 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Quoted 9 lines · Henrik Nordstr?m

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 8 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Yegor

#9 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Dear Yegor Yefremov,

Quoted 24 lines

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m

Quoted 10 lines · <[email protected]> wrote:

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 9 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

Quoted 9 lines

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Sure, but the question/point is ... won't this be dead code in u-boot? It won't once you add at least one board that actually uses it ... adding it only so it's there will only cause it to bitrot and it'll actually only add more burden to maintainers.

Best regards,
Marek Vasut

#10 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Quoted 36 lines · Marek Vasut

Dear Yegor Yefremov,

Quoted 24 lines

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m

Quoted 10 lines · <[email protected]> wrote:

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 9 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

Quoted 9 lines

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Quoted 4 lines

Sure, but the question/point is ... won't this be dead code in u-boot? It won't once you add at least one board that actually uses it ... adding it only so it's there will only cause it to bitrot and it'll actually only add more burden to maintainers.

It won't be dead code, because we will use it :-) Our board is derivative of BeagleBone & Co, so the whole support stuff is already in u-boot. I can also image that some system didn't require network support in u-boot and didn't bother with implementing the phy driver. x86 systems are likely to have this phy too. And the driver is really small and uses mostly generic routines.

Yegor

#11 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Dear Yegor Yefremov,

Quoted 37 lines · Marek Vasut
Quoted 36 lines

Dear Yegor Yefremov,

Quoted 33 lines

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m

Quoted 10 lines · <[email protected]> wrote:

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 9 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Quoted 8 lines
Quoted 4 lines

Sure, but the question/point is ... won't this be dead code in u-boot? It won't once you add at least one board that actually uses it ... adding it only so it's there will only cause it to bitrot and it'll actually only add more burden to maintainers.

It won't be dead code, because we will use it :-) Our board is derivative of BeagleBone & Co, so the whole support stuff is already in u-boot.

You need to enable it for that board though ;-)

Quoted 6 lines

I can also image that some system didn't require network support in u-boot and didn't bother with implementing the phy driver. x86 systems are likely to have this phy too. And the driver is really small and uses mostly generic routines.

Yegor

Best regards,
Marek Vasut

#12 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Quoted 44 lines · Marek Vasut

Dear Yegor Yefremov,

Quoted 42 lines · Marek Vasut
Quoted 40 lines

Dear Yegor Yefremov,

Quoted 24 lines

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m

Quoted 10 lines · <[email protected]> wrote:

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 9 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

Quoted 9 lines

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Sure, but the question/point is ... won't this be dead code in u-boot? It won't once you add at least one board that actually uses it ... adding it only so it's there will only cause it to bitrot and it'll actually only add more burden to maintainers.

Quoted 5 lines
Quoted 3 lines

It won't be dead code, because we will use it :-) Our board is derivative of BeagleBone & Co, so the whole support stuff is already in u-boot.

You need to enable it for that board though ;-)

Will do this as soon as we come near to the release. I'd like to have basic stuff mainlined before.

Yegor

#13 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Dear Yegor Yefremov,

Quoted 45 lines · Marek Vasut
Quoted 44 lines

Dear Yegor Yefremov,

Quoted 42 lines · Marek Vasut
Quoted 40 lines

Dear Yegor Yefremov,

Quoted 24 lines

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m

Quoted 10 lines · <[email protected]> wrote:

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 9 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

Quoted 9 lines

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Sure, but the question/point is ... won't this be dead code in u-boot? It won't once you add at least one board that actually uses it ... adding it only so it's there will only cause it to bitrot and it'll actually only add more burden to maintainers.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It won't be dead code, because we will use it :-) Our board is derivative of BeagleBone & Co, so the whole support stuff is already in u-boot.

You need to enable it for that board though ;-)

Will do this as soon as we come near to the release.

Release of what? The hardware?

Quoted 1 line

I'd like to have basic stuff mainlined before.

Well, I'll leave that up to Joe anyway

Best regards,
Marek Vasut

#14 lore raw

PATCH 2/2 net: add ICPlus PHY driver

Quoted 51 lines · Marek Vasut

Dear Yegor Yefremov,

Quoted 49 lines · Marek Vasut
Quoted 48 lines

Dear Yegor Yefremov,

Quoted 45 lines · Marek Vasut
Quoted 36 lines

Dear Yegor Yefremov,

Quoted 24 lines

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m

Quoted 10 lines · <[email protected]> wrote:

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:

Quoted 9 lines

Dear yegorslists at googlemail.com,

Quoted 6 lines

From: Yegor Yefremov <[email protected]>

The driver code was taken from Linux kernel source:
drivers/net/phy/icplus.c

Quoted 8 lines
Quoted 3 lines

[...]

Is there any user for this PHY please?

I don't have one, but know at least one user having one in an A10 based "netbook".

http://linux-sunxi.org/File:H6-netbook-mainboard.jpg

I found these boards in kernel:

Quoted 9 lines

arch/mips/configs/malta_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/bcm47xx_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/ip27_defconfig:CONFIG_ICPLUS_PHY=m arch/mips/configs/sead3_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/52xx/motionpro_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/83xx/mpc832x_rdb_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/mpc83xx_defconfig:CONFIG_ICPLUS_PHY=y arch/powerpc/configs/ppc6xx_defconfig:CONFIG_ICPLUS_PHY=m

Quoted 4 lines

Sure, but the question/point is ... won't this be dead code in u-boot? It won't once you add at least one board that actually uses it ... adding it only so it's there will only cause it to bitrot and it'll actually only add more burden to maintainers.

It won't be dead code, because we will use it :-) Our board is derivative of BeagleBone & Co, so the whole support stuff is already in u-boot.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

You need to enable it for that board though ;-)

Will do this as soon as we come near to the release.

Release of what? The hardware?

Release of hardware and when two more patches hit main line u-boot:

http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/147860
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/147859

Quoted 3 lines
Quoted 1 line

I'd like to have basic stuff mainlined before.

Well, I'll leave that up to Joe anyway

O.K.

Yegor