LLC2_API
Defines | Typedefs | Functions | Variables
llif.h File Reference

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 MUmmapMbox (int iboard)
 iboard [1-3].
void setMboxPollcount (struct MU *m, int poll_count)
int getMboxPollcount (struct MU *m)
void showLastWrites (struct MU *m)
struct DmaBuffermmapDmaBuffer (int iboard, unsigned nbytes)
u32 getBusAddr (struct DmaBuffer *b, u32 offset_bytes)
u32getVaddr (struct DmaBuffer *b, u32 offset_bytes)
int getDmaBufferLen (struct DmaBuffer *b)
struct DmaBuffermmapBigBuffer (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

Detailed Description

interface to device driver.

Definition in file llif.h.


Define Documentation

#define MFA_FAIL   0xffffffff

Definition at line 218 of file llif.h.

#define PRINTF (   n)    if ( verbose>=(n) ) printf

Typedef Documentation

typedef u32 MFA

Definition at line 106 of file llif.h.

typedef unsigned short u16

Definition at line 96 of file llif.h.

typedef unsigned u32

Definition at line 97 of file llif.h.


Function Documentation

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.

int clrMboxBits ( struct MU m,
int  ibox,
u32  bits_to_clr 
)

just clr these bits.

Definition at line 203 of file llif26.cpp.

References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.

u32 getBusAddr ( struct DmaBuffer b,
u32  offset_bytes 
)

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.

u32 getMbox ( struct MU m,
int  ibox 
)

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.

u32 getMboxShadow ( struct MU m,
int  ibox 
)

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().

u32* getVaddr ( struct DmaBuffer b,
u32  offset_bytes 
)
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.

static void memset32 ( u32 buf,
u32  value,
int  count 
) [inline, static]

Definition at line 201 of file llif.h.

Referenced by hbPrimeBuffer().

struct DmaBuffer* mmapBigBuffer ( int  iboard,
unsigned  nbytes 
) [read]
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.

MFA mu_getInbound ( struct MU mu)
int mu_putOutbound ( struct MU mu,
MFA  mfa 
)

Referenced by llSetDacs().

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.

NB: direction with respect to HOST!

Referenced by llSetDacs().

int mu_returnInbound ( struct MU mu,
MFA  mfa 
)
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().

u32 pollMboxBits ( struct MU m,
int  ibox,
u32  mask,
u32  goal 
)

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().

int setMbox ( struct MU m,
int  ibox,
u32  value 
)

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().

int setMboxBits ( struct MU m,
int  ibox,
u32  bits_to_set 
)

just set these bits.

Definition at line 195 of file llif26.cpp.

References IN_RANGE, MU::mailboxes, and MU::mailboxes_shadow.

int setMboxField ( struct MU m,
int  ibox,
u32  field_mask,
u32  field_value 
)

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/

Parameters:
m
cmdcommand 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().


Variable Documentation

int verbose

Definition at line 60 of file llif26.cpp.