• Florian Fainelli's avatar
    net: bcmgenet: request and enable main clock earlier · e4a60a93
    Florian Fainelli authored
    bcmgenet_set_hw_params() will read the hardware version and compare it
    with the one we are getting from Device Tree. Due to the clock being
    enabled too late, bcmgenet_set_hw_params() will cause bus errors since
    the GENET hardware block is still gated off by the time
    bcmgenet_set_hw_params() is called, this will also make us fail the
    version check since we will read the value 0 from the hardware.
    
    Fix this by requesting the clock before the first piece of code that
    needs to access hardware register.
    
    Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e4a60a93
bcmgenet.c 70.5 KB