mbgtools-lx  4.2.8
PCPS_DDEV_s Struct Reference

#include <pcpsdrvr.h>

Data Fields

PCPS_DEV dev
 Device info data that can be passed to user space. More...
 
PCPS_READ_FNCread
 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...
 

Detailed Description

Definition at line 777 of file pcpsdrvr.h.

Field Documentation

◆ acc_cycles

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

◆ access_in_progress

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.

◆ access_mode

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

◆ access_mode_forced

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

◆ asic_features

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

◆ asic_version

PCI_ASIC_VERSION PCPS_DDEV_s::asic_version

ASIC version.

Definition at line 795 of file pcpsdrvr.h.

Referenced by pcps_probe_device().

◆ builtin_features

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

◆ cdev

struct cdev PCPS_DDEV_s::cdev

Linux device class.

Definition at line 878 of file pcpsdrvr.h.

◆ cmd

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

◆ cmd_info

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

◆ connected

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

◆ data_avail

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

◆ dev

◆ dev_mutex

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

◆ fasyncptr

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

◆ gps_cmd

uint8_t PCPS_DDEV_s::gps_cmd

One of the PC_GPS_CMD_CODES.

Definition at line 845 of file pcpsdrvr.h.

◆ gps_cmd_info

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

◆ io_buffer

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

◆ irq_ack_mask

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

◆ irq_ack_port

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

◆ irq_disb_mask

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

◆ irq_enb_disb_port

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

◆ irq_enb_mask

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

◆ irq_flag_mask

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

◆ irq_flag_port

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

◆ irq_stat_info

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

◆ jiffies_at_irq

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

◆ lx_dev

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

◆ mm_asic_addr

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

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

◆ n_bytes

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

◆ open_count

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

◆ raw_asic_version

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

◆ read

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

◆ rsrc_info

PCPS_RSRC_INFO PCPS_DDEV_s::rsrc_info

◆ size_n_bytes

uint8_t PCPS_DDEV_s::size_n_bytes

◆ status_port

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

◆ status_port_offs

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

◆ t

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

◆ uc

uint8_t PCPS_DDEV_s::uc

Definition at line 852 of file pcpsdrvr.h.

Referenced by pcps_init_gps_transfer().

◆ wait_queue

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

◆ xdev_features

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


The documentation for this struct was generated from the following file: