diff mbox

[U-Boot,v2] Bananapi: Fix ethernet device initialization

Message ID 1433683536-48879-1-git-send-email-maxin.john@enea.com
State Superseded
Delegated to: Hans de Goede
Headers show

Commit Message

maxin.john@enea.com June 7, 2015, 1:25 p.m. UTC
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@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(+)

Comments

Hans de Goede June 8, 2015, 1:23 p.m. UTC | #1
Hi Maxin,

On 07-06-15 15:25, Maxin B. John wrote:
> 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@01c50000
>
> Tested on Banana Pi board.
>
> Signed-off-by: Maxin B. John <maxin.john@enea.com>

Thanks, I actually wrote exactly the same patch myself yesterday, and that
just got acked by Ian today. I'll make sure to get the fix upstream
soonish.

Regards,

Hans


> ---
>   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..4b2494e 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, "macpwr");
>   	gpio_direction_output(CONFIG_MACPWR, 1);
>   	mdelay(200);
>   #endif
>
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index a82c8b9..4b2494e 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, "macpwr");
 	gpio_direction_output(CONFIG_MACPWR, 1);
 	mdelay(200);
 #endif