LLC2_API
|
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_bytes) |
u32 * | getVaddr (struct DmaBuffer *b, u32 offset_bytes) |
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) |
void | setPathCleanup (struct MU *m, unsigned cmd) |
set a deferred action to take place on path close/ | |
void | acq200_setImask (int slot, const char *mask) |
void | acq200_setImask (int slot, u32 *mask) |
Variables | |
int | verbose |
interface to device driver.
Definition in file llif.h.
#define PRINTF | ( | n | ) | if ( verbose>=(n) ) printf |
Definition at line 93 of file llif.h.
Referenced by acq32_enableInts(), acq32_maskInts(), appEnterLLC_SYNC_2VAO32(), LL_ControlSystemI::Arm(), enterLLC(), getMbox(), getVaddr(), hbPoll(), llSetCmd(), llSetDacs(), measureBridgeStats(), mmapBigBuffer(), mmapMbox(), pollAck(), pollMboxBits(), setMbox(), LL_ControlSystemI::Stop(), and updateTargetAddr().
void acq200_setImask | ( | int | slot, |
const char * | mask | ||
) |
Definition at line 536 of file llif26.cpp.
References FMT_IMASK.
Referenced by LL_ControlSystemI::Arm(), measureBridgeStats(), and LL_ControlSystemI::Stop().
void acq200_setImask | ( | int | slot, |
u32 * | mask | ||
) |
Definition at line 551 of file llif26.cpp.
References FMT_IMASK.
void acq32_enableInts | ( | struct MU * | mbx, |
unsigned | mask | ||
) |
Definition at line 371 of file llif26.cpp.
References ACQ32_IOS_INTS_ENABLE, MU::fd, and PRINTF.
void acq32_maskInts | ( | struct MU * | mbx, |
unsigned | mask | ||
) |
Definition at line 381 of file llif26.cpp.
References ACQ32_IOS_INTS_DISABLE, MU::fd, and PRINTF.
just clr these bits.
Definition at line 203 of file llif26.cpp.
References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.
Definition at line 349 of file llif26.cpp.
References DmaBuffer::physaddr.
Referenced by appEnterLLC_SYNC_2VAO32(), and updateTargetAddr().
int getDmaBufferLen | ( | struct DmaBuffer * | b | ) |
Definition at line 343 of file llif26.cpp.
References DmaBuffer::nbytes.
get contents of mailbox register: ibox [0-3]
Definition at line 222 of file llif26.cpp.
References 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 269 of file llif26.cpp.
References MU::poll_count.
get last contents of mailbox register: ibox [0-3]
Definition at line 241 of file llif26.cpp.
References IN_RANGE, and MU::mailboxes_shadow.
Referenced by llWaitDmaDone().
Definition at line 359 of file llif26.cpp.
References PRINTF, and DmaBuffer::vaddr.
Referenced by appEnterLLC_SYNC_2VAO32(), LL_ControlSystemI::Arm(), card_sync_2v_WaitDmaDone(), card_v2_WaitDmaDone(), doDmaBufDataOutput(), ACQ196::getAI(), ACQ196::getDI(), ACQ196::getStatus(), AO32::putAO(), ACQ196::putAO(), AO32::putDO(), ACQ196::putDO(), sync_2v_updateTstats(), ACQ196::toggle_wd(), and v2_updateTstats().
int hbPoll | ( | struct DmaBuffer * | buf, |
int | offset, | ||
int | sample_len, | ||
volatile int * | user_abort | ||
) |
Definition at line 496 of file llif26.cpp.
References INITBUF_MARKER, marker, PRINTF, udelay(), and DmaBuffer::vaddr.
void hbPrimeBuffer | ( | struct DmaBuffer * | buf | ) |
Definition at line 478 of file llif26.cpp.
References INITBUF_MARKER, memset32(), DmaBuffer::nbytes, and DmaBuffer::vaddr.
Referenced by initCardResource().
void hbPrimePoll | ( | struct DmaBuffer * | buf, |
int | offset, | ||
int | sample_len | ||
) |
Definition at line 488 of file llif26.cpp.
References INITBUF_MARKER, marker, and DmaBuffer::vaddr.
Definition at line 201 of file llif.h.
Referenced by hbPrimeBuffer().
struct DmaBuffer* mmapBigBuffer | ( | int | iboard, |
unsigned | nbytes | ||
) | [read] |
Definition at line 394 of file llif26.cpp.
References FN, FNAME_FMT_HOST, host_len(), host_pa(), DmaBuffer::nbytes, DmaBuffer::physaddr, PRINTF, and DmaBuffer::vaddr.
Referenced by initCardResource().
struct DmaBuffer* mmapDmaBuffer | ( | int | iboard, |
unsigned | nbytes | ||
) | [read] |
struct MU* mmapMbox | ( | int | iboard | ) | [read] |
iboard [1-3].
return mapping on success.
Definition at line 275 of file llif26.cpp.
References MU::fd, FNAME_FMT_MBOX, getMbox(), IN_RANGE, MU::mailboxes, and PRINTF.
Referenced by initCardResource().
void mmapValidateDmaBuffer | ( | struct MU * | mbx, |
int | nsamples | ||
) |
Definition at line 455 of file llif26.cpp.
Referenced by 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!
Referenced by llSetDacs().
int pollAck | ( | struct MU * | m | ) |
polls regular ack from acq32.
Definition at line 130 of file llprotocol.cpp.
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 247 of file llif26.cpp.
References getMbox(), and PRINTF.
Referenced by enterLLC(), and llPollSack().
set a mail mbox register: ibox [0-3].
return 0 on success
Definition at line 172 of file llif26.cpp.
References IN_RANGE, MU::mailboxes, MU::mailboxes_lastwrite, MU::mailboxes_shadow, and PRINTF.
Referenced by enterLLC(), enterLLC_SYNC_ECM(), llSetAddr(), llSetCmd(), and llSetTlatch().
just set these bits.
Definition at line 195 of file llif26.cpp.
References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.
set the field in the register only.
Definition at line 211 of file llif26.cpp.
References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.
void setMboxPollcount | ( | struct MU * | m, |
int | poll_count | ||
) |
Definition at line 265 of file llif26.cpp.
References MU::poll_count.
Referenced by llv2WaitDmaDone(), llv2WaitDmaDone_2v(), and llWaitDmaDone().
void setPathCleanup | ( | struct MU * | m, |
unsigned | cmd | ||
) |
set a deferred action to take place on path close/
m | |
cmd | command to send to MAILBOX_0, 0: no command |
Definition at line 520 of file llif26.cpp.
References ACQ200_MBOX_IOWR, MU::fd, MailboxControl::mbc_flags, MBC_FLAGS_ONRELEASE, MBC_TO_MBXR, MBC_TO_MBXW, and MailboxControl::mbxw.
Referenced by enterLLC(), and leaveLLC().
void showLastWrites | ( | struct MU * | m | ) |
Definition at line 186 of file llif26.cpp.
References MU::mailboxes_lastwrite.
Referenced by quit_handler().
int verbose |
Definition at line 60 of file llif26.cpp.