Skip to content
Snippets Groups Projects
Commit e6e34ca3 authored by Marek Vasut's avatar Marek Vasut
Browse files

arm: socfpga: Fix ethernet reset handling


The following patch caused cpu_eth_init() to not be called anymore
for DM-capable boards:

commit c32a6fd0
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: default avatarMarek 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>
parent 80da8664
No related branches found
No related tags found
No related merge requests found
...@@ -104,7 +104,7 @@ static void dwmac_deassert_reset(const unsigned int of_reset_id) ...@@ -104,7 +104,7 @@ static void dwmac_deassert_reset(const unsigned int of_reset_id)
socfpga_per_reset(reset, 0); socfpga_per_reset(reset, 0);
} }
int cpu_eth_init(bd_t *bis) static int socfpga_eth_reset(void)
{ {
const void *fdt = gd->fdt_blob; const void *fdt = gd->fdt_blob;
struct fdtdec_phandle_args args; struct fdtdec_phandle_args args;
...@@ -137,6 +137,11 @@ int cpu_eth_init(bd_t *bis) ...@@ -137,6 +137,11 @@ int cpu_eth_init(bd_t *bis)
return 0; return 0;
} }
#else
static int socfpga_eth_reset(void)
{
return 0
};
#endif #endif
struct { struct {
...@@ -232,7 +237,7 @@ int arch_misc_init(void) ...@@ -232,7 +237,7 @@ int arch_misc_init(void)
setenv("bootmode", bsel_str[bsel].mode); setenv("bootmode", bsel_str[bsel].mode);
if (fpga_id >= 0) if (fpga_id >= 0)
setenv("fpgatype", socfpga_fpga_model[fpga_id].var); setenv("fpgatype", socfpga_fpga_model[fpga_id].var);
return 0; return socfpga_eth_reset();
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment