mbgtools-lx
4.2.8
|
#include <pcpsdrvr.h>
Data Fields | |
PCPS_DEV | dev |
Device info data that can be passed to user space. More... | |
PCPS_READ_FNC * | read |
Pointer to the read function depending on the access mode. More... | |
uint | access_mode |
Access mode used for the device, depending on interface type. See PCPS_ACCESS_MODES. More... | |
bool | access_mode_forced |
Flag indicating that the access mode was forced. More... | |
MBG_IOPORT_ADDR_MAPPED | status_port_offs |
MBG_IOPORT_ADDR_MAPPED | status_port |
Address of the status port register. More... | |
MBG_IOPORT_ADDR_MAPPED | irq_enb_disb_port |
Address of the IRQ control register. More... | |
MBG_IOPORT_ADDR_MAPPED | irq_flag_port |
Address of the IRQ status register. More... | |
MBG_IOPORT_ADDR_MAPPED | irq_ack_port |
Address of the register to acknowledge an IRQ. More... | |
uint32_t | irq_enb_mask |
Bit mask to be set to enable IRQs. More... | |
uint32_t | irq_disb_mask |
Bit mask to be cleared to disable IRQs. More... | |
uint32_t | irq_flag_mask |
Bit mask used to check if device has generated an IRQ. More... | |
uint32_t | irq_ack_mask |
Bit mask to be set to acknowledge an IRQ. More... | |
PCI_ASIC_VERSION | raw_asic_version |
Raw ASIC version. More... | |
PCI_ASIC_VERSION | asic_version |
ASIC version. More... | |
PCI_ASIC_FEATURES | asic_features |
ASIC feature mask. More... | |
PCPS_RSRC_INFO | rsrc_info |
Summary of resources used by the device. More... | |
MBG_PC_CYCLES | acc_cycles |
Cycles count taken when device was accessed last time. More... | |
MBG_MUTEX | dev_mutex |
Mutex used for device access serialization. More... | |
PCI_ASIC volatile __iomem * | mm_asic_addr |
PCPS_TIME_STAMP volatile __iomem * | mm_tstamp_addr |
PCPS_IRQ_STAT_INFO | irq_stat_info |
BUILTIN_FEATURE_MASK | builtin_features |
Mask of builtin features, depending on device type. More... | |
MBG_XDEV_FEATURES | xdev_features |
Receiver info plus extended device features. More... | |
union { | |
uint8_t cmd | |
In case of small data we just need one of the PCPS_CMD_CODES. More... | |
struct { | |
uint8_t cmd | |
PCPS_READ_GPS_DATA or PCPS_WRITE_GPS_DATA. More... | |
uint8_t gps_cmd | |
One of the PC_GPS_CMD_CODES. More... | |
} gps_cmd_info | |
} | cmd_info |
uint16_t | n_bytes |
uint8_t | size_n_bytes |
uint8_t | uc |
PCPS_IO_BUFFER | io_buffer |
atomic_t | connected |
Flag indicating if the device is "connected". More... | |
atomic_t | access_in_progress |
Flag indicating if device access is currently in progress. More... | |
atomic_t | data_avail |
Flag indicating if data has been made available by IRQ handler. More... | |
unsigned long | jiffies_at_irq |
Set by IRQ handler, used to check if cyclic IRQs still occur. More... | |
struct fasync_struct * | fasyncptr |
Used for asynchronous signalling when data is available. More... | |
PCPS_TIME | t |
Date and time read by IRQ handler. More... | |
struct wait_queue * | wait_queue |
Used for asynchronous I/O (older kernel API) More... | |
atomic_t | open_count |
Number of processes that have opened this device. More... | |
struct cdev | cdev |
Linux device class. More... | |
dev_t | lx_dev |
Linux device associated with this device. More... | |
Definition at line 777 of file pcpsdrvr.h.
MBG_PC_CYCLES PCPS_DDEV_s::acc_cycles |
Cycles count taken when device was accessed last time.
Definition at line 799 of file pcpsdrvr.h.
Referenced by ioctl_switch(), pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), pcps_read_std(), report_io_cmd(), and report_ret_val().
atomic_t PCPS_DDEV_s::access_in_progress |
Flag indicating if device access is currently in progress.
Definition at line 864 of file pcpsdrvr.h.
uint PCPS_DDEV_s::access_mode |
Access mode used for the device, depending on interface type. See PCPS_ACCESS_MODES.
Definition at line 782 of file pcpsdrvr.h.
Referenced by report_access_mode(), and set_access_mode().
bool PCPS_DDEV_s::access_mode_forced |
Flag indicating that the access mode was forced.
Definition at line 783 of file pcpsdrvr.h.
Referenced by report_access_mode(), and set_access_mode().
PCI_ASIC_FEATURES PCPS_DDEV_s::asic_features |
ASIC feature mask.
Definition at line 796 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and pcps_probe_device().
PCI_ASIC_VERSION PCPS_DDEV_s::asic_version |
BUILTIN_FEATURE_MASK PCPS_DDEV_s::builtin_features |
Mask of builtin features, depending on device type.
Definition at line 822 of file pcpsdrvr.h.
Referenced by pcps_chk_dev_feat(), and pcps_probe_device().
struct cdev PCPS_DDEV_s::cdev |
Linux device class.
Definition at line 878 of file pcpsdrvr.h.
uint8_t PCPS_DDEV_s::cmd |
In case of small data we just need one of the PCPS_CMD_CODES.
PCPS_READ_GPS_DATA or PCPS_WRITE_GPS_DATA.
Definition at line 838 of file pcpsdrvr.h.
Referenced by release_cyclic_lock(), and report_ret_val().
union { ... } PCPS_DDEV_s::cmd_info |
A tiny buffer that can be used to write a command or GPS (large data) command to a device. Such buffer may need to be DMA capable, which is the case for this private data structure, but is usually not the case for automatic variables. So if we use this we avoid having to allocate/free an extra buffer for each access.
Referenced by release_cyclic_lock(), and report_ret_val().
atomic_t PCPS_DDEV_s::connected |
Flag indicating if the device is "connected".
Definition at line 863 of file pcpsdrvr.h.
Referenced by get_dev_connected(), and set_dev_connected().
atomic_t PCPS_DDEV_s::data_avail |
Flag indicating if data has been made available by IRQ handler.
Definition at line 865 of file pcpsdrvr.h.
Referenced by mbgclock_flush(), mbgclock_poll(), mbgclock_read(), and release_cyclic_lock().
PCPS_DEV PCPS_DDEV_s::dev |
Device info data that can be passed to user space.
Definition at line 779 of file pcpsdrvr.h.
Referenced by check_feature(), check_receiver_info_and_features(), check_ri_features(), ioctl_switch(), mbg_get_device_info(), pcps_add_rsrc_irq(), pcps_chk_dev_feat(), pcps_cleanup_device(), pcps_detect_isa_devices(), pcps_probe_device(), pcps_release_rsrcs(), ptp270pex_can_flag_ready(), and setup_sernum_and_receiver_info().
MBG_MUTEX PCPS_DDEV_s::dev_mutex |
Mutex used for device access serialization.
Definition at line 802 of file pcpsdrvr.h.
Referenced by pcps_cleanup_ddev(), pcps_init_ddev(), pcps_probe_device(), and release_cyclic_lock().
struct fasync_struct* PCPS_DDEV_s::fasyncptr |
Used for asynchronous signalling when data is available.
Definition at line 867 of file pcpsdrvr.h.
Referenced by mbgclock_fasync(), mbgclock_release(), and release_cyclic_lock().
uint8_t PCPS_DDEV_s::gps_cmd |
One of the PC_GPS_CMD_CODES.
Definition at line 845 of file pcpsdrvr.h.
struct { ... } PCPS_DDEV_s::gps_cmd_info |
In case of large data we first need PCPS_READ_GPS_DATA or PCPS_WRITE_GPS_DATA, then one of the PC_GPS_CMD_CODES.
Referenced by report_ret_val().
PCPS_IO_BUFFER PCPS_DDEV_s::io_buffer |
Definition at line 855 of file pcpsdrvr.h.
Referenced by ioctl_switch(), pcps_get_fw_id(), pcps_probe_device(), and report_ret_val().
uint32_t PCPS_DDEV_s::irq_ack_mask |
Bit mask to be set to acknowledge an IRQ.
Definition at line 792 of file pcpsdrvr.h.
Referenced by pcps_check_pex_irq_unsafe(), and pcps_probe_device().
MBG_IOPORT_ADDR_MAPPED PCPS_DDEV_s::irq_ack_port |
Address of the register to acknowledge an IRQ.
Definition at line 788 of file pcpsdrvr.h.
Referenced by pcps_check_pex_irq_unsafe(), and pcps_probe_device().
uint32_t PCPS_DDEV_s::irq_disb_mask |
Bit mask to be cleared to disable IRQs.
Definition at line 790 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
MBG_IOPORT_ADDR_MAPPED PCPS_DDEV_s::irq_enb_disb_port |
Address of the IRQ control register.
Definition at line 786 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
uint32_t PCPS_DDEV_s::irq_enb_mask |
Bit mask to be set to enable IRQs.
Definition at line 789 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
uint32_t PCPS_DDEV_s::irq_flag_mask |
Bit mask used to check if device has generated an IRQ.
Definition at line 791 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
MBG_IOPORT_ADDR_MAPPED PCPS_DDEV_s::irq_flag_port |
Address of the IRQ status register.
Definition at line 787 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
PCPS_IRQ_STAT_INFO PCPS_DDEV_s::irq_stat_info |
IRQ status information, e.g. whether the device's IRQ is possibly unsafe, and whether IRQ has been enabled on the device.
Definition at line 820 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_irq_stat_info(), mbgdrvr_disable_cyclic(), mbgdrvr_enable_cyclic(), and pcps_check_pex_irq_unsafe().
unsigned long PCPS_DDEV_s::jiffies_at_irq |
Set by IRQ handler, used to check if cyclic IRQs still occur.
Definition at line 866 of file pcpsdrvr.h.
Referenced by mbgclock_poll(), mbgdrvr_enable_cyclic(), and release_cyclic_lock().
dev_t PCPS_DDEV_s::lx_dev |
Linux device associated with this device.
Definition at line 879 of file pcpsdrvr.h.
Referenced by ddev_list_remove_entry().
PCI_ASIC volatile __iomem* PCPS_DDEV_s::mm_asic_addr |
Base address of the ASIC part of the register block if it has been mapped to memory, else NULL.
Definition at line 807 of file pcpsdrvr.h.
Referenced by pcps_probe_device(), pcps_release_rsrcs(), report_io_cmd(), and setup_mm_addr().
PCPS_TIME_STAMP volatile __iomem* PCPS_DDEV_s::mm_tstamp_addr |
Base address of the timestamp register if it has been mapped to memory, else NULL.
Definition at line 811 of file pcpsdrvr.h.
Referenced by do_get_fast_hr_timestamp_cycles_safe(), do_get_fast_hr_timestamp_safe(), pcps_release_rsrcs(), setup_mm_addr(), and swap_tstamp().
uint16_t PCPS_DDEV_s::n_bytes |
Definition at line 850 of file pcpsdrvr.h.
Referenced by pcps_init_gps_transfer(), and pcps_write_gps().
atomic_t PCPS_DDEV_s::open_count |
Number of processes that have opened this device.
Definition at line 876 of file pcpsdrvr.h.
Referenced by mbgclock_open(), mbgclock_read(), mbgclock_release(), and mbgdrvr_enable_cyclic().
PCI_ASIC_VERSION PCPS_DDEV_s::raw_asic_version |
Raw ASIC version.
Definition at line 794 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and pcps_probe_device().
PCPS_READ_FNC* PCPS_DDEV_s::read |
Pointer to the read function depending on the access mode.
Definition at line 781 of file pcpsdrvr.h.
Referenced by set_access_mode().
PCPS_RSRC_INFO PCPS_DDEV_s::rsrc_info |
Summary of resources used by the device.
Definition at line 797 of file pcpsdrvr.h.
Referenced by mbgclock_mmap(), pcps_add_rsrc_io(), pcps_add_rsrc_irq(), pcps_add_rsrc_mem(), pcps_cleanup_device(), pcps_probe_device(), pcps_release_rsrcs(), report_access_mode(), and setup_mm_addr().
uint8_t PCPS_DDEV_s::size_n_bytes |
Definition at line 851 of file pcpsdrvr.h.
Referenced by pcps_check_gps_data_size(), pcps_init_gps_transfer(), pcps_read_gps_block(), and pcps_write_gps().
MBG_IOPORT_ADDR_MAPPED PCPS_DDEV_s::status_port |
Address of the status port register.
Definition at line 785 of file pcpsdrvr.h.
Referenced by _pcps_ddev_read_status_port(), pcps_probe_device(), and report_io_cmd().
MBG_IOPORT_ADDR_MAPPED PCPS_DDEV_s::status_port_offs |
Definition at line 784 of file pcpsdrvr.h.
Referenced by _pcps_ddev_read_status_port(), and pcps_probe_device().
PCPS_TIME PCPS_DDEV_s::t |
Date and time read by IRQ handler.
Definition at line 868 of file pcpsdrvr.h.
Referenced by mbgclock_read(), and release_cyclic_lock().
uint8_t PCPS_DDEV_s::uc |
Definition at line 852 of file pcpsdrvr.h.
Referenced by pcps_init_gps_transfer().
struct wait_queue* PCPS_DDEV_s::wait_queue |
Used for asynchronous I/O (older kernel API)
Definition at line 873 of file pcpsdrvr.h.
Referenced by mbgclock_poll(), mbgclock_read(), and release_cyclic_lock().
MBG_XDEV_FEATURES PCPS_DDEV_s::xdev_features |
Receiver info plus extended device features.
Definition at line 823 of file pcpsdrvr.h.
Referenced by pcps_chk_dev_feat().