[U-Boot] [PATCH] ARM: at91: sama5d2: Wrap cpu detection to fix macb driver

Alexander Dahl ada at thorsis.com
Mon Mar 25 10:08:39 UTC 2019


Hello Eugen,

Am Montag, 25. März 2019, 09:46:02 CET schrieb Eugen.Hristev at microchip.com:
> Are you sure there is a problem with this commit itself:
> 
> net: macb: Fix GEM hardware detection
> 
> as it looks , this commit fixes the interpretation of the MID register 
> w.r.t. the gem capability... not an issue there that your patch fixes.

Well, without the changeset "net: macb: Fix GEM hardware detection" the actual 
problem I had, would not trigger, because the SAMA5D2 is not recognized having 
the gem capability. That's why I asked if that additional fixes line is 
correct.

> More likely your patch fixes the fact that the sama5d2 soc was not 
> properly defining that macro, which was turned into a function, so your 
> patch fixes the code that changed the macro into a function, which broke 
> things... is my understanding correct ?

My patch fixes that soc detection only. The behaviour on SAMA5D2 however is as 
follows:

1) Without both patches (as in v2019.01): SAMA5D2 mac is not detected as gem → 
soc detection in function 'gem_is_gigabit_capable()' is not relevant for 
gigabit detection -> ethernet works (maybe accidentally, gem actually used 
like old mac?)

2) With my patch only: mac is not detected as gem AND soc is detected as 
SAMA5D2 → no gigabit detected → ethernet might work as in 1), not tested 
though

3) With the gem hw detect fix only (as in v2019.04-rc3 already): mac is 
detected as gem, soc is not detected as SAMA5D2 → falsely detected gigabit 
capability → ethernet broken (can you reproduce this?)

4) With both patches: hw recognized as gem, soc recognized as SAMA5D2 → mac 
used as gem, but without gigabit caps → works for me on custom board

Greets
Alex



More information about the U-Boot mailing list