All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] phy: export genphy_parse_link()
@ 2012-11-28 10:15 yegorslists at googlemail.com
  2012-11-28 10:15 ` [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver yegorslists at googlemail.com
  2013-01-15 10:41 ` [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() Yegor Yefremov
  0 siblings, 2 replies; 16+ messages in thread
From: yegorslists at googlemail.com @ 2012-11-28 10:15 UTC (permalink / raw)
  To: u-boot

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 drivers/net/phy/phy.c |    2 +-
 include/phy.h         |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1ffa791..c28ea70 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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);
 
diff --git a/include/phy.h b/include/phy.h
index 3c30f11..1342ef7 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -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);
-- 
1.7.7

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-28 10:15 [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() yegorslists at googlemail.com
@ 2012-11-28 10:15 ` yegorslists at googlemail.com
  2012-11-29  6:27   ` Marek Vasut
  2013-07-08 15:47   ` Joe Hershberger
  2013-01-15 10:41 ` [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() Yegor Yefremov
  1 sibling, 2 replies; 16+ messages in thread
From: yegorslists at googlemail.com @ 2012-11-28 10:15 UTC (permalink / raw)
  To: u-boot

From: Yegor Yefremov <yegorslists@googlemail.com>

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

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 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

diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 5e90d70..2c5ab5f 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -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
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
new file mode 100644
index 0000000..85b9720
--- /dev/null
+++ b/drivers/net/phy/icplus.c
@@ -0,0 +1,90 @@
+/*
+ * ICPlus PHY drivers
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ * Copyright (c) 2007 Freescale Semiconductor, Inc.
+ *
+ */
+#include <phy.h>
+
+/* IP101A/G - IP1001 */
+#define IP10XX_SPEC_CTRL_STATUS         16      /* Spec. Control Register */
+#define IP1001_SPEC_CTRL_STATUS_2       20      /* IP1001 Spec. Control Reg 2 */
+#define IP1001_PHASE_SEL_MASK           3       /* IP1001 RX/TXPHASE_SEL */
+#define IP1001_APS_ON                   11      /* IP1001 APS Mode  bit */
+#define IP101A_G_APS_ON                 2       /* IP101A/G APS Mode bit */
+#define IP101A_G_IRQ_CONF_STATUS        0x11    /* Conf Info IRQ & Status Reg */
+#define IP101A_G_IRQ_PIN_USED           (1<<15) /* INTR pin used */
+#define IP101A_G_IRQ_DEFAULT            IP101A_G_IRQ_PIN_USED
+
+static int ip1001_config(struct phy_device *phydev)
+{
+	int c;
+
+	/* Enable Auto Power Saving mode */
+	c = phy_read(phydev, MDIO_DEVAD_NONE,IP1001_SPEC_CTRL_STATUS_2);
+	if (c < 0)
+		return c;
+	c |= IP1001_APS_ON;
+	c = phy_write(phydev, MDIO_DEVAD_NONE,IP1001_SPEC_CTRL_STATUS_2, c);
+	if (c < 0)
+		return c;
+
+	/* INTR pin used: speed/link/duplex will cause an interrupt */
+	c = phy_write(phydev, MDIO_DEVAD_NONE,IP101A_G_IRQ_CONF_STATUS, IP101A_G_IRQ_DEFAULT);
+	if (c < 0)
+		return c;
+
+	if (phydev->interface == PHY_INTERFACE_MODE_RGMII) {
+		/* Additional delay (2ns) used to adjust RX clock phase
+		 * at RGMII interface */
+		c = phy_read(phydev, MDIO_DEVAD_NONE,IP10XX_SPEC_CTRL_STATUS);
+		if (c < 0)
+			return c;
+
+		c |= IP1001_PHASE_SEL_MASK;
+		c = phy_write(phydev, MDIO_DEVAD_NONE,IP10XX_SPEC_CTRL_STATUS, c);
+		if (c < 0)
+			return c;
+	}
+
+	return 0;
+}
+
+static int ip1001_startup(struct phy_device *phydev)
+{
+	genphy_update_link(phydev);
+	genphy_parse_link(phydev);
+
+	return 0;
+}
+static struct phy_driver IP1001_driver = {
+	.name = "ICPlus IP1001",
+	.uid = 0x02430d90,
+	.mask = 0x0ffffff0,
+	.features = PHY_GBIT_FEATURES,
+	.config = &ip1001_config,
+	.startup = &ip1001_startup,
+	.shutdown = &genphy_shutdown,
+};
+
+int phy_icplus_init(void)
+{
+	phy_register(&IP1001_driver);
+
+	return 0;
+}
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c28ea70..9eccf40 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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
-- 
1.7.7

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-28 10:15 ` [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver yegorslists at googlemail.com
@ 2012-11-29  6:27   ` Marek Vasut
  2012-11-29  7:32     ` Yegor Yefremov
  2012-11-29  7:53     ` Henrik Nordström
  2013-07-08 15:47   ` Joe Hershberger
  1 sibling, 2 replies; 16+ messages in thread
From: Marek Vasut @ 2012-11-29  6:27 UTC (permalink / raw)
  To: u-boot

Dear yegorslists at googlemail.com,

> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> The driver code was taken from Linux kernel source:
> drivers/net/phy/icplus.c
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
[...]

Is there any user for this PHY please?

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29  6:27   ` Marek Vasut
@ 2012-11-29  7:32     ` Yegor Yefremov
  2012-11-29  7:43       ` Marek Vasut
  2012-11-29  7:53     ` Henrik Nordström
  1 sibling, 1 reply; 16+ messages in thread
From: Yegor Yefremov @ 2012-11-29  7:32 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 29, 2012 at 7:27 AM, Marek Vasut <marex@denx.de> wrote:
> Dear yegorslists at googlemail.com,
>
>> From: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> The driver code was taken from Linux kernel source:
>> drivers/net/phy/icplus.c
>>
>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> [...]
>
> 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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29  7:32     ` Yegor Yefremov
@ 2012-11-29  7:43       ` Marek Vasut
  0 siblings, 0 replies; 16+ messages in thread
From: Marek Vasut @ 2012-11-29  7:43 UTC (permalink / raw)
  To: u-boot

Dear Yegor Yefremov,

> On Thu, Nov 29, 2012 at 7:27 AM, Marek Vasut <marex@denx.de> wrote:
> > Dear yegorslists at googlemail.com,
> > 
> >> From: Yegor Yefremov <yegorslists@googlemail.com>
> >> 
> >> The driver code was taken from Linux kernel source:
> >> drivers/net/phy/icplus.c
> >> 
> >> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> > 
> > [...]
> > 
> > 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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29  6:27   ` Marek Vasut
  2012-11-29  7:32     ` Yegor Yefremov
@ 2012-11-29  7:53     ` Henrik Nordström
  2012-11-29  8:07       ` Yegor Yefremov
  1 sibling, 1 reply; 16+ messages in thread
From: Henrik Nordström @ 2012-11-29  7:53 UTC (permalink / raw)
  To: u-boot

tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
> Dear yegorslists at googlemail.com,
> 
> > From: Yegor Yefremov <yegorslists@googlemail.com>
> > 
> > The driver code was taken from Linux kernel source:
> > drivers/net/phy/icplus.c
> > 
> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> [...]
> 
> 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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29  7:53     ` Henrik Nordström
@ 2012-11-29  8:07       ` Yegor Yefremov
  2012-11-29 12:55         ` Marek Vasut
  0 siblings, 1 reply; 16+ messages in thread
From: Yegor Yefremov @ 2012-11-29  8:07 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
<henrik@henriknordstrom.net> wrote:
> tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
>> Dear yegorslists at googlemail.com,
>>
>> > From: Yegor Yefremov <yegorslists@googlemail.com>
>> >
>> > The driver code was taken from Linux kernel source:
>> > drivers/net/phy/icplus.c
>> >
>> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>> [...]
>>
>> 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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29  8:07       ` Yegor Yefremov
@ 2012-11-29 12:55         ` Marek Vasut
  2012-11-29 13:13           ` Yegor Yefremov
  0 siblings, 1 reply; 16+ messages in thread
From: Marek Vasut @ 2012-11-29 12:55 UTC (permalink / raw)
  To: u-boot

Dear Yegor Yefremov,

> On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
> 
> <henrik@henriknordstrom.net> wrote:
> > tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
> >> Dear yegorslists at googlemail.com,
> >> 
> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
> >> > 
> >> > The driver code was taken from Linux kernel source:
> >> > drivers/net/phy/icplus.c
> >> > 
> >> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> >> 
> >> [...]
> >> 
> >> 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

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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29 12:55         ` Marek Vasut
@ 2012-11-29 13:13           ` Yegor Yefremov
  2012-11-29 14:29             ` Marek Vasut
  0 siblings, 1 reply; 16+ messages in thread
From: Yegor Yefremov @ 2012-11-29 13:13 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 29, 2012 at 1:55 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Yegor Yefremov,
>
>> On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
>>
>> <henrik@henriknordstrom.net> wrote:
>> > tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
>> >> Dear yegorslists at googlemail.com,
>> >>
>> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
>> >> >
>> >> > The driver code was taken from Linux kernel source:
>> >> > drivers/net/phy/icplus.c
>> >> >
>> >> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>> >>
>> >> [...]
>> >>
>> >> 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
>
> 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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29 13:13           ` Yegor Yefremov
@ 2012-11-29 14:29             ` Marek Vasut
  2012-11-29 14:40               ` Yegor Yefremov
  0 siblings, 1 reply; 16+ messages in thread
From: Marek Vasut @ 2012-11-29 14:29 UTC (permalink / raw)
  To: u-boot

Dear Yegor Yefremov,

> On Thu, Nov 29, 2012 at 1:55 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Yegor Yefremov,
> > 
> >> On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
> >> 
> >> <henrik@henriknordstrom.net> wrote:
> >> > tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
> >> >> Dear yegorslists at googlemail.com,
> >> >> 
> >> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
> >> >> > 
> >> >> > The driver code was taken from Linux kernel source:
> >> >> > drivers/net/phy/icplus.c
> >> >> > 
> >> >> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> >> >> 
> >> >> [...]
> >> >> 
> >> >> 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
> > 
> > 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 ;-)

> 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

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29 14:29             ` Marek Vasut
@ 2012-11-29 14:40               ` Yegor Yefremov
  2012-11-29 14:51                 ` Marek Vasut
  0 siblings, 1 reply; 16+ messages in thread
From: Yegor Yefremov @ 2012-11-29 14:40 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 29, 2012 at 3:29 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Yegor Yefremov,
>
>> On Thu, Nov 29, 2012 at 1:55 PM, Marek Vasut <marex@denx.de> wrote:
>> > Dear Yegor Yefremov,
>> >
>> >> On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
>> >>
>> >> <henrik@henriknordstrom.net> wrote:
>> >> > tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
>> >> >> Dear yegorslists at googlemail.com,
>> >> >>
>> >> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
>> >> >> >
>> >> >> > The driver code was taken from Linux kernel source:
>> >> >> > drivers/net/phy/icplus.c
>> >> >> >
>> >> >> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>> >> >>
>> >> >> [...]
>> >> >>
>> >> >> 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
>> >
>> > 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 ;-)

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

Yegor

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29 14:40               ` Yegor Yefremov
@ 2012-11-29 14:51                 ` Marek Vasut
  2012-11-29 14:59                   ` Yegor Yefremov
  0 siblings, 1 reply; 16+ messages in thread
From: Marek Vasut @ 2012-11-29 14:51 UTC (permalink / raw)
  To: u-boot

Dear Yegor Yefremov,

> On Thu, Nov 29, 2012 at 3:29 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Yegor Yefremov,
> > 
> >> On Thu, Nov 29, 2012 at 1:55 PM, Marek Vasut <marex@denx.de> wrote:
> >> > Dear Yegor Yefremov,
> >> > 
> >> >> On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
> >> >> 
> >> >> <henrik@henriknordstrom.net> wrote:
> >> >> > tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
> >> >> >> Dear yegorslists at googlemail.com,
> >> >> >> 
> >> >> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
> >> >> >> > 
> >> >> >> > The driver code was taken from Linux kernel source:
> >> >> >> > drivers/net/phy/icplus.c
> >> >> >> > 
> >> >> >> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> >> >> >> 
> >> >> >> [...]
> >> >> >> 
> >> >> >> 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
> >> > 
> >> > 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 ;-)
> 
> Will do this as soon as we come near to the release.

Release of what? The hardware?

> I'd like to have basic stuff mainlined before.

Well, I'll leave that up to Joe anyway

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-29 14:51                 ` Marek Vasut
@ 2012-11-29 14:59                   ` Yegor Yefremov
  0 siblings, 0 replies; 16+ messages in thread
From: Yegor Yefremov @ 2012-11-29 14:59 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 29, 2012 at 3:51 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Yegor Yefremov,
>
>> On Thu, Nov 29, 2012 at 3:29 PM, Marek Vasut <marex@denx.de> wrote:
>> > Dear Yegor Yefremov,
>> >
>> >> On Thu, Nov 29, 2012 at 1:55 PM, Marek Vasut <marex@denx.de> wrote:
>> >> > Dear Yegor Yefremov,
>> >> >
>> >> >> On Thu, Nov 29, 2012 at 8:53 AM, Henrik Nordstr?m
>> >> >>
>> >> >> <henrik@henriknordstrom.net> wrote:
>> >> >> > tor 2012-11-29 klockan 07:27 +0100 skrev Marek Vasut:
>> >> >> >> Dear yegorslists at googlemail.com,
>> >> >> >>
>> >> >> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
>> >> >> >> >
>> >> >> >> > The driver code was taken from Linux kernel source:
>> >> >> >> > drivers/net/phy/icplus.c
>> >> >> >> >
>> >> >> >> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>> >> >> >>
>> >> >> >> [...]
>> >> >> >>
>> >> >> >> 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
>> >> >
>> >> > 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 ;-)
>>
>> 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

>> I'd like to have basic stuff mainlined before.
>
> Well, I'll leave that up to Joe anyway

O.K.

Yegor

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

* [U-Boot] [PATCH 1/2] phy: export genphy_parse_link()
  2012-11-28 10:15 [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() yegorslists at googlemail.com
  2012-11-28 10:15 ` [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver yegorslists at googlemail.com
@ 2013-01-15 10:41 ` Yegor Yefremov
  2013-07-08 15:45   ` Joe Hershberger
  1 sibling, 1 reply; 16+ messages in thread
From: Yegor Yefremov @ 2013-01-15 10:41 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 28, 2012 at 11:15 AM,  <yegorslists@googlemail.com> wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  drivers/net/phy/phy.c |    2 +-
>  include/phy.h         |    1 +
>  2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 1ffa791..c28ea70 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -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);
>
> diff --git a/include/phy.h b/include/phy.h
> index 3c30f11..1342ef7 100644
> --- a/include/phy.h
> +++ b/include/phy.h
> @@ -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);
> --
> 1.7.7
>

