• Finn Thain's avatar
    via-cuda: Add TREQ, TIP and TACK signal helpers · fd7a65a2
    Finn Thain authored
    Introduce some helpers for handling the signalling between VIA and
    Cuda. This abstraction will be used to add support for Egret devices,
    which utilize slightly different signalling.
    
    Don't invert the sense of the Cuda's active-low signals when storing
    them in the 'status' variable. Just assert, negate and test those
    signals using the helpers.
    
    The state machine does not need to test its own output signals to
    figure out what to do next: the next state depends on the Cuda's TREQ
    output. Just call the TREQ_asserted() helper function to test for that.
    
    Similarly, there is no need to store pin directions in the 'status'
    variable. That was only useful for debugging messages.
    Tested-by: default avatarStan Johnson <userm57@yahoo.com>
    Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    fd7a65a2
via-cuda.c 15.3 KB