• Oded Gabbay's avatar
    habanalabs/gaudi: refactor reset code · a60d075c
    Oded Gabbay authored
    After all the latest changes to the reset code, there were some
    redundancy and errors in the flows.
    
    If the Linux FIT is loaded to the ASIC CPU, we need to communicate
    with it only via GIC. If it is not loaded, we need to either use
    COMMS protocol (for newer f/w) or MSG_TO_CPU register (for older f/w).
    
    In addition, if we halted the device CPU then we need to mark that
    the driver will do the reset, regardless of the capabilities.
    
    Also, to prevent false errors, we need to keep track whether the
    device CPU was already halted. If so, we shouldn't try to halt it
    again.
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    a60d075c
gaudi.c 261 KB