* [PATCH 1/1] smc91111: add phy flags support @ 2013-09-19 5:50 Jean-Christophe PLAGNIOL-VILLARD 2013-09-19 5:50 ` [PATCH 2/2] versatilepb: force net a 100Mpps Jean-Christophe PLAGNIOL-VILLARD 2013-09-20 7:00 ` [PATCH 1/1] smc91111: add phy flags support Sascha Hauer 0 siblings, 2 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-19 5:50 UTC (permalink / raw) To: barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- drivers/net/smc91111.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c index 48183dd..8c7a343 100644 --- a/drivers/net/smc91111.c +++ b/drivers/net/smc91111.c @@ -886,6 +886,7 @@ static void smc91c111_enable(struct eth_device *edev) static int smc91c111_eth_open(struct eth_device *edev) { struct smc91c111_priv *priv = (struct smc91c111_priv *)edev->priv; + int ret; /* Configure the Receive/Phy Control register */ SMC_SELECT_BANK(priv, 0); @@ -893,8 +894,27 @@ static int smc91c111_eth_open(struct eth_device *edev) smc91c111_enable(edev); - return phy_device_connect(edev, &priv->miibus, 0, NULL, + ret = phy_device_connect(edev, &priv->miibus, 0, NULL, 0, PHY_INTERFACE_MODE_NA); + + if (ret) + return ret; + + if (edev->phydev->phy_id == 0x00000000) { + struct phy_device *dev = edev->phydev; + + dev->speed = SPEED_100; + dev->duplex = DUPLEX_FULL; + dev->autoneg = !AUTONEG_ENABLE; + dev->force = 1; + dev->link = 1; + + dev_info(edev->parent, "phy with id 0x%08x detected this might be qemu\n", + dev->phy_id); + dev_info(edev->parent, "force link at 100Mpbs\n"); + } + + return 0; } static int smc91c111_eth_send(struct eth_device *edev, void *packet, -- 1.8.4.rc1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] versatilepb: force net a 100Mpps 2013-09-19 5:50 [PATCH 1/1] smc91111: add phy flags support Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-19 5:50 ` Jean-Christophe PLAGNIOL-VILLARD 2013-09-19 11:21 ` Jean-Christophe PLAGNIOL-VILLARD 2013-09-20 7:00 ` [PATCH 1/1] smc91111: add phy flags support Sascha Hauer 1 sibling, 1 reply; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-19 5:50 UTC (permalink / raw) To: barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- arch/arm/boards/versatile/versatilepb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c index 2eb7473..fa0585d 100644 --- a/arch/arm/boards/versatile/versatilepb.c +++ b/arch/arm/boards/versatile/versatilepb.c @@ -28,6 +28,7 @@ #include <environment.h> #include <partition.h> #include <sizes.h> +#include <linux/phy.h> static int vpb_console_init(void) { @@ -44,6 +45,8 @@ static int vpb_mem_init(void) } mem_initcall(vpb_mem_init); +static int phy_flags = PHYLIB_FORCE_100; + static int vpb_devices_init(void) { add_cfi_flash_device(DEVICE_ID_DYNAMIC, VERSATILE_FLASH_BASE, VERSATILE_FLASH_SIZE, 0); @@ -52,7 +55,7 @@ static int vpb_devices_init(void) devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); add_generic_device("smc91c111", DEVICE_ID_DYNAMIC, NULL, VERSATILE_ETH_BASE, - 64 * 1024, IORESOURCE_MEM, NULL); + 64 * 1024, IORESOURCE_MEM, &phy_flags); armlinux_set_architecture(MACH_TYPE_VERSATILE_PB); armlinux_set_bootparams((void *)(0x00000100)); -- 1.8.4.rc1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] versatilepb: force net a 100Mpps 2013-09-19 5:50 ` [PATCH 2/2] versatilepb: force net a 100Mpps Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-19 11:21 ` Jean-Christophe PLAGNIOL-VILLARD 2013-09-20 7:01 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-19 11:21 UTC (permalink / raw) To: barebox On 07:50 Thu 19 Sep , Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> ignore this one it'a handle already at driver level Best Regards, J. > --- > arch/arm/boards/versatile/versatilepb.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c > index 2eb7473..fa0585d 100644 > --- a/arch/arm/boards/versatile/versatilepb.c > +++ b/arch/arm/boards/versatile/versatilepb.c > @@ -28,6 +28,7 @@ > #include <environment.h> > #include <partition.h> > #include <sizes.h> > +#include <linux/phy.h> > > static int vpb_console_init(void) > { > @@ -44,6 +45,8 @@ static int vpb_mem_init(void) > } > mem_initcall(vpb_mem_init); > > +static int phy_flags = PHYLIB_FORCE_100; > + > static int vpb_devices_init(void) > { > add_cfi_flash_device(DEVICE_ID_DYNAMIC, VERSATILE_FLASH_BASE, VERSATILE_FLASH_SIZE, 0); > @@ -52,7 +55,7 @@ static int vpb_devices_init(void) > devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); > > add_generic_device("smc91c111", DEVICE_ID_DYNAMIC, NULL, VERSATILE_ETH_BASE, > - 64 * 1024, IORESOURCE_MEM, NULL); > + 64 * 1024, IORESOURCE_MEM, &phy_flags); > > armlinux_set_architecture(MACH_TYPE_VERSATILE_PB); > armlinux_set_bootparams((void *)(0x00000100)); > -- > 1.8.4.rc1 > _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] versatilepb: force net a 100Mpps 2013-09-19 11:21 ` Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-20 7:01 ` Sascha Hauer 2013-09-21 15:42 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2013-09-20 7:01 UTC (permalink / raw) To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox On Thu, Sep 19, 2013 at 01:21:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 07:50 Thu 19 Sep , Jean-Christophe PLAGNIOL-VILLARD wrote: > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> > > ignore this one it'a handle already at driver level Ok, I assume I shall ignore the whole series. Sascha > > Best Regards, > J. > > --- > > arch/arm/boards/versatile/versatilepb.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c > > index 2eb7473..fa0585d 100644 > > --- a/arch/arm/boards/versatile/versatilepb.c > > +++ b/arch/arm/boards/versatile/versatilepb.c > > @@ -28,6 +28,7 @@ > > #include <environment.h> > > #include <partition.h> > > #include <sizes.h> > > +#include <linux/phy.h> > > > > static int vpb_console_init(void) > > { > > @@ -44,6 +45,8 @@ static int vpb_mem_init(void) > > } > > mem_initcall(vpb_mem_init); > > > > +static int phy_flags = PHYLIB_FORCE_100; > > + > > static int vpb_devices_init(void) > > { > > add_cfi_flash_device(DEVICE_ID_DYNAMIC, VERSATILE_FLASH_BASE, VERSATILE_FLASH_SIZE, 0); > > @@ -52,7 +55,7 @@ static int vpb_devices_init(void) > > devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); > > > > add_generic_device("smc91c111", DEVICE_ID_DYNAMIC, NULL, VERSATILE_ETH_BASE, > > - 64 * 1024, IORESOURCE_MEM, NULL); > > + 64 * 1024, IORESOURCE_MEM, &phy_flags); > > > > armlinux_set_architecture(MACH_TYPE_VERSATILE_PB); > > armlinux_set_bootparams((void *)(0x00000100)); > > -- > > 1.8.4.rc1 > > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] versatilepb: force net a 100Mpps 2013-09-20 7:01 ` Sascha Hauer @ 2013-09-21 15:42 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 0 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-21 15:42 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox On 09:01 Fri 20 Sep , Sascha Hauer wrote: > On Thu, Sep 19, 2013 at 01:21:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > On 07:50 Thu 19 Sep , Jean-Christophe PLAGNIOL-VILLARD wrote: > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> > > > > ignore this one it'a handle already at driver level > > Ok, I assume I shall ignore the whole series. yes ignore it Best Regards, J. > > Sascha > > > > > Best Regards, > > J. > > > --- > > > arch/arm/boards/versatile/versatilepb.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c > > > index 2eb7473..fa0585d 100644 > > > --- a/arch/arm/boards/versatile/versatilepb.c > > > +++ b/arch/arm/boards/versatile/versatilepb.c > > > @@ -28,6 +28,7 @@ > > > #include <environment.h> > > > #include <partition.h> > > > #include <sizes.h> > > > +#include <linux/phy.h> > > > > > > static int vpb_console_init(void) > > > { > > > @@ -44,6 +45,8 @@ static int vpb_mem_init(void) > > > } > > > mem_initcall(vpb_mem_init); > > > > > > +static int phy_flags = PHYLIB_FORCE_100; > > > + > > > static int vpb_devices_init(void) > > > { > > > add_cfi_flash_device(DEVICE_ID_DYNAMIC, VERSATILE_FLASH_BASE, VERSATILE_FLASH_SIZE, 0); > > > @@ -52,7 +55,7 @@ static int vpb_devices_init(void) > > > devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); > > > > > > add_generic_device("smc91c111", DEVICE_ID_DYNAMIC, NULL, VERSATILE_ETH_BASE, > > > - 64 * 1024, IORESOURCE_MEM, NULL); > > > + 64 * 1024, IORESOURCE_MEM, &phy_flags); > > > > > > armlinux_set_architecture(MACH_TYPE_VERSATILE_PB); > > > armlinux_set_bootparams((void *)(0x00000100)); > > > -- > > > 1.8.4.rc1 > > > > > > > _______________________________________________ > > barebox mailing list > > barebox@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/barebox > > > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] smc91111: add phy flags support 2013-09-19 5:50 [PATCH 1/1] smc91111: add phy flags support Jean-Christophe PLAGNIOL-VILLARD 2013-09-19 5:50 ` [PATCH 2/2] versatilepb: force net a 100Mpps Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-20 7:00 ` Sascha Hauer 1 sibling, 0 replies; 6+ messages in thread From: Sascha Hauer @ 2013-09-20 7:00 UTC (permalink / raw) To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox On Thu, Sep 19, 2013 at 07:50:14AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> > --- > drivers/net/smc91111.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c > index 48183dd..8c7a343 100644 > --- a/drivers/net/smc91111.c > +++ b/drivers/net/smc91111.c > @@ -886,6 +886,7 @@ static void smc91c111_enable(struct eth_device *edev) > static int smc91c111_eth_open(struct eth_device *edev) > { > struct smc91c111_priv *priv = (struct smc91c111_priv *)edev->priv; > + int ret; > > /* Configure the Receive/Phy Control register */ > SMC_SELECT_BANK(priv, 0); > @@ -893,8 +894,27 @@ static int smc91c111_eth_open(struct eth_device *edev) > > smc91c111_enable(edev); > > - return phy_device_connect(edev, &priv->miibus, 0, NULL, > + ret = phy_device_connect(edev, &priv->miibus, 0, NULL, > 0, PHY_INTERFACE_MODE_NA); > + > + if (ret) > + return ret; > + > + if (edev->phydev->phy_id == 0x00000000) { > + struct phy_device *dev = edev->phydev; Is this the correct patch? It's the same patch you sent earlier with another commit message as a qemu fixup. Sascha > + > + dev->speed = SPEED_100; > + dev->duplex = DUPLEX_FULL; > + dev->autoneg = !AUTONEG_ENABLE; > + dev->force = 1; > + dev->link = 1; > + > + dev_info(edev->parent, "phy with id 0x%08x detected this might be qemu\n", > + dev->phy_id); > + dev_info(edev->parent, "force link at 100Mpbs\n"); > + } > + > + return 0; > } > > static int smc91c111_eth_send(struct eth_device *edev, void *packet, > -- > 1.8.4.rc1 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-21 15:41 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-09-19 5:50 [PATCH 1/1] smc91111: add phy flags support Jean-Christophe PLAGNIOL-VILLARD 2013-09-19 5:50 ` [PATCH 2/2] versatilepb: force net a 100Mpps Jean-Christophe PLAGNIOL-VILLARD 2013-09-19 11:21 ` Jean-Christophe PLAGNIOL-VILLARD 2013-09-20 7:01 ` Sascha Hauer 2013-09-21 15:42 ` Jean-Christophe PLAGNIOL-VILLARD 2013-09-20 7:00 ` [PATCH 1/1] smc91111: add phy flags support Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox