• Hauke Mehrtens's avatar
    net: lantiq: lantiq_xrx200: Move clock prepare to probe function · a44ecfbd
    Hauke Mehrtens authored
    The switch and the MAC are in one IP core and they use the same clock
    signal from the clock generation unit.
    Currently the clock architecture in the lantiq SoC code does not allow
    to easily share the same clocks, this has to be fixed by switching to
    the common clock framework.
    As a workaround the clock of the switch and MAC should be activated when
    the MAC gets probed and only disabled when the MAC gets removed. This
    way it is ensured that the clock is always enabled when the switch or
    MAC is used. The switch can not be used without the MAC.
    
    This fixes a data bus error when rebooting the system and deactivating
    the switch and mac and later accessing some registers in the cleanup
    while the clocks are disabled.
    
    Fixes: fe1a5642 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
    Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a44ecfbd
lantiq_xrx200.c 13.2 KB