nidas
v1.2-1520
|
Everything needed to access the board. More...
Public Attributes | |
unsigned int | ioport |
unsigned long | addr |
int | irq |
struct class * | class |
struct device * | device |
char | deviceName [32] |
dev_t | pc104sg_device |
Linux device. More... | |
struct cdev | pc104sg_cdev |
Linux character device. More... | |
struct irig_device * | dev |
Information needed by file operations. More... | |
spinlock_t | dev_lock |
spinlock used to control access to irig_device member. More... | |
atomic_t | num_opened |
How many concurrent opens of the device. More... | |
unsigned char | IntMask |
The three possible interrupts generated by this card are enabled with bits 5,6,7 of the status port: More... | |
spinlock_t | lock |
Spinlock to control concurrent access to board registers and shared variables in this structure. More... | |
int | TMsecClockTicker |
Our clock ticker, 1/10s of milliseconds since 00:00 GMT. More... | |
int | WriteClock |
Index into TMsecClock of the next clock value to be written. More... | |
int | count100Hz |
enum clockState | clockState |
Current clock state. More... | |
enum clockAction | clockAction |
Action to be performed at the beginning of the next 100 Hz tasklet, either NO_ACTION or RESET_COUNTERS. More... | |
enum notifyClients | notifyClients |
If clockAction is RESET_COUNTERS, whether to notify clients after resetting our software clocks. More... | |
struct pc104sg_status | status |
Status structure accessed by IRIG_GET_STATUS ioctl. More... | |
unsigned char | extendedStatus |
Instantaneous value of extended status bits, read from DP RAM at 100 Hz. More... | |
unsigned char | lastStatus |
Value of last extendedStatus, so we can detect SYNC <-> NOSYNC transitions. More... | |
int | lastSyncTime |
last time that software clock was set against a sync'd irig clock. More... | |
int | DP_RamExtStatusEnabled |
Set to true if ISR should send requests for status from dual-ported RAM. More... | |
int | DP_RamExtStatusRequested |
Set to true if ISR has sent a request for status from dual-ported RAM. More... | |
struct tasklet_struct | tasklet100Hz |
atomic_t | pending100Hz |
How many 100Hz ticks are yet unhandled in tasklet? More... | |
struct irig_callback * | oneHzCallback |
Our 1 Hz callback. More... | |
struct clockSnapShot | snapshot |
Snapshot of the hardware and software clock and status. More... | |
int | doSnapShot |
Set to true if the interrupt service routine should take a snapshot. More... | |
int | askedSnapShot |
Toward the end of a second, the bottom half asks the ISR for a clock snapshot. More... | |
struct clockSnapShot | resetSnapshot |
Snapshot taken by the ISR when clockAction == RESET_COUNTERS. More... | |
int | resetSnapshotDone |
RESETS snapshot has been taken. More... | |
unsigned char | statusOR |
An OR of the status bits since the last 1Hz snapshot. More... | |
struct list_head | CallbackLists [IRIG_NUM_RATES] |
struct list_head | CallbackPool |
Pool of allocated callback entries. More... | |
spinlock_t | cblist_lock |
Spinlock to control concurrent access to callback lists. More... | |
struct list_head | pendingAdds |
Callback entries that are to be added to the active list on next pass though loop. More... | |
struct irig_callback * | pendingRemoves [CALLBACK_POOL_SIZE] |
Callback entries that are to be removed on next pass though loop. More... | |
int | nPendingRemoves |
atomic_t | nPendingCallbackChanges |
wait_queue_head_t | callbackWaitQ |
wait_queue for tasks that want to wait until their callback is definitely not running. More... | |
int | max100HzBacklog |
int | ndtLast |
Number of 100 Hz delta-Ts the softare clock was off on the last check. More... | |
int | ndtNSecs |
Everything needed to access the board.
unsigned long pc104sg_board::addr |
int pc104sg_board::askedSnapShot |
Toward the end of a second, the bottom half asks the ISR for a clock snapshot.
This is used so that it doesn't ask twice in the second.
Referenced by pc104sg_bh_100Hz().
struct list_head pc104sg_board::CallbackLists[IRIG_NUM_RATES] |
Referenced by doCallbacklist(), doResyncCallbacks(), free_callbacks(), and handlePendingCallbacks().
struct list_head pc104sg_board::CallbackPool |
Pool of allocated callback entries.
Referenced by free_callbacks(), handlePendingCallbacks(), and register_irig_callback().
wait_queue_head_t pc104sg_board::callbackWaitQ |
wait_queue for tasks that want to wait until their callback is definitely not running.
Referenced by flush_irig_callbacks(), and handlePendingCallbacks().
spinlock_t pc104sg_board::cblist_lock |
Spinlock to control concurrent access to callback lists.
Referenced by free_callbacks(), pc104sg_bh_100Hz(), register_irig_callback(), and unregister_irig_callback().
struct class* pc104sg_board::class |
Referenced by pc104sg_cleanup().
enum clockAction pc104sg_board::clockAction |
Action to be performed at the beginning of the next 100 Hz tasklet, either NO_ACTION or RESET_COUNTERS.
Referenced by checkSoftTicker(), oneHzFunction(), pc104sg_bh_100Hz(), pc104sg_isr(), and setIRIGclock().
enum clockState pc104sg_board::clockState |
Current clock state.
Referenced by clockStateString(), get_irig_time_nolock(), oneHzFunction(), pc104sg_bh_100Hz(), pc104sg_isr(), and setMajorTime().
int pc104sg_board::count100Hz |
Referenced by pc104sg_bh_100Hz().
struct irig_device* pc104sg_board::dev |
Information needed by file operations.
Referenced by oneHzFunction(), pc104sg_open(), and pc104sg_release().
spinlock_t pc104sg_board::dev_lock |
spinlock used to control access to irig_device member.
dev member is accessed by a tasklet in software interrupt context so we must use a spinlock, not a mutex.
Referenced by oneHzFunction(), pc104sg_open(), and pc104sg_release().
struct device* pc104sg_board::device |
Referenced by pc104sg_cleanup().
char pc104sg_board::deviceName[32] |
Referenced by checkSoftTicker(), oneHzFunction(), pc104sg_init(), and pc104sg_ioctl().
int pc104sg_board::doSnapShot |
Set to true if the interrupt service routine should take a snapshot.
This is the 1 Hz clock quality snapshot.
Referenced by oneHzFunction(), pc104sg_bh_100Hz(), and pc104sg_isr().
int pc104sg_board::DP_RamExtStatusEnabled |
Set to true if ISR should send requests for status from dual-ported RAM.
Referenced by requestExtendedStatus(), and setIRIGclock().
int pc104sg_board::DP_RamExtStatusRequested |
Set to true if ISR has sent a request for status from dual-ported RAM.
Referenced by requestExtendedStatus(), and setIRIGclock().
unsigned char pc104sg_board::extendedStatus |
Instantaneous value of extended status bits, read from DP RAM at 100 Hz.
Referenced by pc104sg_isr(), and requestExtendedStatus().
unsigned char pc104sg_board::IntMask |
The three possible interrupts generated by this card are enabled with bits 5,6,7 of the status port:
5 = heartbeat 6 = match 7 = external-time-tag
Writing a 0 to bits 0-4 causes other things, like board reset, so we set those bits to 1 here in the interrupt mask.
Referenced by disableAllInts(), enableHeartBeatInt(), pc104sg_isr(), resetHeartBeatLatch(), and resetMatchLatch().
unsigned int pc104sg_board::ioport |
Referenced by pc104sg_cleanup().
int pc104sg_board::irq |
Referenced by pc104sg_cleanup().
unsigned char pc104sg_board::lastStatus |
Value of last extendedStatus, so we can detect SYNC <-> NOSYNC transitions.
Referenced by get_irig_time_nolock(), getTimeRegisters(), oneHzFunction(), pc104sg_isr(), setIRIGclock(), and setMajorTime().
int pc104sg_board::lastSyncTime |
last time that software clock was set against a sync'd irig clock.
Referenced by oneHzFunction().
spinlock_t pc104sg_board::lock |
Spinlock to control concurrent access to board registers and shared variables in this structure.
Referenced by checkSoftTicker(), irig_clock_gettime(), oneHzFunction(), pc104sg_bh_100Hz(), pc104sg_init(), pc104sg_ioctl(), pc104sg_isr(), readDPRAM(), setIRIGclock(), and writeDPRAM().
int pc104sg_board::max100HzBacklog |
Referenced by oneHzFunction(), and pc104sg_bh_100Hz().
int pc104sg_board::ndtLast |
Number of 100 Hz delta-Ts the softare clock was off on the last check.
Referenced by checkSoftTicker(), and setSoftTickers().
int pc104sg_board::ndtNSecs |
Referenced by checkSoftTicker(), and setSoftTickers().
enum notifyClients pc104sg_board::notifyClients |
If clockAction is RESET_COUNTERS, whether to notify clients after resetting our software clocks.
Referenced by oneHzFunction(), and pc104sg_bh_100Hz().
atomic_t pc104sg_board::nPendingCallbackChanges |
Referenced by flush_irig_callbacks(), handlePendingCallbacks(), register_irig_callback(), and unregister_irig_callback().
int pc104sg_board::nPendingRemoves |
Referenced by handlePendingCallbacks(), and unregister_irig_callback().
atomic_t pc104sg_board::num_opened |
How many concurrent opens of the device.
Referenced by pc104sg_open(), and pc104sg_release().
struct irig_callback* pc104sg_board::oneHzCallback |
Our 1 Hz callback.
Checks the clock snapshot, and sends a data sample if the device is opened.
Referenced by pc104sg_cleanup().
struct cdev pc104sg_board::pc104sg_cdev |
Linux character device.
Referenced by pc104sg_cleanup().
dev_t pc104sg_board::pc104sg_device |
Linux device.
Referenced by pc104sg_cleanup(), and pc104sg_init().
atomic_t pc104sg_board::pending100Hz |
How many 100Hz ticks are yet unhandled in tasklet?
Referenced by checkSoftTicker(), pc104sg_bh_100Hz(), pc104sg_isr(), and setSoftTickers().
struct list_head pc104sg_board::pendingAdds |
Callback entries that are to be added to the active list on next pass though loop.
Referenced by handlePendingCallbacks(), and register_irig_callback().
struct irig_callback* pc104sg_board::pendingRemoves[CALLBACK_POOL_SIZE] |
Callback entries that are to be removed on next pass though loop.
Referenced by handlePendingCallbacks(), and unregister_irig_callback().
struct clockSnapShot pc104sg_board::resetSnapshot |
Snapshot taken by the ISR when clockAction == RESET_COUNTERS.
Referenced by pc104sg_bh_100Hz(), and pc104sg_isr().
int pc104sg_board::resetSnapshotDone |
RESETS snapshot has been taken.
Referenced by pc104sg_bh_100Hz(), and pc104sg_isr().
struct clockSnapShot pc104sg_board::snapshot |
Snapshot of the hardware and software clock and status.
Referenced by oneHzFunction(), and pc104sg_isr().
struct pc104sg_status pc104sg_board::status |
Status structure accessed by IRIG_GET_STATUS ioctl.
Referenced by checkSoftTicker(), oneHzFunction(), pc104sg_ioctl(), pc104sg_isr(), pc104sg_open(), and setSoftTickers().
unsigned char pc104sg_board::statusOR |
An OR of the status bits since the last 1Hz snapshot.
Referenced by pc104sg_bh_100Hz(), and pc104sg_isr().
struct tasklet_struct pc104sg_board::tasklet100Hz |
Referenced by pc104sg_cleanup(), pc104sg_init(), and pc104sg_isr().
int pc104sg_board::TMsecClockTicker |
Our clock ticker, 1/10s of milliseconds since 00:00 GMT.
It is signed, since we are often computing time differences, and it is handy to initialize it to -1. There are 864,000,000 1/10 milliseconds in a day, so as a 32 bit signed integer, it has enough range for +- 2.4 days, but generally we restrict its value to the range 0:863,999,999.
Referenced by pc104sg_bh_100Hz(), pc104sg_isr(), and setSoftTickers().
int pc104sg_board::WriteClock |
Index into TMsecClock of the next clock value to be written.
Referenced by pc104sg_bh_100Hz().