Hi Joe,

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

Yegor

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

* [U-Boot] [PATCH 1/2] phy: export genphy_parse_link()
  2013-01-15 10:41 ` [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() Yegor Yefremov
@ 2013-07-08 15:45   ` Joe Hershberger
  0 siblings, 0 replies; 16+ messages in thread
From: Joe Hershberger @ 2013-07-08 15:45 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 15, 2013 at 4:41 AM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> On Wed, Nov 28, 2012 at 11:15 AM,  <yegorslists@googlemail.com> wrote:
>> From: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied, Thanks.
-Joe

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

* [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver
  2012-11-28 10:15 ` [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver yegorslists at googlemail.com
  2012-11-29  6:27   ` Marek Vasut
@ 2013-07-08 15:47   ` Joe Hershberger
  1 sibling, 0 replies; 16+ messages in thread
From: Joe Hershberger @ 2013-07-08 15:47 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 28, 2012 at 4:15 AM,  <yegorslists@googlemail.com> wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> The driver code was taken from Linux kernel source:
> drivers/net/phy/icplus.c
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied, Thanks.
-Joe

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

end of thread, other threads:[~2013-07-08 15:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-28 10:15 [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() yegorslists at googlemail.com
2012-11-28 10:15 ` [U-Boot] [PATCH 2/2] net: add ICPlus PHY driver yegorslists at googlemail.com
2012-11-29  6:27   ` Marek Vasut
2012-11-29  7:32     ` Yegor Yefremov
2012-11-29  7:43       ` Marek Vasut
2012-11-29  7:53     ` Henrik Nordström
2012-11-29  8:07       ` Yegor Yefremov
2012-11-29 12:55         ` Marek Vasut
2012-11-29 13:13           ` Yegor Yefremov
2012-11-29 14:29             ` Marek Vasut
2012-11-29 14:40               ` Yegor Yefremov
2012-11-29 14:51                 ` Marek Vasut
2012-11-29 14:59                   ` Yegor Yefremov
2013-07-08 15:47   ` Joe Hershberger
2013-01-15 10:41 ` [U-Boot] [PATCH 1/2] phy: export genphy_parse_link() Yegor Yefremov
2013-07-08 15:45   ` Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.