OSDN Git Service

via-cuda: Add TREQ, TIP and TACK signal helpers
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 1 Jan 2017 00:56:26 +0000 (19:56 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Feb 2017 05:56:18 +0000 (16:56 +1100)
commitfd7a65a27c6cb9b0920130d9402b95695168092d
tree8b33647a04dcb497f827006033fe46e85fb4b920
parent06d7e99408acd2faa099d8af1a57cb1f6624062a
via-cuda: Add TREQ, TIP and TACK signal helpers

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: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/macintosh/via-cuda.c