* [U-Boot] [PATCH] arm: socfpga: Fix ethernet reset handling
@ 2016-02-11 15:41 Marek Vasut
2016-02-11 15:53 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2016-02-11 15:41 UTC (permalink / raw)
To: u-boot
The following patch caused cpu_eth_init() to not be called anymore
for DM-capable boards:
commit c32a6fd07b1839e4a45729587ebc8e1c55601a4d
Date: Sun Jan 17 14:51:56 2016 -0700
net: Don't call board/cpu_eth_init() with driver model
This breaks ethernet on SoCFPGA, since we use that function to un-reset
the ethernet blocks. Invoke the ethernet reset function from arch_misc_init()
instead to fix the breakage.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
Cc: Denis Bakhvalov <denis.bakhvalov@nokia.com>
---
arch/arm/mach-socfpga/misc.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 9b43b92..ce3ff0a 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -104,7 +104,7 @@ static void dwmac_deassert_reset(const unsigned int of_reset_id)
socfpga_per_reset(reset, 0);
}
-int cpu_eth_init(bd_t *bis)
+static int socfpga_eth_reset(void)
{
const void *fdt = gd->fdt_blob;
struct fdtdec_phandle_args args;
@@ -137,6 +137,11 @@ int cpu_eth_init(bd_t *bis)
return 0;
}
+#else
+static int socfpga_eth_reset(void)
+{
+ return 0
+};
#endif
struct {
@@ -232,7 +237,7 @@ int arch_misc_init(void)
setenv("bootmode", bsel_str[bsel].mode);
if (fpga_id >= 0)
setenv("fpgatype", socfpga_fpga_model[fpga_id].var);
- return 0;
+ return socfpga_eth_reset();
}
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] arm: socfpga: Fix ethernet reset handling
2016-02-11 15:41 [U-Boot] [PATCH] arm: socfpga: Fix ethernet reset handling Marek Vasut
@ 2016-02-11 15:53 ` Stefan Roese
2016-02-11 16:44 ` Dinh Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2016-02-11 15:53 UTC (permalink / raw)
To: u-boot
On 11.02.2016 16:41, Marek Vasut wrote:
> The following patch caused cpu_eth_init() to not be called anymore
> for DM-capable boards:
>
> commit c32a6fd07b1839e4a45729587ebc8e1c55601a4d
> Date: Sun Jan 17 14:51:56 2016 -0700
> net: Don't call board/cpu_eth_init() with driver model
>
> This breaks ethernet on SoCFPGA, since we use that function to un-reset
> the ethernet blocks. Invoke the ethernet reset function from arch_misc_init()
> instead to fix the breakage.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> Cc: Chin Liang See <clsee@altera.com>
> Cc: Denis Bakhvalov <denis.bakhvalov@nokia.com>
Works for me as well. So:
Tested-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] arm: socfpga: Fix ethernet reset handling
2016-02-11 15:53 ` Stefan Roese
@ 2016-02-11 16:44 ` Dinh Nguyen
0 siblings, 0 replies; 3+ messages in thread
From: Dinh Nguyen @ 2016-02-11 16:44 UTC (permalink / raw)
To: u-boot
On 02/11/2016 09:53 AM, Stefan Roese wrote:
> On 11.02.2016 16:41, Marek Vasut wrote:
>> The following patch caused cpu_eth_init() to not be called anymore
>> for DM-capable boards:
>>
>> commit c32a6fd07b1839e4a45729587ebc8e1c55601a4d
>> Date: Sun Jan 17 14:51:56 2016 -0700
>> net: Don't call board/cpu_eth_init() with driver model
>>
>> This breaks ethernet on SoCFPGA, since we use that function to un-reset
>> the ethernet blocks. Invoke the ethernet reset function from
>> arch_misc_init()
>> instead to fix the breakage.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
>> Cc: Chin Liang See <clsee@altera.com>
>> Cc: Denis Bakhvalov <denis.bakhvalov@nokia.com>
>
> Works for me as well. So:
>
> Tested-by: Stefan Roese <sr@denx.de>
>
For me as well.
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-11 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 15:41 [U-Boot] [PATCH] arm: socfpga: Fix ethernet reset handling Marek Vasut
2016-02-11 15:53 ` Stefan Roese
2016-02-11 16:44 ` Dinh Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox