All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Bananapi: Fix ethernet device initialization
@ 2015-06-07 13:04 Maxin B. John
  2015-06-07 13:12 ` Paul Kocialkowski
  0 siblings, 1 reply; 3+ messages in thread
From: Maxin B. John @ 2015-06-07 13:04 UTC (permalink / raw)
  To: u-boot

Ethernet device initialization fails with the following message:
Net:   PH: dir_output: error: gpio PH23 not reserved
Phy 1 not found
PHY reset timed out
eth0: ethernet at 01c50000

Tested on Banana Pi board.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
---
 arch/arm/cpu/armv7/sunxi/board.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index a82c8b9..030a711 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -223,6 +223,7 @@ int cpu_eth_init(bd_t *bis)
 	__maybe_unused int rc;
 
 #ifdef CONFIG_MACPWR
+	gpio_request(CONFIG_MACPWR, "MAC Power");
 	gpio_direction_output(CONFIG_MACPWR, 1);
 	mdelay(200);
 #endif
-- 
1.9.1

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

* [U-Boot] [PATCH] Bananapi: Fix ethernet device initialization
  2015-06-07 13:04 [U-Boot] [PATCH] Bananapi: Fix ethernet device initialization Maxin B. John
@ 2015-06-07 13:12 ` Paul Kocialkowski
  2015-06-07 13:25   ` Maxin B. John
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Kocialkowski @ 2015-06-07 13:12 UTC (permalink / raw)
  To: u-boot

Hi,

> Ethernet device initialization fails with the following message:
> Net:   PH: dir_output: error: gpio PH23 not reserved
> Phy 1 not found
> PHY reset timed out
> eth0: ethernet at 01c50000
> 
> Tested on Banana Pi board.
> 
> Signed-off-by: Maxin B. John <maxin.john@enea.com>
> ---
>  arch/arm/cpu/armv7/sunxi/board.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
> index a82c8b9..030a711 100644
> --- a/arch/arm/cpu/armv7/sunxi/board.c
> +++ b/arch/arm/cpu/armv7/sunxi/board.c
> @@ -223,6 +223,7 @@ int cpu_eth_init(bd_t *bis)
>  	__maybe_unused int rc;
>  
>  #ifdef CONFIG_MACPWR
> +	gpio_request(CONFIG_MACPWR, "MAC Power");

I suggest using the string "macpwr" instead to be consistent with:
board/sunxi/ahci.c:	gpio_request(CONFIG_SATAPWR, "satapwr");

Good find otherwise!

>  	gpio_direction_output(CONFIG_MACPWR, 1);
>  	mdelay(200);
>  #endif

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150607/1198ba0c/attachment.sig>

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

* [U-Boot] [PATCH] Bananapi: Fix ethernet device initialization
  2015-06-07 13:12 ` Paul Kocialkowski
@ 2015-06-07 13:25   ` Maxin B. John
  0 siblings, 0 replies; 3+ messages in thread
From: Maxin B. John @ 2015-06-07 13:25 UTC (permalink / raw)
  To: u-boot

Hi Paul,

On Sun, Jun 07, 2015 at 03:12:41PM +0200, Paul Kocialkowski wrote:
> Hi,
> 
> > Ethernet device initialization fails with the following message:
> > Net:   PH: dir_output: error: gpio PH23 not reserved
> > Phy 1 not found
> > PHY reset timed out
> > eth0: ethernet at 01c50000
> > 
> > Tested on Banana Pi board.
> > 
> > Signed-off-by: Maxin B. John <maxin.john@enea.com>
> > ---
> >  arch/arm/cpu/armv7/sunxi/board.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
> > index a82c8b9..030a711 100644
> > --- a/arch/arm/cpu/armv7/sunxi/board.c
> > +++ b/arch/arm/cpu/armv7/sunxi/board.c
> > @@ -223,6 +223,7 @@ int cpu_eth_init(bd_t *bis)
> >  	__maybe_unused int rc;
> >  
> >  #ifdef CONFIG_MACPWR
> > +	gpio_request(CONFIG_MACPWR, "MAC Power");
> 
> I suggest using the string "macpwr" instead to be consistent with:
> board/sunxi/ahci.c:	gpio_request(CONFIG_SATAPWR, "satapwr");
> 
> Good find otherwise!

Thanks for the comments. Will send a v2 soon.

> >  	gpio_direction_output(CONFIG_MACPWR, 1);
> >  	mdelay(200);
> >  #endif

Best Regards,
Maxin 

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

end of thread, other threads:[~2015-06-07 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 13:04 [U-Boot] [PATCH] Bananapi: Fix ethernet device initialization Maxin B. John
2015-06-07 13:12 ` Paul Kocialkowski
2015-06-07 13:25   ` Maxin B. John

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.