interface to device driver. More...
Go to the source code of this file.
Defines | |
#define | PRINTF(n) if ( verbose>=(n) ) printf |
#define | MFA_FAIL 0xffffffff |
Typedefs | |
typedef unsigned short | u16 |
typedef unsigned | u32 |
typedef u32 | MFA |
Functions | |
int | setMbox (struct MU *m, int ibox, u32 value) |
set a mail mbox register: ibox [0-3]. | |
u32 | getMbox (struct MU *m, int ibox) |
get contents of mailbox register: ibox [0-3] | |
u32 | getMboxShadow (struct MU *m, int ibox) |
get last contents of mailbox register: ibox [0-3] | |
int | setMboxBits (struct MU *m, int ibox, u32 bits_to_set) |
just set these bits. | |
int | clrMboxBits (struct MU *m, int ibox, u32 bits_to_clr) |
just clr these bits. | |
int | setMboxField (struct MU *m, int ibox, u32 field_mask, u32 field_value) |
set the field in the register only. | |
u32 | pollMboxBits (struct MU *m, int ibox, u32 mask, u32 goal) |
return when any of the bits become true. | |
int | pollAck (struct MU *m) |
polls regular ack from acq32. | |
struct MU * | mmapMbox (int iboard) |
iboard [1-3]. | |
void | setMboxPollcount (struct MU *m, int poll_count) |
int | getMboxPollcount (struct MU *m) |
void | showLastWrites (struct MU *m) |
struct DmaBuffer * | mmapDmaBuffer (int iboard, unsigned nbytes) |
u32 | getBusAddr (struct DmaBuffer *b, u32 offset) |
u32 * | getVaddr (struct DmaBuffer *b, u32 offset) |
int | getDmaBufferLen (struct DmaBuffer *b) |
struct DmaBuffer * | mmapBigBuffer (int iboard, unsigned nbytes) |
void | mmapValidateDmaBuffer (struct MU *mbx, int nsamples) |
void | acq32_enableInts (struct MU *mbx, unsigned mask) |
void | acq32_maskInts (struct MU *mbx, unsigned mask) |
int | hbPoll (struct DmaBuffer *buf, int offset, int sample_len, volatile int *user_abort) |
void | hbPrimePoll (struct DmaBuffer *buf, int offset, int sample_len) |
void | hbPrimeBuffer (struct DmaBuffer *buf) |
MFA | mu_reserveOutbound (struct MU *mu) |
I2O Q ports: OUTBOUND: host reserves free MFA, puts MFA as command INBOUND: host gets message MFA, replaces MFA when done. | |
int | mu_putOutbound (struct MU *mu, MFA mfa) |
MFA | mu_getInbound (struct MU *mu) |
int | mu_returnInbound (struct MU *mu, MFA mfa) |
static void | memset32 (u32 *buf, u32 value, int count) |
Variables | |
int | verbose |
interface to device driver.
Definition in file llif.h.
#define PRINTF | ( | n | ) | if ( verbose>=(n) ) printf |
Definition at line 91 of file llif.h.
Referenced by _getBigBufPrams(), appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), do_run(), enterLLC(), getMbox(), getVaddr(), hbPoll(), llSetCmd(), llSetDacs(), mbox_updateTstats(), measureBridgeStats(), mmapBigBuffer(), mmapDmaBuffer(), mmapMbox(), pollAck(), pollMboxBits(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_ECM(), runTest(), setMbox(), and updateTargetAddr().
void acq32_enableInts | ( | struct MU * | mbx, | |
unsigned | mask | |||
) |
Definition at line 532 of file llif.c.
References ACQ32_IOS_INTS_ENABLE, and MU::fd.
Referenced by measureBridgeStats(), and runTest().
void acq32_maskInts | ( | struct MU * | mbx, | |
unsigned | mask | |||
) |
Definition at line 539 of file llif.c.
References ACQ32_IOS_INTS_DISABLE, and MU::fd.
Referenced by measureBridgeStats(), and runTest().
just clr these bits.
Definition at line 250 of file llif.c.
References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.
Definition at line 502 of file llif.c.
References SegmentMap::length, SegmentMap::offset, SegmentMap::physaddr, and DmaBuffer::seg_map.
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), appEnterLLC_SYNC_ECM(), initV2Stats(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_ECM(), and updateTargetAddr().
int getDmaBufferLen | ( | struct DmaBuffer * | b | ) |
Definition at line 423 of file llif.c.
References DmaBuffer::nbytes.
get contents of mailbox register: ibox [0-3]
Definition at line 269 of file llif.c.
References ACQ32_IOGMBX, MU::fd, IN_RANGE, MU::mailboxes, MU::mailboxes_shadow, and PRINTF.
Referenced by llGetCsr(), llGetTinst(), llGetTlatch(), measureBridge(), measureBridgeStats(), mmapMbox(), monitor_handler(), pollAck(), pollMboxBits(), and quit_handler().
int getMboxPollcount | ( | struct MU * | m | ) |
Definition at line 326 of file llif.c.
References MU::poll_count.
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_2VRFM(), and runSYNC_ECM().
get last contents of mailbox register: ibox [0-3]
Definition at line 298 of file llif.c.
References IN_RANGE, and MU::mailboxes_shadow.
Referenced by llWaitDmaDone().
Definition at line 520 of file llif.c.
References DmaBuffer::nbytes, PRINTF, and DmaBuffer::vaddr.
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), appEnterLLC_SYNC_ECM(), card_sync_2v_WaitDmaDone(), card_v2_WaitDmaDone(), do_run(), doApplicationWork(), doApplicationWork216(), doDmaBufDataOutput(), initV2Stats(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_ECM(), sync_2v_updateTstats(), and v2_updateTstats().
int hbPoll | ( | struct DmaBuffer * | buf, | |
int | offset, | |||
int | sample_len, | |||
volatile int * | user_abort | |||
) |
Definition at line 737 of file llif.c.
References INITBUF_MARKER, marker, PRINTF, udelay(), and DmaBuffer::vaddr.
Referenced by do_run(), and runSCM216().
void hbPrimeBuffer | ( | struct DmaBuffer * | buf | ) |
Definition at line 720 of file llif.c.
References INITBUF_MARKER, len, memset32(), DmaBuffer::nbytes, and DmaBuffer::vaddr.
Referenced by initCardResource().
void hbPrimePoll | ( | struct DmaBuffer * | buf, | |
int | offset, | |||
int | sample_len | |||
) |
Definition at line 729 of file llif.c.
References marker, and DmaBuffer::vaddr.
Referenced by do_run(), and runSCM216().
Definition at line 199 of file llif.h.
Referenced by do_run(), hbPrimeBuffer(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
struct DmaBuffer* mmapBigBuffer | ( | int | iboard, | |
unsigned | nbytes | |||
) | [read] |
Definition at line 631 of file llif.c.
References acq196_get_physical(), ACQ32_BIG_BUF_LEN, fd_in, FN, fname, FNAME_FMT_HOST, getBigBufPrams(), host_len(), host_pa(), SegmentMap::length, MIN, DmaBuffer::nbytes, SegmentMap::offset, SegmentMap::physaddr, PRINTF, DmaBuffer::seg_map, and DmaBuffer::vaddr.
Referenced by initCardResource(), and main().
struct DmaBuffer* mmapDmaBuffer | ( | int | iboard, | |
unsigned | nbytes | |||
) | [read] |
Definition at line 428 of file llif.c.
References ACQ32_IOREAD_GETPHYSICAL, fd_in, fname, FNAME_FMT_DMABUF, SegmentMap::length, DmaBuffer::nbytes, SegmentMap::offset, SegmentMap::physaddr, PRINTF, DmaBuffer::seg_map, and DmaBuffer::vaddr.
Referenced by main().
struct MU* mmapMbox | ( | int | iboard | ) | [read] |
iboard [1-3].
return mapping on success.
Definition at line 332 of file llif.c.
References ACQ32_IOG_PCIREGS_OFFSET, dbg, MU::fd, fname, FNAME_FMT_MBOX, getMbox(), IN_RANGE, MU::inbound_q_port, MU::mailboxes, MU::outbound_q_port, PRINTF, and USE_IOCTL_DOC.
Referenced by initCardResource().
void mmapValidateDmaBuffer | ( | struct MU * | mbx, | |
int | nsamples | |||
) |
Definition at line 694 of file llif.c.
References ACQ32_IOS_VALIDATE_BIGBUF, and MU::fd.
Referenced by main().
Definition at line 774 of file llif.c.
References MU::outbound_q_port.
Definition at line 766 of file llif.c.
References MU::inbound_q_port.
Referenced by do_run(), and llSetDacs().
I2O Q ports: OUTBOUND: host reserves free MFA, puts MFA as command INBOUND: host gets message MFA, replaces MFA when done.
NB: direction with respect to HOST!
Definition at line 762 of file llif.c.
References MU::inbound_q_port.
Referenced by do_run(), and llSetDacs().
Definition at line 778 of file llif.c.
References MU::outbound_q_port.
int pollAck | ( | struct MU * | m | ) |
polls regular ack from acq32.
Definition at line 131 of file llprotocol.c.
References BP_CI_ACK_BIT, BP_MB_COMMAND, getMbox(), MASK, and PRINTF.
Referenced by enterLLC().
return when any of the bits become true.
Definition at line 304 of file llif.c.
References getMbox(), and PRINTF.
Referenced by enterLLC(), and llPollSack().
set a mail mbox register: ibox [0-3].
return 0 on success
Definition at line 206 of file llif.c.
References ACQ32_IOSMBX, MU::fd, IN_RANGE, MU::mailboxes, MU::mailboxes_lastwrite, MU::mailboxes_shadow, and PRINTF.
Referenced by enterLLC(), enterLLC_SYNC_ECM(), llSetAddr(), llSetCmd(), llSetTlatch(), and runSCM216().
just set these bits.
Definition at line 242 of file llif.c.
References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.
set the field in the register only.
Definition at line 258 of file llif.c.
References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.
void setMboxPollcount | ( | struct MU * | m, | |
int | poll_count | |||
) |
Definition at line 322 of file llif.c.
References MU::poll_count.
Referenced by llv2WaitDmaDone(), llv2WaitDmaDone_2v(), and llWaitDmaDone().
void showLastWrites | ( | struct MU * | m | ) |
Definition at line 233 of file llif.c.
References MU::mailboxes_lastwrite.
Referenced by quit_handler().
int verbose |
Definition at line 400 of file llcontrol.c.
Referenced by main(), and monitor_handler().