mbgtools-lx
4.2.8
|
#include <pcpsdrvr.h>
#include <identdec.h>
#include <mbgddmsg.h>
#include <plxdefs.h>
#include <pci_asic.h>
#include <amccdefs.h>
#include <pcidefs.h>
#include <pci.h>
Go to the source code of this file.
Macros | |
#define | _PCPSDRVR |
#define | REPORT_CFG 10 |
#define | REPORT_CFG_DETAILS 1 |
#define | REPORT_CFG_LOG_LVL MBG_LOG_INFO |
#define | TEST_CFG_DETAILS 0 |
#define | USE_CMD_PTR 1 |
#define | DEBUG_ACCESS_TIMING 0 |
#define | DEBUG_IO_TIMING 0 |
#define | DEBUG_IO 1 |
#define | DEBUG_PORTS 1 |
#define | DEBUG_SERNUM 1 |
#define | USE_USB_MICRO_FRAMES 0 |
#define | TEST_PORT_ACCESS 0 |
#define | MUST_REPORT_PROBE_DEVICE_DETAILS 1 |
#define | MUST_REPORT_ACCESS_MODE 1 |
#define | PCPS_LOG_STD_MSGS 0 |
#define | _do_div(_x, _y) do { _x /= _y; } while ( 0 ) |
#define | MAX_BOOT_TIME_PTP270PEX 27 |
Max. time required for PTP270PEX v1 card to be ready after power-up. More... | |
#define | _fmemcpy(_d, _s, _n) memcpy( _d, _s, _n ) |
#define | _fstrlen(_s) strlen( _s ) |
#define | _fstrncmp(_s1, _s2, _n) strncmp( (_s1), (_s2), (_n) ) |
#define | static_wc |
#define | FMT_03X "%03X" |
#define | FMT_08X "%08lX" |
#define | _pcps_irq_flags unsigned long irq_flags; |
#define | _pcps_disb_local_irq_save() local_irq_save( irq_flags ) |
#define | _pcps_local_irq_restore() local_irq_restore( irq_flags ) |
#define | _pcps_time_after(_curr, _tmo) ( _curr >= _tmo ) |
#define | MBG_TGT_HAS_UPTIME 1 |
#define | FP_FMT "%p" |
Typedefs | |
typedef unsigned int | PCI_DWORD |
Functions | |
static __mbg_inline int | pcps_ddev_is_ptp270pex (const PCPS_DDEV *pddev) |
Check if a device is a PTP270PEX card. More... | |
static int | mbg_plx_read_pecs_reg (struct pci_dev *pNode, uint16_t reg, uint32_t *pval) |
Read a dword from a PLX PECS register. More... | |
static bool | ptp270pex_can_flag_ready (const PCPS_DDEV *pddev) |
Check if a PTP270PEX card can indicate when it's ready. More... | |
static bool | ptp270pex_has_flagged_ready (const PCPS_DDEV *pddev) |
Check if a PTP270PEX card indicates it is ready. More... | |
static void | report_uptime (const MBG_SYS_UPTIME *p_uptime) |
Report the system uptime. More... | |
static void | wait_ptp270pex_ready (const PCPS_DDEV *pddev) |
Wait until a PTP270PEX card is ready after power-up. More... | |
static bool | pcps_check_pex_irq_unsafe (PCPS_DDEV *pddev, uint16_t req_fw_ver, uint8_t req_asic_ver_major, uint8_t req_asic_ver_minor) |
Check if IRQ usage with a device is unsafe. More... | |
static int | setup_mm_addr (PCPS_DDEV *pddev) |
Setup the memory mapped addresses depending on the device type. More... | |
void | pcps_dump_data (const void *buffer, size_t count, const char *info) |
static void | report_io_cmd (uint8_t cmd, uint16_t count, const char *info) |
static void | report_ret_val (int rc, const char *info) |
Report the return code to be returned by a function. More... | |
__mbg_inline int | pcps_wait_busy (PCPS_DDEV *pddev) |
Wait as long as a device is busy, or until timeout. More... | |
static int | pcps_read_null (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count) |
Dummy read function. More... | |
static int | pcps_read_std (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count) |
Read function for devices with ISA or micro channel bus. More... | |
static int | pcps_read_amcc_s5933 (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count) |
Read function for devices with AMCC S5933 PCI interface chip. More... | |
static int | pcps_read_amcc_s5920 (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count) |
Read function for devices with AMCC S5920 PCI interface chip. More... | |
static int | pcps_read_asic (PCPS_DDEV *pddev, uint8_t cmd, void FAR *buffer, uint16_t count) |
Read function for devices with Meinberg PCI interface ASIC. More... | |
int | pcps_write (PCPS_DDEV *pddev, uint8_t cmd, const void FAR *buffer, uint16_t count) |
Write data to a device. More... | |
int | pcps_generic_io (PCPS_DDEV *pddev, uint8_t type, const void FAR *in_buff, uint8_t in_cnt, void FAR *out_buff, uint8_t out_cnt) |
Generic I/O function. More... | |
static int | pcps_check_gps_data_size (PCPS_DDEV *pddev, uint16_t count, const char *info) |
Determine which interface buffer size is supported. More... | |
static int | pcps_init_gps_transfer (PCPS_DDEV *pddev, uint8_t cmd, uint8_t data_type, uint16_t count, const char *info) |
Initialize GPS data transfer. More... | |
static int | pcps_read_gps_block (PCPS_DDEV *pddev, uint8_t data_type, void FAR *buffer, uint16_t count, uint8_t block_num, uint8_t block_size) |
Get a block of data from a GPS device. More... | |
int | pcps_read_gps (PCPS_DDEV *pddev, uint8_t data_type, void FAR *buffer, uint16_t count) |
Read a large data structure from a device. More... | |
int | pcps_write_gps (PCPS_DDEV *pddev, uint8_t data_type, const void FAR *buffer, uint16_t count) |
Write a large data structure to a device. More... | |
static int | pcps_get_fw_id (PCPS_DDEV *pddev, PCPS_ID_STR FAR fw_id) |
Read the firmware ID from a device. More... | |
static int | pcps_check_id (PCPS_DDEV *pddev, const char FAR *ref) |
Check an ASCIIZ string for a valid signature. More... | |
static PCPS_FW_REV_NUM | pcps_get_rev_num (char FAR *idstr) |
Retrieve a version number from a firmware ID string. More... | |
static bool | str_remove_unprintables (char *s, size_t max_len) |
Remove unprintable characters from a string. More... | |
static void | beautify_sernum (char *s, size_t max_len) |
static void | check_unknown_sernum (char *s, size_t max_len) |
static const char * | get_bus_type_str (const PCPS_DDEV *pddev) |
static void | report_probe_device (const PCPS_DDEV *pddev) |
static const char * | get_pcps_feature_name (PCPS_FEATURES flag_mask) |
Get the name assigned to one of the PCPS_FEATURE_MASKS flags. More... | |
static void | dump_receiver_info (const PCPS_DDEV *pddev) |
static void | dump_xfeature_buffer (const PCPS_DDEV *pddev) |
static void | dump_tlv_info (const PCPS_DDEV *pddev) |
static void | check_feature (PCPS_DDEV *pddev, ushort req_rev_num, PCPS_FEATURES flag_mask) |
Check the firmware to see if a specific feature is supported. More... | |
static void | check_ri_features (PCPS_DDEV *pddev) |
Check the receiver info features to see if a specific feature is supported. More... | |
int | setup_sernum_and_receiver_info (PCPS_DDEV *pddev) |
Read the serial number and receiver info from the device. More... | |
void | check_receiver_info_and_features (PCPS_DDEV *pddev) |
Check the receiver info and features. More... | |
void | pcps_release_rsrcs (PCPS_DDEV *pddev) |
Release I/O port and memory resource that have been claimed before. More... | |
PCPS_DEV_TYPE * | pcps_get_dev_type_table_entry (PCPS_BUS_FLAGS bus_mask, PCPS_DEV_ID dev_id) |
Lookup a specific device in the device table. More... | |
static void | pcps_free_ddev_struc (PCPS_DDEV **ppddev) |
Free a previously allocated device info structure. More... | |
static int | pcps_alloc_ddev_struc (PCPS_DDEV **ppddev) |
Allocate a device info structure for a device. More... | |
int | pcps_init_ddev (PCPS_DDEV **ppddev) |
Allocate and initialize a device info structure. More... | |
void | pcps_cleanup_ddev (PCPS_DDEV *pddev) |
Clean up and free a previously initialized device info structure. More... | |
static void | rsrc_port_to_cfg_port (PCPS_SHORT_PORT_RSRC *p_short_port_rsrc, const MBG_IOPORT_RSRC *p_io_rsrc) |
Convert a raw I/O base address to a short format. More... | |
int | pcps_add_rsrc_io (PCPS_DDEV *pddev, MBG_IOPORT_ADDR_RAW base, ulong num) |
Add an I/O address range resource to the device structure. More... | |
int | pcps_add_rsrc_mem (PCPS_DDEV *pddev, MBG_IOMEM_ADDR_RAW start, ulong len) |
Add a memory address range resource to the device structure. More... | |
int | pcps_add_rsrc_irq (PCPS_DDEV *pddev, int16_t irq_num) |
Add an IRQ number resource to the device structure. More... | |
int | pcps_chk_dev_feat (PCPS_DDEV *p_ddev, uint feat_type, uint feat_num) |
Check if a specific feature of a specific feature type is supported. More... | |
static void | set_access_mode (PCPS_DDEV *pddev, uint mode, bool forced, PCPS_READ_FNC *read_fnc) |
static void | report_access_mode (const PCPS_DDEV *pddev) |
int | pcps_probe_device (PCPS_DDEV *pddev, PCPS_BUS_NUM bus_num, PCPS_SLOT_NUM dev_fnc_num) |
Probe if a device is supported, and allocate and setup the device structure. More... | |
void | pcps_cleanup_device (PCPS_DDEV *pddev) |
Clean up function called by pcps_probe_device on error. More... | |
void | pcps_detect_isa_devices (PCPS_DDEV_INIT_FNC *ddev_init_fnc, PCPS_DDEV_CLEANUP_FNC *ddev_cleanup_fnc, PCPS_DDEV_REGISTER_FNC *ddev_register_fnc, int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS]) |
Detect and initialize ISA devices in a non-PnP system. More... | |
static void _MBG_INIT_CODE_ATTR | pcps_detect_devices_init (PCPS_DDEV_INIT_FNC *ddev_init_fnc, PCPS_DDEV_CLEANUP_FNC *ddev_cleanup_fnc, int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS]) |
_PCPS_USE_ISA_PNP More... | |
void _MBG_INIT_CODE_ATTR | pcps_detect_devices (int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS]) |
Detect all bus-level devices in a non-PnP system. More... | |
Variables | |
static const char | str_empty [] = "" |
static const char | str_unkn_braced [] = "(unknown)" |
static const char | str_spc_gps [] = " GPS" |
static MBG_PC_CYCLES_FREQUENCY | pc_cycles_frequency |
Clock frequency of the PC's cycles counter, in [Hz]. More... | |
static uint32_t | ri_feat_tbl [N_GPS_FEATURE] |
A table used to map RECEIVER_INFO::features to PCPS_DEV_CFG::features. More... | |
static const char * | gps_ri_feature_names [N_GPS_FEATURE] = { "Pulse Per Second", "Pulse Per Minute", "Programmable Synth.", "DCF77 Time Marks", "IRIG Out", "IRIG In", "IPv4 LAN Interface", "Multiple Ref. Sources", "Receive Timeout", "Ignore Lock", "5 MHz Output", "Ext. Multiple Ref. Src. Cfg.", "Optional Settings", "Configurable Time Scale", "IRIG Control Bits", "PTP/IEEE1588", "Nav. Engine Settings", "Raw IRIG Data", "Raw IRIG Time", "PTP/IEEE1588 Unicast", "General Purpose I/O", "Multiple XMRS Instances", "10 MHz Output Disabled", "Event Logging", "IMS data", "HaveQuick", "NTP", "Ext. Network Config", "Versatile Storage", "SHS", "Extended Binary Protocol", "Extended Features" } |
A table of name strings associated with GPS_FEATURE_BITS. More... | |
static const char * | pcps_feature_names [N_PCPS_FEATURE_BITS] = PCPS_FEATURE_NAMES |
A table of name strings associated with PCPS_FEATURE_BITS. More... | |
PCPS_READ_FNC | pcps_read_null |
PCPS_READ_FNC | pcps_read_std |
PCPS_READ_FNC | pcps_read_amcc_s5933 |
PCPS_READ_FNC | pcps_read_amcc_s5920 |
PCPS_READ_FNC | pcps_read_asic |
PCPS_WRITE_FNC | pcps_write |
PCPS_READ_FNC | pcps_read_gps |
PCPS_WRITE_FNC | pcps_write_gps |
#define _do_div | ( | _x, | |
_y | |||
) | do { _x /= _y; } while ( 0 ) |
Definition at line 516 of file pcpsdrvr.c.
Referenced by report_io_cmd().
#define _fmemcpy | ( | _d, | |
_s, | |||
_n | |||
) | memcpy( _d, _s, _n ) |
Definition at line 558 of file pcpsdrvr.c.
#define _fstrlen | ( | _s | ) | strlen( _s ) |
Definition at line 559 of file pcpsdrvr.c.
Referenced by pcps_check_id(), and pcps_get_rev_num().
#define _fstrncmp | ( | _s1, | |
_s2, | |||
_n | |||
) | strncmp( (_s1), (_s2), (_n) ) |
Definition at line 560 of file pcpsdrvr.c.
Referenced by pcps_check_id().
#define _pcps_disb_local_irq_save | ( | ) | local_irq_save( irq_flags ) |
Definition at line 589 of file pcpsdrvr.c.
Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), and pcps_read_std().
#define _pcps_irq_flags unsigned long irq_flags; |
Definition at line 586 of file pcpsdrvr.c.
Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), and pcps_read_std().
#define _pcps_local_irq_restore | ( | ) | local_irq_restore( irq_flags ) |
Definition at line 592 of file pcpsdrvr.c.
Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), and pcps_read_std().
#define _pcps_time_after | ( | _curr, | |
_tmo | |||
) | ( _curr >= _tmo ) |
Definition at line 625 of file pcpsdrvr.c.
Referenced by pcps_wait_busy().
#define _PCPSDRVR |
Definition at line 362 of file pcpsdrvr.c.
#define DEBUG_ACCESS_TIMING 0 |
Definition at line 438 of file pcpsdrvr.c.
#define DEBUG_IO 1 |
Definition at line 454 of file pcpsdrvr.c.
#define DEBUG_IO_TIMING 0 |
Definition at line 447 of file pcpsdrvr.c.
#define DEBUG_PORTS 1 |
Definition at line 462 of file pcpsdrvr.c.
#define DEBUG_SERNUM 1 |
Definition at line 470 of file pcpsdrvr.c.
#define FMT_03X "%03X" |
Definition at line 573 of file pcpsdrvr.c.
Referenced by pcps_detect_isa_devices().
#define FMT_08X "%08lX" |
Definition at line 574 of file pcpsdrvr.c.
Referenced by pcps_cleanup_device(), and pcps_detect_isa_devices().
#define FP_FMT "%p" |
#define MAX_BOOT_TIME_PTP270PEX 27 |
Max. time required for PTP270PEX v1 card to be ready after power-up.
The PTP270PEX cards have an on-board Linux system which must have finished booting before the card can be accessed via the PCI bus. If the card is accessed earlier then the PCI bus and thus the computer may hang.
There are 2 different hardware versions of the PTP270PEX card. PTP270PEX v2 hardware and firmware can flag via a bit in the PCI configuration space when the card is ready, so the driver can just wait until the card has flagged that it's ready.
However, the PTP270PEX v1 hardware doesn't support this, so the driver checks the system uptime and waits until it is greater or equal the maximum time required for a PTP270PEX v1 card to finish booting.
The nominal time is 27 s, but if a firmware update has been submitted then the update is applied first, which takes another few seconds.
Definition at line 543 of file pcpsdrvr.c.
Referenced by report_uptime(), and wait_ptp270pex_ready().
#define MBG_TGT_HAS_UPTIME 1 |
Definition at line 638 of file pcpsdrvr.c.
#define MUST_REPORT_ACCESS_MODE 1 |
Definition at line 495 of file pcpsdrvr.c.
#define MUST_REPORT_PROBE_DEVICE_DETAILS 1 |
Definition at line 489 of file pcpsdrvr.c.
#define PCPS_LOG_STD_MSGS 0 |
Definition at line 504 of file pcpsdrvr.c.
#define REPORT_CFG 10 |
Definition at line 409 of file pcpsdrvr.c.
#define REPORT_CFG_DETAILS 1 |
Definition at line 417 of file pcpsdrvr.c.
#define REPORT_CFG_LOG_LVL MBG_LOG_INFO |
Definition at line 423 of file pcpsdrvr.c.
Referenced by check_feature(), check_receiver_info_and_features(), check_ri_features(), dump_receiver_info(), dump_tlv_info(), dump_xfeature_buffer(), and setup_sernum_and_receiver_info().
#define static_wc |
Definition at line 572 of file pcpsdrvr.c.
Referenced by pcps_release_rsrcs().
#define TEST_CFG_DETAILS 0 |
Definition at line 426 of file pcpsdrvr.c.
#define TEST_PORT_ACCESS 0 |
Definition at line 484 of file pcpsdrvr.c.
#define USE_CMD_PTR 1 |
Definition at line 430 of file pcpsdrvr.c.
#define USE_USB_MICRO_FRAMES 0 |
Definition at line 477 of file pcpsdrvr.c.
typedef unsigned int PCI_DWORD |
Definition at line 578 of file pcpsdrvr.c.
|
static |
Definition at line 3749 of file pcpsdrvr.c.
References _pcps_ddev_sernum, and str_remove_unprintables().
Referenced by setup_sernum_and_receiver_info().
|
static |
Check the firmware to see if a specific feature is supported.
Some devices provide a specific feature only starting with a specific firmware version, but the device provides no way to test this, so the feature flag in the device structure is set if the firmware has the required version.
[in,out] | pddev | Pointer to the device structure |
[in] | req_rev_num | Revision number required for the feature to be supported |
[in] | flag_mask | Flag mask of the feature to be tested |
Definition at line 4001 of file pcpsdrvr.c.
References _mbg_kdd_msg_5, _pcps_ddev_fw_rev_num, _pcps_ddev_type_name, PCPS_DEV::cfg, PCPS_DDEV_s::dev, PCPS_DEV_CFG::features, get_pcps_feature_name(), REPORT_CFG_LOG_LVL, and str_empty.
Referenced by pcps_probe_device().
void check_receiver_info_and_features | ( | PCPS_DDEV * | pddev | ) |
Check the receiver info and features.
[in,out] | pddev | Pointer to a device structure |
Definition at line 4274 of file pcpsdrvr.c.
References _mbg_kdd_msg_3, _mbg_kdd_msg_4, _mbgddmsg_2, _pcps_ddev_features, _pcps_ddev_fw_id, _pcps_ddev_fw_rev_num, _pcps_ddev_sernum, _pcps_ddev_type_name, _pcps_read_gps_var, _ri_addr, _set_tlv_feat_bit, _set_xfeature_bit, _tlv_feat_buffp, _tlv_info_addr, _xfeat_addr, PCPS_DEV::cfg, check_ri_features(), DEBUG_DEV_INIT, PCPS_DDEV_s::dev, DEV_FEAT_TYPE_RI, DEV_FEAT_TYPE_XFEAT, dump_receiver_info(), dump_tlv_info(), dump_xfeature_buffer(), PCPS_DEV_CFG::features, GPS_FEAT_XFEATURE, MAX_PARM_PORT, MAX_PARM_POUT, MAX_PARM_STR_TYPE, MBG_DEV_NAME_FMT, MBG_LOG_INFO, MBG_LOG_WARN, mbg_rc_is_error, mbg_rc_is_success, mbg_strerror(), MBG_TLV_FEAT_TYPE_FW_UPDATE, MBG_XFEATURE_SAVE_CFG, MBG_XFEATURE_TLV_API, RECEIVER_INFO::n_com_ports, N_MBG_TLV_FEAT_TYPES, N_MBG_XFEATURE, RECEIVER_INFO::n_prg_out, RECEIVER_INFO::n_str_type, PC_GPS_TLV_INFO, PC_GPS_XFEATURE_BUFFER, pcps_chk_dev_feat(), PCPS_HAS_EVENT_TIME, and REPORT_CFG_LOG_LVL.
|
static |
Check the receiver info features to see if a specific feature is supported.
Some devices provide a RECEIVER_INFO which provides some flags that can be mapped to the feature flags we use internally, so we scan these features and update the internal features mask accordingly.
[in,out] | pddev | Pointer to the device structure |
Definition at line 4031 of file pcpsdrvr.c.
References _mbg_kdd_msg_3, _mbg_kdd_msg_4, _pcps_ddev_fw_rev_num, _pcps_ddev_type_name, _ri_addr, PCPS_DEV::cfg, PCPS_DDEV_s::dev, PCPS_DEV_CFG::features, RECEIVER_INFO::features, gps_ri_feature_names, N_GPS_FEATURE, pcps_feature_names, REPORT_CFG_LOG_LVL, and ri_feat_tbl.
Referenced by check_receiver_info_and_features().
|
static |
Definition at line 3792 of file pcpsdrvr.c.
Referenced by setup_sernum_and_receiver_info().
|
static |
Definition at line 3891 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _mbg_kdd_msg_2, _ri_addr, SW_REV::code, RECEIVER_INFO::epld_name, RECEIVER_INFO::features, RECEIVER_INFO::fixed_freq, RECEIVER_INFO::flags, FIXED_FREQ_INFO::khz_val, RECEIVER_INFO::model_code, RECEIVER_INFO::model_name, RECEIVER_INFO::n_channels, RECEIVER_INFO::n_com_ports, RECEIVER_INFO::n_prg_out, RECEIVER_INFO::n_str_type, RECEIVER_INFO::n_ucaps, SW_REV::name, RECEIVER_INFO::osc_flags, RECEIVER_INFO::osc_type, FIXED_FREQ_INFO::range, REPORT_CFG_LOG_LVL, RECEIVER_INFO::sernum, RECEIVER_INFO::sw_rev, and RECEIVER_INFO::ticks_per_sec.
Referenced by check_receiver_info_and_features().
|
static |
Definition at line 3965 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _mbg_kdd_msg_2, _tlv_info_addr, MBG_TLV_FEAT_BUFFER::b, check_feat_supp_byte_array(), MBG_TLV_INFO::flags, MAX_MBG_TLV_FEAT_TYPES, MBG_LOG_WARN, mbg_rc_is_success, MBG_TLV_FEAT_TYPE_NAMES, N_MBG_TLV_FEAT_TYPES, REPORT_CFG_LOG_LVL, MBG_TLV_INFO::reserved, str_unkn_braced, and MBG_TLV_INFO::supp_tlv_feat.
Referenced by check_receiver_info_and_features().
|
static |
Definition at line 3947 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, _xfeat_addr, MBG_XFEATURE_BUFFER::b, check_feat_supp_byte_array(), MAX_XFEATURE_BITS, MBG_LOG_WARN, mbg_rc_is_success, MBG_XFEATURE_NAMES, N_MBG_XFEATURE, REPORT_CFG_LOG_LVL, and str_unkn_braced.
Referenced by check_receiver_info_and_features().
|
static |
Definition at line 3812 of file pcpsdrvr.c.
References _pcps_ddev_bus_flags, PCPS_BUS_ISA, PCPS_BUS_MCA, PCPS_BUS_PCI_ASIC, PCPS_BUS_PCI_MBGPEX, PCPS_BUS_PCI_PEX8311, PCPS_BUS_PCI_S5920, PCPS_BUS_PCI_S5933, PCPS_BUS_USB, PCPS_BUS_USB_V2, and str_unkn_braced.
Referenced by report_probe_device().
|
static |
Get the name assigned to one of the PCPS_FEATURE_MASKS flags.
[in] | flag_mask | one of the PCPS_FEATURE_MASKS flags |
Definition at line 3872 of file pcpsdrvr.c.
References N_PCPS_FEATURE_BITS, pcps_feature_names, and str_unkn_braced.
Referenced by check_feature().
|
static |
Read a dword from a PLX PECS register.
[in] | pNode | Device structure |
[in] | reg | Number of the register to read |
[out] | pval | Pointer to a variable to take the value read from the register |
Definition at line 804 of file pcpsdrvr.c.
References PCI_BAD_REGISTER_NUMB, PCI_SUCCESS, PLX_PECS_MAINDATA, and PLX_PECS_MAININDEX.
Referenced by ptp270pex_can_flag_ready().
int pcps_add_rsrc_io | ( | PCPS_DDEV * | pddev, |
MBG_IOPORT_ADDR_RAW | base, | ||
ulong | num | ||
) |
Add an I/O address range resource to the device structure.
[in,out] | pddev | Pointer to the device structure |
[in] | base | Base address of the I/O address range |
[in] | num | Number of addresses of the I/O address range |
Definition at line 4897 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, _mbg_kdd_msg_4, _pcps_ddev_set_err_flags, MBG_IOPORT_RSRC::base_mapped, MBG_IOPORT_RSRC::base_raw, MBG_ERR_RSRC_ITEM, MBG_LOG_ERR, MBG_LOG_INFO, mbg_map_ioport_rsrc(), mbg_rc_is_error, mbg_strerror(), MBG_SUCCESS, N_PCPS_PORT_RSRC, MBG_IOPORT_RSRC::num, PCPS_RSRC_INFO::num_rsrc_io, PCPS_EF_IO_RSRC_IO, PCPS_RSRC_INFO::port, rsrc_alloc_ports(), and PCPS_DDEV_s::rsrc_info.
Add an IRQ number resource to the device structure.
[in,out] | pddev | Pointer to the device structure |
[in] | irq_num | Start address of the memory range |
Definition at line 5021 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, _mbgddmsg_2, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit_err, _mbgddmsg_fnc_exit_success, DEBUG_DEV_INIT, PCPS_DDEV_s::dev, PCPS_RSRC_INFO::irq, MBG_ERR_DEV_NOT_SUPP, MBG_ERR_GENERIC, MBG_LOG_DEBUG, MBG_LOG_ERR, MBG_LOG_INFO, MBG_SUCCESS, PCPS_DEV_TYPE::name, MBG_IRQ_RSRC::num, PCPS_RSRC_INFO::num_rsrc_irq, PCPS_BUS_USB, pcps_get_dev_type_table_entry(), pcps_setup_ddev(), PCPS_DDEV_s::rsrc_info, and PCPS_DEV::type.
int pcps_add_rsrc_mem | ( | PCPS_DDEV * | pddev, |
MBG_IOMEM_ADDR_RAW | start, | ||
ulong | len | ||
) |
Add a memory address range resource to the device structure.
[in,out] | pddev | Pointer to the device structure |
[in] | start | Start address of the memory range |
[in] | len | Size of the memory range |
Definition at line 4959 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, _mbg_kdd_msg_4, _pcps_ddev_set_err_flags, MBG_IOMEM_RSRC::len, MBG_ERR_RSRC_ITEM, MBG_LOG_ERR, MBG_LOG_INFO, mbg_map_iomem_rsrc(), mbg_rc_is_error, mbg_strerror(), MBG_SUCCESS, PCPS_RSRC_INFO::mem, N_PCPS_MEM_RSRC, PCPS_RSRC_INFO::num_rsrc_mem, PCPS_EF_IO_RSRC_MEM, rsrc_alloc_mem(), PCPS_DDEV_s::rsrc_info, MBG_IOMEM_RSRC::start_mapped, and MBG_IOMEM_RSRC::start_raw.
|
static |
Allocate a device info structure for a device.
On success, the pointer to the device structure is set to the allocated memory for the device structure.
[in,out] | ppddev | Address of a pointer to a device structure to be allocated |
Definition at line 4744 of file pcpsdrvr.c.
References _mbgddmsg_0, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit_chk_mbg_rc, _pcps_kmalloc, DEBUG_DEV_INIT, MBG_ERR_NO_MEM, MBG_LOG_ERR, MBG_SUCCESS, n_ddevs, N_SUPP_DEV_BUS, and pcps_ddev.
Referenced by pcps_init_ddev().
Determine which interface buffer size is supported.
[in] | pddev | Pointer to the device structure |
[in] | count | The number of bytes to be read according to the data_type |
[in] | info | An info string, e.g. the name of the calling function |
Definition at line 3170 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _pcps_ddev_has_gps_data_16, MBG_ERR_NBYTES, MBG_LOG_ERR, MBG_SUCCESS, and PCPS_DDEV_s::size_n_bytes.
Referenced by pcps_read_gps_block().
Check an ASCIIZ string for a valid signature.
This function is only used to determine the type of a legacy ISA card. For PCI and USB devices the type can be determined from the device ID.
[in] | pddev | Pointer to a device structure |
[in] | ref | The reference signature, i.e. the expected signature at the beginning of the device's firmware ID |
Definition at line 3648 of file pcpsdrvr.c.
References _fstrlen, _fstrncmp, _pcps_ddev_fw_id, MBG_ERR_FW_ID, and MBG_SUCCESS.
Referenced by pcps_probe_device().
|
static |
Check if IRQ usage with a device is unsafe.
A few early PCI Express cards had a problem where usage of IRQs was unsafe. Firmware upgrades are available to fix this. See http://www.meinberg.de/english/info/pex-upgrades.htm
[in] | pddev | Pointer to the device structure |
[in] | req_fw_ver | Required firmware version |
[in] | req_asic_ver_major | Required ASIC major version |
[in] | req_asic_ver_minor | Required ASIC major version |
Definition at line 1152 of file pcpsdrvr.c.
References _pcps_ddev_asic_version, _pcps_ddev_fw_rev_num, _pcps_pex_irq_is_safe, PCPS_DDEV_s::irq_ack_mask, PCPS_DDEV_s::irq_ack_port, PCPS_DDEV_s::irq_stat_info, and PCPS_IRQ_STAT_UNSAFE.
Referenced by pcps_probe_device().
Check if a specific feature of a specific feature type is supported.
There are different structures where information can be stored if a specific feature is supported. All information is set up when the pcps_probe_device function is called to probe and initialize the device. This generic low-level function can be called by API functions to check if a specific feature is supported.
[in] | p_ddev | Pointer to the device structure |
[in] | feat_type | See DEV_FEAT_TYPES |
[in] | feat_num | Number and range depending on feat_type value |
Definition at line 5112 of file pcpsdrvr.c.
References _check_feat_supp_bit, _mbg_kdd_msg_3, _mbgddmsg_4, _mbgddmsg_5, _pcps_ddev_ref_type, MBG_XFEATURE_BUFFER::b, MBG_TLV_FEAT_BUFFER::b, PCPS_DDEV_s::builtin_features, PCPS_DEV::cfg, check_feat_supp_byte_array(), DEBUG_DEV_INIT, PCPS_DDEV_s::dev, DEV_FEAT_TYPE_BUILTIN, DEV_FEAT_TYPE_PCPS, DEV_FEAT_TYPE_REF_TYPE, DEV_FEAT_TYPE_RI, DEV_FEAT_TYPE_TLV_FEAT, DEV_FEAT_TYPE_XFEAT, PCPS_DEV_CFG::features, RECEIVER_INFO::features, MBG_ERR_INV_PARM, MBG_ERR_NOT_SUPP_BY_DEV, MBG_ERR_NOT_SUPP_ON_OS, MBG_LOG_ERR, MBG_LOG_INFO, mbg_posix_errno_to_mbg(), mbg_rc_is_success, mbg_strerror(), MBG_SUCCESS, N_GPS_BUILTIN_FEATURE_BITS, N_GPS_FEATURE, N_MBG_TLV_FEAT_TYPES, N_MBG_XFEATURE, N_PCPS_FEATURE_BITS, N_PCPS_REF, MBG_XDEV_FEATURES::receiver_info, MBG_TLV_INFO::supp_tlv_feat, MBG_XDEV_FEATURES::tlv_info, PCPS_DDEV_s::xdev_features, and MBG_XDEV_FEATURES::xfeature_buffer.
void pcps_cleanup_ddev | ( | PCPS_DDEV * | pddev | ) |
Clean up and free a previously initialized device info structure.
[in] | pddev | Address of a device structure to be cleaned up and released |
Definition at line 4845 of file pcpsdrvr.c.
References _mbg_mutex_destroy, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit, PCPS_DDEV_s::dev_mutex, and pcps_free_ddev_struc().
void pcps_cleanup_device | ( | PCPS_DDEV * | pddev | ) |
Clean up function called by pcps_probe_device on error.
[in,out] | pddev | Pointer to the device structure |
Definition at line 6247 of file pcpsdrvr.c.
References _mbg_pci_find_bios, _mbg_pci_find_device, _mbg_pci_read_cfg_byte, _mbg_pci_read_cfg_dword, _mbg_pci_read_cfg_word, _mbg_pci_write_cfg_word, _mbgddmsg_1, _mbgddmsg_2, _pcps_ddev_set_err_flags, PCPS_DEV_TYPE::bus_flags, PCPS_DEV::cfg, DEBUG_DEV_INIT, PCPS_DDEV_s::dev, PCPS_DEV_TYPE::dev_id, PCPS_DEV_CFG::err_flags, FMT_08X, irq, MAX_PCPS_RSRC, MBG_LOG_ERR, MBG_LOG_INFO, MBG_LOG_WARN, mbg_rc_is_success, PCPS_DEV_TYPE::name, PCPS_RSRC_INFO::num_rsrc_mem, PCI_CMD_ENB_IO_ACC, PCI_CMD_ENB_MEM_ACC, PCI_CS_BASE_ADDRESS_0, PCI_CS_COMMAND, PCI_CS_INTERRUPT_LINE, PCI_SUCCESS, PCPS_ACC_MODE_NULL, pcps_add_rsrc_io(), pcps_add_rsrc_irq(), pcps_add_rsrc_mem(), PCPS_BUS_PCI, pcps_detect_pci_devices(), PCPS_EF_IO_ENB, PCPS_EF_IO_INIT, pcps_probe_device(), pcps_read_null, pcps_release_rsrcs(), pcps_setup_and_start_pci_dev(), pcps_setup_ddev(), PCPS_DDEV_s::rsrc_info, set_access_mode(), and PCPS_DEV::type.
|
static |
Check if a device is a PTP270PEX card.
Definition at line 782 of file pcpsdrvr.c.
References _pcps_ddev_dev_id, _pcps_ddev_is_pci, and PCI_DEV_PTP270PEX.
Referenced by pcps_probe_device().
void _MBG_INIT_CODE_ATTR pcps_detect_devices | ( | int | isa_ports[PCPS_MAX_ISA_CARDS], |
int | isa_irqs[PCPS_MAX_ISA_CARDS] | ||
) |
Detect all bus-level devices in a non-PnP system.
[in] | isa_ports | An array with potential I/O base addresses for ISA devices. |
[in] | isa_irqs | An array with potential IRQ numbers assigned to ISA devices. |
Definition at line 6683 of file pcpsdrvr.c.
References pcps_cleanup_ddev(), pcps_detect_devices_init(), and pcps_init_ddev().
|
static |
_PCPS_USE_ISA_PNP
Detect all bus-level devices in a non-PnP system, use specific alloc/cleanup functions
[in] | ddev_init_fnc | Pointer to function called to allocate a device structure for each detected device. |
[in] | ddev_cleanup_fnc | Pointer to function called if the device structure needs to be de-allocated in case of error. |
[in] | isa_ports | An array with potential I/O base addresses for ISA devices. |
[in] | isa_irqs | An array with potential IRQ numbers assigned to ISA devices. |
Definition at line 6647 of file pcpsdrvr.c.
References N_PCPS_DEV_TYPE, PCI_VENDOR_MEINBERG, pcps_detect_isa_devices(), pcps_detect_pci_devices(), and pcps_dev_type.
Referenced by pcps_detect_devices().
void pcps_detect_isa_devices | ( | PCPS_DDEV_INIT_FNC * | ddev_init_fnc, |
PCPS_DDEV_CLEANUP_FNC * | ddev_cleanup_fnc, | ||
PCPS_DDEV_REGISTER_FNC * | ddev_register_fnc, | ||
int | isa_ports[PCPS_MAX_ISA_CARDS], | ||
int | isa_irqs[PCPS_MAX_ISA_CARDS] | ||
) |
Detect and initialize ISA devices in a non-PnP system.
[in] | ddev_init_fnc | Pointer to function called to allocate a device structure for each detected device. |
[in] | ddev_cleanup_fnc | Pointer to function called if the device structure needs to be de-allocated in case of error. |
[in] | ddev_register_fnc | Pointer to function called to register a detected device. |
[in] | isa_ports | An array with potential I/O base addresses for ISA devices. |
[in] | isa_irqs | An array with potential IRQ numbers assigned to ISA devices. |
Definition at line 6559 of file pcpsdrvr.c.
References _mbgddmsg_1, _mbgddmsg_2, PCPS_DEV_TYPE::bus_flags, PCPS_DEV::cfg, DEBUG_DEV_INIT, PCPS_DDEV_s::dev, PCPS_DEV_CFG::err_flags, FMT_03X, FMT_08X, MBG_LOG_INFO, MBG_LOG_WARN, mbg_rc_is_success, pcps_add_rsrc_io(), pcps_add_rsrc_irq(), PCPS_BUS_ISA, PCPS_MAX_ISA_CARDS, PCPS_NUM_PORTS_ISA, pcps_probe_device(), and PCPS_DEV::type.
void pcps_dump_data | ( | const void * | buffer, |
size_t | count, | ||
const char * | info | ||
) |
Definition at line 1219 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, mbg_kdd_snprintf(), and MBG_LOG_INFO.
|
static |
Free a previously allocated device info structure.
The pointer to the device structure is set to NULL after the associated memory has been freed.
[in,out] | ppddev | Address of a pointer to a device structure to be freed |
Definition at line 4704 of file pcpsdrvr.c.
References _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit, _pcps_kfree, and n_ddevs.
Referenced by pcps_cleanup_ddev().
PCPS_DEV_TYPE* pcps_get_dev_type_table_entry | ( | PCPS_BUS_FLAGS | bus_mask, |
PCPS_DEV_ID | dev_id | ||
) |
Lookup a specific device in the device table.
The function below takes a bus flag and device ID to search the table of known devices for a device which matches the given criteria.
[in] | bus_mask | Mask of the bus type to look up, see PCPS_BUS_FLAG_MASKS |
[in] | dev_id | The device ID to lookup, see MEINBERG_PCI_DEVICE_IDS or MBG_USB_DEVICE_IDS, depending on the bus_mask |
Definition at line 4672 of file pcpsdrvr.c.
References PCPS_DEV_TYPE::bus_flags, PCPS_DEV_TYPE::dev_id, N_PCPS_DEV_TYPE, and pcps_dev_type.
|
static |
Read the firmware ID from a device.
This is usually done first when probing a device to check if the device is properly installed and can be accessed without problems.
[in] | pddev | Pointer to a device structure |
[out] | fw_id | A buffer to be filled withtthe firmware ID |
Definition at line 3591 of file pcpsdrvr.c.
References _mbgddmsg_1, _mbgddmsg_2, _pcps_ddev_type_name, _pcps_read, DEBUG_DEV_INIT, PCPS_IO_BUFFER::fw_id, PCPS_DDEV_s::io_buffer, MBG_LOG_INFO, mbg_rc_is_error, PCPS_FIFO_SIZE, PCPS_GIVE_FW_ID_1, PCPS_GIVE_FW_ID_2, and PCPS_ID_SIZE.
Referenced by pcps_probe_device().
|
static |
Retrieve a version number from a firmware ID string.
[in] | idstr | The ID string, e.g. a PCPS_ID_STR |
Definition at line 3671 of file pcpsdrvr.c.
References _fstrlen.
Referenced by pcps_probe_device().
int pcps_init_ddev | ( | PCPS_DDEV ** | ppddev | ) |
Allocate and initialize a device info structure.
On success, the pointer to the device structure is set to the device structure, and the device structure has been initialized.
[in,out] | ppddev | Address of a pointer to a device structure to be allocated and initialized |
Definition at line 4799 of file pcpsdrvr.c.
References _mbg_mutex_init, _mbg_spin_lock_init, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit_chk_mbg_rc, PCPS_DDEV_s::dev_mutex, MBG_DRVR_NAME, mbg_rc_is_success, and pcps_alloc_ddev_struc().
|
static |
Initialize GPS data transfer.
[in] | pddev | Pointer to the device structure |
[in] | cmd | PCPS_READ_GPS_DATA or PCPS_WRITE_GPS_DATA |
[in] | data_type | The code assigned to the data type, see PC_GPS_CMD_CODES |
[in] | count | The number of bytes to be read according to the data_type |
[in] | info | An info string, e.g. the name of the calling function |
Definition at line 3215 of file pcpsdrvr.c.
References _mbg16_to_cpu, _mbg_kdd_msg_1, _mbg_kdd_msg_2, _mbg_kdd_msg_3, _pcps_read, _pcps_read_var, MBG_ERR_INV_TYPE, MBG_ERR_NBYTES, MBG_ERR_NOT_READY, MBG_LOG_DEBUG, MBG_LOG_ERR, MBG_LOG_WARN, mbg_rc_is_error, PCPS_DDEV_s::n_bytes, PCPS_DDEV_s::size_n_bytes, and PCPS_DDEV_s::uc.
Referenced by pcps_read_gps_block().
int pcps_probe_device | ( | PCPS_DDEV * | pddev, |
PCPS_BUS_NUM | bus_num, | ||
PCPS_SLOT_NUM | dev_fnc_num | ||
) |
Probe if a device is supported, and allocate and setup the device structure.
This function should be called by the probe routine of any target-specific kernel driver. If the device is supported then all specific information including supported features is read from the device and stored in sub-structures of the device structure addressed by pdev.
[in,out] | pddev | Pointer to the device structure which has been initialized and will be set up |
[in] | bus_num | The bus number if supported (e.g. PCI), else 0 |
[in] | dev_fnc_num | The device/function number if supported (e.g. PCI), else 0 |
Definition at line 5409 of file pcpsdrvr.c.
References _convert_asic_version_number, _mbg_inp16_to_cpu, _mbg_inp32_to_cpu, _mbg_kdd_msg_0, _mbg_kdd_msg_1, _mbg_kdd_msg_2, _mbg_kdd_msg_3, _mbg_kdd_msg_4, _mbg_mmrd32_to_cpu, _mbg_mutex_init, _mbg_spin_lock_init, _mbgddmsg_1, _mbgddmsg_3, _mbgddmsg_fnc_entry, _pcps_asic_version_greater_equal, _pcps_asic_version_major, _pcps_ddev_access_mode_io, _pcps_ddev_access_mode_mm, _pcps_ddev_asic_version, _pcps_ddev_bus_flags, _pcps_ddev_chk_err_flags, _pcps_ddev_dev_id, _pcps_ddev_err_flags, _pcps_ddev_features, _pcps_ddev_fw_id, _pcps_ddev_fw_rev_num, _pcps_ddev_has_asic_features, _pcps_ddev_has_asic_version, _pcps_ddev_io_base_mapped, _pcps_ddev_io_base_raw, _pcps_ddev_is_isa, _pcps_ddev_is_pci_amcc, _pcps_ddev_is_pci_asic, _pcps_ddev_is_pci_mbgpex, _pcps_ddev_is_pci_pex8311, _pcps_ddev_is_usb, _pcps_ddev_pci_cfg_err, _pcps_ddev_set_err_flags, _pcps_ddev_short_port_base, _pcps_ddev_type_name, _pcps_ddev_type_num, _pcps_read, AMCC_INT_ACK, AMCC_INT_ENB, AMCC_INT_FLAG, AMCC_INT_MASK, AMCC_OP_REG_IMB4, AMCC_OP_REG_INTCSR, AMCC_OP_REG_RANGE_S5920, AMCC_OP_REG_RANGE_S5933, PCPS_DDEV_s::asic_features, PCPS_DDEV_s::asic_version, MBG_IOPORT_RSRC::base_mapped, MBG_IOPORT_RSRC::base_raw, BUILTIN_FEAT_FRC511PEX, BUILTIN_FEAT_GLN180PEX, BUILTIN_FEAT_GNS181PEX, BUILTIN_FEAT_GPS167PC, BUILTIN_FEAT_GPS167PCI, BUILTIN_FEAT_GPS168PCI, BUILTIN_FEAT_GPS169PCI, BUILTIN_FEAT_GPS170PCI, BUILTIN_FEAT_GPS170PEX, BUILTIN_FEAT_GPS180AMC, BUILTIN_FEAT_GPS180PEX, BUILTIN_FEAT_PTP270PEX, BUILTIN_FEAT_PZF180PEX, BUILTIN_FEAT_TCR167PCI, BUILTIN_FEAT_TCR170PEX, BUILTIN_FEAT_TCR180PEX, BUILTIN_FEAT_TCR180USB, BUILTIN_FEAT_UNDEFINED, BUILTIN_FEAT_WWVB511, PCPS_DDEV_s::builtin_features, PCPS_DEV_CFG::bus_num, PCPS_DEV::cfg, check_feature(), check_receiver_info_and_features(), DEBUG_DEV_INIT, PCPS_DDEV_s::dev, PCPS_DEV_TYPE::dev_id, PCPS_DDEV_s::dev_mutex, PCI_ASIC::features, PCPS_DEV_CFG::features, force_io_access, force_mm16_access, PCPS_DEV_CFG::fw_id, fw_id_ref_gps, fw_id_ref_pcps, PCPS_DEV_CFG::fw_rev_num, PCPS_TIME::hour, PCPS_DDEV_s::io_buffer, PCPS_RSRC_INFO::irq, PCPS_DDEV_s::irq_ack_mask, PCPS_DDEV_s::irq_ack_port, PCPS_DDEV_s::irq_disb_mask, PCPS_DDEV_s::irq_enb_disb_port, PCPS_DDEV_s::irq_enb_mask, PCPS_DDEV_s::irq_flag_mask, PCPS_DDEV_s::irq_flag_port, PCPS_DEV_CFG::irq_num, MBG_DRVR_NAME, MBG_ERR_GENERIC, mbg_get_pc_cycles_frequency(), mbg_get_sys_uptime(), MBG_LOG_DEBUG, MBG_LOG_ERR, MBG_LOG_INFO, MBG_LOG_WARN, mbg_rc_is_error, mbg_rc_is_success, mbg_sleep_sec(), MBG_SUCCESS, PCPS_TIME::mday, PCPS_RSRC_INFO::mem, PCPS_TIME::min, PCPS_DDEV_s::mm_asic_addr, PCPS_TIME::month, N_PCPS_PORT_RSRC, MBG_IOPORT_RSRC::num, MBG_IRQ_RSRC::num, PCPS_RSRC_INFO::num_rsrc_io, PCPS_RSRC_INFO::num_rsrc_irq, PCPS_RSRC_INFO::num_rsrc_mem, PCPS_TIME::offs_utc, pc_cycles_frequency, PCI_ASIC_FIX_IRQ_MINOR_GPS170PEX, PCI_ASIC_FIX_IRQ_MINOR_PEX511, PCI_ASIC_FIX_IRQ_MINOR_TCR511PEX, PCI_ASIC_HAS_MM_IO, PCI_ASIC_HR_TIME_MINOR_PEX511, PCI_ASIC_MAJOR_GPS170PEX, PCI_ASIC_MAJOR_PCI_0, PCI_ASIC_MAJOR_PEX511, PCI_ASIC_MAJOR_TCR511PEX, PCI_ASIC_PCI_IRQF, PCPS_ACC_MODE_IO, PCPS_ACC_MODE_MM, PCPS_ACC_MODE_MM16, PCPS_ACC_MODE_NULL, PCPS_ACC_MODE_USB, PCPS_BUS_ISA, PCPS_BUS_MCA, PCPS_BUS_PCI_ASIC, PCPS_BUS_PCI_MBGPEX, PCPS_BUS_PCI_PEX8311, PCPS_BUS_PCI_S5920, PCPS_BUS_PCI_S5933, PCPS_BUS_USB, PCPS_BUS_USB_V2, PCPS_CAN_CLR_UCAP_BUFF, PCPS_CAN_SET_TIME, pcps_check_id(), pcps_check_pex_irq_unsafe(), pcps_cleanup_device(), pcps_ddev_is_ptp270pex(), pcps_dev_type, PCPS_EF_INV_FW_ID, PCPS_EF_IO_ENB, PCPS_EF_IO_INIT, PCPS_EF_TIMEOUT, PCPS_FEAT_DCF600USB, PCPS_FEAT_FRC511PEX, PCPS_FEAT_GLN180PEX, PCPS_FEAT_GNS181PEX, PCPS_FEAT_GPS167PC, PCPS_FEAT_GPS167PCI, PCPS_FEAT_GPS168PCI, PCPS_FEAT_GPS169PCI, PCPS_FEAT_GPS170PCI, PCPS_FEAT_GPS170PEX, PCPS_FEAT_GPS180AMC, PCPS_FEAT_GPS180PEX, PCPS_FEAT_MSF51USB, PCPS_FEAT_MSF600USB, PCPS_FEAT_PC31PS31, PCPS_FEAT_PC32, PCPS_FEAT_PCI32, PCPS_FEAT_PCI509, PCPS_FEAT_PCI510, PCPS_FEAT_PCI511, PCPS_FEAT_PEX511, PCPS_FEAT_PTP270PEX, PCPS_FEAT_PZF180PEX, PCPS_FEAT_TCR167PCI, PCPS_FEAT_TCR170PEX, PCPS_FEAT_TCR180PEX, PCPS_FEAT_TCR180USB, PCPS_FEAT_TCR510PCI, PCPS_FEAT_TCR511PCI, PCPS_FEAT_TCR511PEX, PCPS_FEAT_TCR51USB, PCPS_FEAT_TCR600USB, PCPS_FEAT_USB5131, PCPS_FEAT_WVB600USB, PCPS_FEAT_WWVB51USB, pcps_get_fw_id(), pcps_get_rev_num(), PCPS_GIVE_TIME, PCPS_HAS_CABLE_LEN, PCPS_HAS_FAST_HR_TSTAMP, PCPS_HAS_GPS_DATA_16, PCPS_HAS_HR_TIME, PCPS_HAS_IRIG_CTRL_BITS, PCPS_HAS_IRIG_TIME, PCPS_HAS_RAW_IRIG_DATA, PCPS_HAS_SERIAL, PCPS_HAS_SYNC_TIME, PCPS_HAS_UCAP, PCPS_HAS_UTC_OFFS, pcps_read_amcc_s5920, pcps_read_amcc_s5933, pcps_read_asic, pcps_read_null, pcps_read_std, PCPS_IO_BUFFER::pcps_time, PCPS_TIMEOUT_CNT, PCPS_TYPE_DCF600USB, PCPS_TYPE_FRC511PEX, PCPS_TYPE_GLN180PEX, PCPS_TYPE_GNS181PEX, PCPS_TYPE_GPS167PC, PCPS_TYPE_GPS167PCI, PCPS_TYPE_GPS168PCI, PCPS_TYPE_GPS169PCI, PCPS_TYPE_GPS170PCI, PCPS_TYPE_GPS170PEX, PCPS_TYPE_GPS180AMC, PCPS_TYPE_GPS180PEX, PCPS_TYPE_MSF51USB, PCPS_TYPE_MSF600USB, PCPS_TYPE_PC31, PCPS_TYPE_PC32, PCPS_TYPE_PCI32, PCPS_TYPE_PCI509, PCPS_TYPE_PCI510, PCPS_TYPE_PCI511, PCPS_TYPE_PEX511, PCPS_TYPE_PS31, PCPS_TYPE_PS31_OLD, PCPS_TYPE_PTP270PEX, PCPS_TYPE_PZF180PEX, PCPS_TYPE_TCR167PCI, PCPS_TYPE_TCR170PEX, PCPS_TYPE_TCR180PEX, PCPS_TYPE_TCR180USB, PCPS_TYPE_TCR510PCI, PCPS_TYPE_TCR511PCI, PCPS_TYPE_TCR511PEX, PCPS_TYPE_TCR51USB, PCPS_TYPE_TCR600USB, PCPS_TYPE_USB5131, PCPS_TYPE_WVB600USB, PCPS_TYPE_WWVB51USB, PLX_LCS_INTCSR, PLX_LCS_INTCSR_INT_ENB, PLX_LCS_INTCSR_INT_FLAG, PCPS_DEV_CFG::port, PCPS_RSRC_INFO::port, PCPS_DDEV_s::raw_asic_version, PCI_ASIC::raw_version, report_access_mode(), report_probe_device(), REV_CAN_CLR_UCAP_BUFF_GPS167PCI, REV_CAN_CLR_UCAP_BUFF_GPS168PCI, REV_CAN_SET_TIME_PC31PS31, REV_HAS_CABLE_LEN_GPS167PC, REV_HAS_CABLE_LEN_GPS167PCI, REV_HAS_GPS_DATA_16_GPS169PCI, REV_HAS_HR_TIME_GPS167PC, REV_HAS_HR_TIME_PCI511, REV_HAS_HR_TIME_PEX511, REV_HAS_HR_TIME_TCR510PCI, REV_HAS_IRIG_CTRL_BITS_TCR511PCI, REV_HAS_IRIG_CTRL_BITS_TCR511PEX, REV_HAS_IRIG_CTRL_BITS_TCR51USB, REV_HAS_IRIG_TIME_TCR511PCI, REV_HAS_IRIG_TIME_TCR511PEX, REV_HAS_IRIG_TIME_TCR51USB, REV_HAS_IRQ_FIX_MINOR_GPS170PEX, REV_HAS_IRQ_FIX_MINOR_PEX511, REV_HAS_IRQ_FIX_MINOR_TCR511PEX, REV_HAS_RAW_IRIG_DATA_TCR511PCI, REV_HAS_RAW_IRIG_DATA_TCR511PEX, REV_HAS_RAW_IRIG_DATA_TCR51USB, REV_HAS_SERIAL_PC31PS31, REV_HAS_SYNC_TIME_PC31PS31, REV_HAS_UCAP_GPS167PCI, REV_HAS_UCAP_GPS168PCI, REV_HAS_UTC_OFFS_PC31PS31, PCPS_DDEV_s::rsrc_info, rsrc_port_to_cfg_port(), PCPS_TIME::sec, PCPS_TIME::sec100, set_access_mode(), setup_mm_addr(), setup_sernum_and_receiver_info(), PCPS_DEV_CFG::short_status_port, PCPS_TIME::signal, PCPS_DEV_CFG::slot_num, PCPS_TIME::status, PCPS_DDEV_s::status_port, PCPS_DDEV_s::status_port_offs, str_empty, PCPS_DEV_CFG::timeout_clk, PCPS_DEV::type, wait_ptp270pex_ready(), PCPS_TIME::wday, and PCPS_TIME::year.
|
static |
Read function for devices with AMCC S5920 PCI interface chip.
[in] | pddev | Pointer to the device structure |
[in] | cmd | The command code for the board, see PCPS_CMD_CODES |
[out] | buffer | A buffer to take the bytes to be read |
[in] | count | The number of bytes to be read into the buffer |
Definition at line 2324 of file pcpsdrvr.c.
References _mbg_inp32_native, _mbg_outp8, _mbg_put_unaligned, _pcps_ddev_io_base_mapped, _pcps_ddev_read_status_port(), _pcps_disb_local_irq_save, _pcps_irq_flags, _pcps_local_irq_restore, PCPS_DDEV_s::acc_cycles, AMCC_OP_REG_OMB, BYTE_OF, FAR, mbg_get_pc_cycles(), mbg_rc_is_error, pcps_dump_data(), pcps_wait_busy(), report_io_cmd(), and report_ret_val().
|
static |
Read function for devices with AMCC S5933 PCI interface chip.
[in] | pddev | Pointer to the device structure |
[in] | cmd | The command code for the board, see PCPS_CMD_CODES |
[out] | buffer | A buffer to take the bytes to be read |
[in] | count | The number of bytes to be read into the buffer |
Definition at line 2201 of file pcpsdrvr.c.
References _mbg_inp16_to_cpu, _mbg_inp8, _mbg_outp8, _pcps_ddev_io_base_mapped, _pcps_ddev_read_status_port(), _pcps_disb_local_irq_save, _pcps_irq_flags, _pcps_local_irq_restore, PCPS_DDEV_s::acc_cycles, AMCC_OP_REG_FIFO, AMCC_OP_REG_INTCSR, AMCC_OP_REG_MCSR, AMCC_OP_REG_OMB1, FAR, MBG_ERR_NO_DATA, mbg_get_pc_cycles(), mbg_rc_is_error, pcps_dump_data(), pcps_wait_busy(), report_io_cmd(), and report_ret_val().
|
static |
Read function for devices with Meinberg PCI interface ASIC.
[in] | pddev | Pointer to the device structure |
[in] | cmd | The command code for the board, see PCPS_CMD_CODES |
[out] | buffer | A buffer to take the bytes to be read |
[in] | count | The number of bytes to be read into the buffer |
Definition at line 2470 of file pcpsdrvr.c.
References _mbg_inp32_native, _mbg_inp32_to_cpu, _mbg_outp32_to_mbg, _mbg_put_unaligned, _pcps_ddev_io_base_mapped, _pcps_disb_local_irq_save, _pcps_irq_flags, _pcps_local_irq_restore, PCPS_DDEV_s::acc_cycles, PCI_ASIC_REG::b, FAR, mbg_get_pc_cycles(), mbg_rc_is_error, pcps_dump_data(), pcps_wait_busy(), report_io_cmd(), report_ret_val(), and PCI_ASIC_REG::ul.
|
static |
Get a block of data from a GPS device.
This static function is used by pcps_read_gps.
[in] | pddev | Pointer to the device structure |
[in] | data_type | The code assigned to the data type, see PC_GPS_CMD_CODES |
[out] | buffer | A buffer with data to be read according to the data_type |
[in] | count | The number of bytes to be read according to the data_type |
[in] | block_num | A buffer with data to be written according to the type code |
[in] | block_size | The number of bytes to be written according to the type code |
Definition at line 3342 of file pcpsdrvr.c.
References _mbg_kdd_msg_3, _mbg_kdd_msg_4, _pcps_ddev_is_usb, _pcps_read, FAR, MBG_LOG_DEBUG, mbg_rc_is_error, MBG_SUCCESS, pcps_check_gps_data_size(), PCPS_FIFO_SIZE, pcps_init_gps_transfer(), pcps_read_gps, PCPS_READ_GPS_DATA, report_ret_val(), and PCPS_DDEV_s::size_n_bytes.
|
static |
Dummy read function.
Used if a clock is not properly initialized, in order to avoid I/O access on unspecified ports.
[in] | pddev | Pointer to the device structure |
[in] | cmd | The command code for the board, see PCPS_CMD_CODES |
[out] | buffer | A buffer to take the bytes to be read |
[in] | count | The number of bytes to be read into the buffer |
Definition at line 2059 of file pcpsdrvr.c.
References MBG_ERR_TIMEOUT.
|
static |
Read function for devices with ISA or micro channel bus.
[in] | pddev | Pointer to the device structure |
[in] | cmd | The command code for the board, see PCPS_CMD_CODES |
[out] | buffer | A buffer to take the bytes to be read |
[in] | count | The number of bytes to be read into the buffer |
Definition at line 2091 of file pcpsdrvr.c.
References _mbg_inp8, _mbg_outp8, _pcps_ddev_io_base_mapped, _pcps_ddev_read_status_port(), _pcps_disb_local_irq_save, _pcps_irq_flags, _pcps_local_irq_restore, PCPS_DDEV_s::acc_cycles, FAR, mbg_get_pc_cycles(), mbg_rc_is_error, pcps_dump_data(), pcps_wait_busy(), report_io_cmd(), and report_ret_val().
void pcps_release_rsrcs | ( | PCPS_DDEV * | pddev | ) |
Release I/O port and memory resource that have been claimed before.
[in,out] | pddev | The device structure |
Definition at line 4411 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, _mbg_kdd_msg_3, _pcps_ddev_io_rsrc, _pcps_ddev_is_gps, _pcps_ddev_is_irig_rx, _pcps_ddev_is_mca, _pcps_ddev_is_pci, _pcps_ddev_mem_rsrc, MBG_IOPORT_RSRC::base_mapped, MBG_IOPORT_RSRC::base_raw, PCPS_DEV_TYPE::bus_flags, PCPS_DDEV_s::dev, PCPS_DEV_TYPE::dev_id, MBG_IOMEM_RSRC::len, MBG_LOG_INFO, mbg_unmap_iomem_rsrc(), mbg_unmap_ioport_rsrc(), PCPS_DDEV_s::mm_asic_addr, PCPS_DDEV_s::mm_tstamp_addr, n_ddevs, N_PCPS_DEV_TYPE, MBG_IOPORT_RSRC::num, PCPS_RSRC_INFO::num_rsrc_io, PCPS_RSRC_INFO::num_rsrc_mem, pcps_add_rsrc_io(), PCPS_BUS_MCA, pcps_dev_type, PCPS_NUM_PORTS_MCA, pcps_probe_device(), RSRC_BUS_ISA, RSRC_BUS_MCA, RSRC_BUS_PCI, rsrc_dealloc_mem(), rsrc_dealloc_ports(), PCPS_DDEV_s::rsrc_info, MBG_IOMEM_RSRC::start_mapped, MBG_IOMEM_RSRC::start_raw, static_wc, and PCPS_DEV::type.
__mbg_inline int pcps_wait_busy | ( | PCPS_DDEV * | pddev | ) |
Wait as long as a device is busy, or until timeout.
Used by the Device read functions to wait after the command byte has been written until the requested data has been made available by the device.
[in] | pddev | Pointer to the device structure |
Definition at line 1981 of file pcpsdrvr.c.
References _pcps_ddev_status_busy, _pcps_ddev_timeout_clk, _pcps_time_after, clock, MBG_ERR_TIMEOUT, and MBG_SUCCESS.
Check if a PTP270PEX card can indicate when it's ready.
A PTP270PEX card must be accessed by the driver only after it has finished booting. Otherwise the host system may be locked up.
On HW v2 cards the firmware can indicate when the card is ready to be accessed, so this can be checked by the driver. On these cards the on-board GPIO3 pin is hardwired to 0 to indicate this is supported, whereas on older v1 cards the GPIO3 pin is pulled up to 1.
[in] | pddev | Pointer to the device structure |
Definition at line 869 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _mbg_kdd_msg_3, _pcps_ddev_type_name, PCPS_DEV_CFG::bus_num, PCPS_DEV::cfg, PCPS_DDEV_s::dev, MBG_LOG_DEBUG, mbg_plx_read_pecs_reg(), PCI_DEVICE_ID_PLX_8111, PCI_SUCCESS, PLX_PECS_GPIOCTL, and PLX_PECS_GPIOCTL_GPIO3_DATA.
Referenced by wait_ptp270pex_ready().
Check if a PTP270PEX card indicates it is ready.
A PTP270PEX card must be accessed by the driver only after it has finished booting. Otherwise the host system may be locked up.
On HW v2 cards the firmware can indicate when the card is ready to be accessed, so the driver can call this function to check this.
[in] | pddev | Pointer to the device structure |
Definition at line 979 of file pcpsdrvr.c.
References _mbg_inp32_to_cpu, _pcps_ddev_io_base_mapped, PLX_LCS_CNTRL, and PLX_LCS_CNTRL_USERI.
Referenced by wait_ptp270pex_ready().
|
static |
Definition at line 5313 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _mbg_kdd_msg_2, _mbg_kdd_msg_3, _pcps_ddev_fw_has_20ms_bug, _pcps_ddev_fw_id, _pcps_ddev_fw_rev_num, _pcps_ddev_io_base_raw, _pcps_ddev_irq_num, _pcps_ddev_sernum, _pcps_ddev_type_name, _pcps_fw_rev_num_major, _pcps_fw_rev_num_minor, PCPS_DDEV_s::access_mode, PCPS_DDEV_s::access_mode_forced, mbg_kdd_snprintf(), MBG_LOG_INFO, MBG_LOG_WARN, N_PCPS_ACCESS_MODES, PCPS_RSRC_INFO::num_rsrc_irq, PCPS_ACCESS_MODE_STR_FRCD, PCPS_ACCESS_MODE_STRS, PCPS_FW_STR_FMT, PCPS_DDEV_s::rsrc_info, and str_unkn_braced.
Referenced by pcps_probe_device().
Definition at line 1266 of file pcpsdrvr.c.
References _cpu_to_mbg32, _do_div, _mbg_inp32_to_cpu, _mbg_inp8, _mbg_kdd_msg_0, _mbg_kdd_msg_1, _mbg_kdd_msg_3, _mbg_kdd_msg_4, _mbg_kdd_msg_5, _mbg_kdd_msg_7, _pcps_ddev_is_pci_s5920, _pcps_ddev_is_usb, _pcps_ddev_type_name, PCPS_DDEV_s::acc_cycles, PCI_ASIC_REG::b, mbg_get_pc_cycles(), MBG_LOG_DEBUG, MBG_LOG_INFO, PCPS_DDEV_s::mm_asic_addr, pc_cycles_frequency, PCI_ASIC::pci_data, PCI_ASIC::status_port, PCPS_DDEV_s::status_port, PCI_ASIC_REG::ul, and PCI_ASIC_REG::us.
Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), and pcps_read_std().
|
static |
Definition at line 3836 of file pcpsdrvr.c.
References _mbg_kdd_msg_4, _pcps_ddev_bus_num, _pcps_ddev_dev_id, _pcps_ddev_is_pci, _pcps_ddev_pci_fnc_num, _pcps_ddev_pci_slot_num, _pcps_ddev_slot_num, _pcps_ddev_type_name, get_bus_type_str(), mbg_kdd_snprintf(), and MBG_LOG_INFO.
Referenced by pcps_probe_device().
|
static |
Report the return code to be returned by a function.
[in] | rc | The return code to be reported |
[in] | info | Informational string to be printed |
Definition at line 1536 of file pcpsdrvr.c.
References _mbg_kdd_msg_0, _mbg_kdd_msg_1, _mbg_kdd_msg_2, _mbg_kdd_msg_3, _mbg_kdd_msg_4, _mbgddmsg_1, _mbgddmsg_3, _pcps_ddev_has_hr_time, _pcps_ddev_set_err_flags, _pcps_kfree, _pcps_kmalloc, _pcps_read_var, PCPS_DDEV_s::acc_cycles, PCPS_DDEV_s::cmd, PCPS_DDEV_s::cmd_info, FAR, PCPS_DDEV_s::gps_cmd_info, PCPS_DDEV_s::io_buffer, mbg_delta_pc_cycles(), MBG_ERR_NBYTES, MBG_ERR_NO_MEM, mbg_get_pc_cycles(), MBG_LOG_DEBUG, MBG_LOG_ERR, MBG_LOG_INFO, mbg_rc_is_error, mbg_strerror(), MBG_SUCCESS, pc_cycles_frequency, pcps_dump_data(), PCPS_EF_IO_INIT, PCPS_GIVE_HR_TIME, PCPS_IO_BUFFER::pcps_hr_time, PCPS_READ_GPS_DATA, pcps_wait_busy(), PCPS_WRITE_GPS_DATA, str_empty, and str_spc_gps.
Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), pcps_read_gps_block(), and pcps_read_std().
|
static |
Report the system uptime.
This is mainly used for debugging, and informational.
[in] | p_uptime | The system uptime |
Definition at line 1011 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _mbg_kdd_msg_2, MAX_BOOT_TIME_PTP270PEX, and MBG_LOG_INFO.
Referenced by wait_ptp270pex_ready().
|
static |
Convert a raw I/O base address to a short format.
See notes for PCPS_SHORT_PORT_RSRC.
[out] | p_short_port_rsrc | Pointer to a variable that takes up the converted address |
[in] | p_io_rsrc | Pointer to a variable with the address to be converted |
Definition at line 4878 of file pcpsdrvr.c.
References PCPS_SHORT_PORT_RSRC::base, MBG_IOPORT_RSRC::base_raw, MBG_IOPORT_RSRC::num, and PCPS_SHORT_PORT_RSRC::num.
Referenced by pcps_probe_device().
|
static |
Definition at line 5302 of file pcpsdrvr.c.
References PCPS_DDEV_s::access_mode, PCPS_DDEV_s::access_mode_forced, and PCPS_DDEV_s::read.
Referenced by pcps_cleanup_device(), and pcps_probe_device().
|
static |
Setup the memory mapped addresses depending on the device type.
[in] | pddev | Pointer to the device structure |
Definition at line 1183 of file pcpsdrvr.c.
References _mbg_kdd_msg_1, _pcps_ddev_is_pci_mbgpex, _pcps_ddev_is_pci_pex8311, FAR, MBG_LOG_INFO, MBG_SUCCESS, PCPS_RSRC_INFO::mem, PCPS_DDEV_s::mm_asic_addr, PCPS_DDEV_s::mm_tstamp_addr, PCPS_DDEV_s::rsrc_info, and MBG_IOMEM_RSRC::start_mapped.
Referenced by pcps_probe_device().
int setup_sernum_and_receiver_info | ( | PCPS_DDEV * | pddev | ) |
Read the serial number and receiver info from the device.
The retrieved information is stored in the associated fields of the sub-structures of pddev.
[in,out] | pddev | Pointer to a device structure |
Definition at line 4097 of file pcpsdrvr.c.
References _mbg_kdd_msg_0, _mbg_kdd_msg_1, _mbg_kdd_msg_2, _mbg_kdd_msg_5, _mbg_swab_receiver_info, _mbgddmsg_1, _pcps_ddev_dev_id, _pcps_ddev_has_ident, _pcps_ddev_has_receiver_info, _pcps_ddev_has_sernum, _pcps_ddev_is_gps, _pcps_ddev_sernum, _pcps_ddev_sernum_size, _pcps_ddev_type_name, _pcps_read, _pcps_read_gps_var, _ri_addr, _setup_default_receiver_info_dcf, _setup_default_receiver_info_gps, beautify_sernum(), IDENT::c, PCPS_DEV::cfg, check_unknown_sernum(), DEBUG_DEV_INIT, PCPS_DDEV_s::dev, GPS_MODEL_UNKNOWN, mbg_gps_ident_decode(), MBG_LOG_DEBUG, MBG_LOG_ERR, MBG_LOG_INFO, MBG_LOG_WARN, mbg_rc_is_error, mbg_strerror(), MBG_SUCCESS, RECEIVER_INFO::model_code, PC_GPS_IDENT, PC_GPS_RECEIVER_INFO, PCPS_GIVE_SERNUM, REPORT_CFG_LOG_LVL, PCPS_DEV_CFG::sernum, and RECEIVER_INFO::sernum.
|
static |
Remove unprintable characters from a string.
[in,out] | s | Pointer to the string. |
[in] | max_len | Size of the string buffer. |
Definition at line 3716 of file pcpsdrvr.c.
Referenced by beautify_sernum().
|
static |
Wait until a PTP270PEX card is ready after power-up.
A PTP270PEX card must be accessed by the driver only after it has finished booting. Otherwise the host system may be locked up.
[in] | pddev | Pointer to the device structure |
Definition at line 1065 of file pcpsdrvr.c.
References _mbg_kdd_msg_2, MAX_BOOT_TIME_PTP270PEX, mbg_delta_sys_time_ms(), mbg_get_sys_time(), mbg_get_sys_uptime(), MBG_LOG_INFO, mbg_sleep_sec(), ptp270pex_can_flag_ready(), ptp270pex_has_flagged_ready(), and report_uptime().
Referenced by pcps_probe_device().
|
static |
A table of name strings associated with GPS_FEATURE_BITS.
Definition at line 733 of file pcpsdrvr.c.
Referenced by check_ri_features().
|
static |
Clock frequency of the PC's cycles counter, in [Hz].
An attempt to determine this value is made at the beginning of the pcps_probe_device routine. If the cycles frequency value is 0 then the target system doesn't supported this, or the value couldn't be determined. In this case it's not possible to convert a number of cycles to an associatred time interval.
Definition at line 661 of file pcpsdrvr.c.
Referenced by pcps_probe_device(), report_io_cmd(), and report_ret_val().
|
static |
A table of name strings associated with PCPS_FEATURE_BITS.
Definition at line 744 of file pcpsdrvr.c.
Referenced by check_ri_features(), and get_pcps_feature_name().
PCPS_READ_FNC pcps_read_gps |
Definition at line 3468 of file pcpsdrvr.c.
PCPS_WRITE_FNC pcps_write |
Definition at line 3020 of file pcpsdrvr.c.
PCPS_WRITE_FNC pcps_write_gps |
Definition at line 3573 of file pcpsdrvr.c.
|
static |
A table used to map RECEIVER_INFO::features to PCPS_DEV_CFG::features.
The enumerated GPS_FEATURE_BITS can be used as index to this table, and the table entry contains a combination of associated PCPS_FEATURE_MASKS, if there are any.
Definition at line 688 of file pcpsdrvr.c.
Referenced by check_ri_features().
|
static |
Definition at line 642 of file pcpsdrvr.c.
Referenced by check_feature(), pcps_probe_device(), and report_ret_val().
|
static |
Definition at line 646 of file pcpsdrvr.c.
Referenced by report_ret_val().
|
static |
Definition at line 643 of file pcpsdrvr.c.
Referenced by dump_tlv_info(), dump_xfeature_buffer(), get_bus_type_str(), get_pcps_feature_name(), and report_access_mode().