mbgtools-lx
4.2.8
|
#include <mbg_tgt.h>
#include <xdevfeat.h>
#include <pcpsiobf.h>
#include <mbg_lx.h>
#include <pcpsdev.h>
#include <cfg_hlp.h>
#include <mbgmutex.h>
#include <pci_asic.h>
#include <mbgerror.h>
#include <use_pack.h>
#include <mbggenio.h>
#include <mbgddmsg.h>
#include <stddef.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <rsrc.h>
Go to the source code of this file.
Data Structures | |
struct | PCPS_RSRC_INFO |
Resource info summary for a device. More... | |
union | PCPS_MM_LAYOUT |
Memory layout of Meinberg PCI interface register. More... | |
struct | PCPS_MM_LAYOUT::pex8311 |
struct | PCPS_MM_LAYOUT::mbgpex |
struct | PCPS_DDEV_s |
Typedefs | |
typedef struct PCPS_DDEV_s | PCPS_DDEV |
typedef int | PCPS_READ_FNC(PCPS_DDEV *pddev, uint8_t cmd, void *buffer, uint16_t count) |
typedef int | PCPS_WRITE_FNC(PCPS_DDEV *pddev, uint8_t cmd, const void *buffer, uint16_t count) |
typedef int | PCPS_DDEV_INIT_FNC(PCPS_DDEV **ppddev) |
typedef void | PCPS_DDEV_CLEANUP_FNC(PCPS_DDEV *pddev) |
typedef int | PCPS_DDEV_REGISTER_FNC(PCPS_DDEV *pddev) |
Enumerations | |
enum | PCPS_ACCESS_MODES { PCPS_ACC_MODE_NULL, PCPS_ACC_MODE_USB, PCPS_ACC_MODE_IO, PCPS_ACC_MODE_MM, PCPS_ACC_MODE_MM16, N_PCPS_ACCESS_MODES } |
Codes used with PCPS_DDEV::access_mode. More... | |
Functions | |
static __mbg_inline uint8_t | _pcps_ddev_read_status_port (const PCPS_DDEV *pddev) |
void | pcps_dump_data (const void *buffer, size_t count, const char *info) |
int | pcps_write (PCPS_DDEV *pddev, uint8_t cmd, const void *buffer, uint16_t count) |
Write data to a device. More... | |
int | pcps_generic_io (PCPS_DDEV *pddev, uint8_t type, const void *in_buff, uint8_t in_cnt, void *out_buff, uint8_t out_cnt) |
Generic I/O function. More... | |
int | pcps_read_gps (PCPS_DDEV *pddev, uint8_t data_type, void *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 *buffer, uint16_t count) |
Write a large data structure to a device. 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... | |
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... | |
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_setup_ddev (PCPS_DDEV *pddev, PCPS_BUS_FLAGS bus_mask, PCPS_DEV_ID dev_id) |
Initialize an allocated device structure for a specific device. 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... | |
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... | |
int | pcps_setup_and_start_pci_dev (PCPS_DDEV *pddev, PCPS_BUS_NUM bus_num, PCPS_SLOT_NUM dev_fnc_num) |
Setup and start a PCI device in a non-PnP system. More... | |
void | pcps_detect_pci_devices (PCPS_DDEV_INIT_FNC *ddev_init_fnc, PCPS_DDEV_CLEANUP_FNC *ddev_cleanup_fnc, ushort vendor_id, PCPS_DEV_TYPE dev_type[], int n_dev_types) |
Detect and initialize PCI devices in a non-PnP system. 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[16], int isa_irqs[16]) |
Detect and initialize ISA devices in a non-PnP system. More... | |
void | pcps_detect_devices (int isa_ports[16], int isa_irqs[16]) |
Detect all bus-level devices in a non-PnP system. More... | |
Variables | |
const char | driver_name [] |
int | debug |
PCPS_DEV_TYPE | pcps_dev_type [N_PCPS_DEV_TYPE] |
int | pcps_isa_ports [16+1] |
PCPS_DDEV | pcps_ddev [16] |
int | n_ddevs |
const char * | fw_id_ref [] |
The first characters of a valid firmware ID. More... | |
int | force_io_access |
int | force_mm16_access |
#define _DEFAULT_PCPS_USE_CLOCK_TICK 1 |
Definition at line 327 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_ISA defined( MBG_ARCH_X86 ) |
Definition at line 328 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_ISA_PNP 0 |
Definition at line 331 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_MCA 0 |
Definition at line 329 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_MM_IO ( MBG_TGT_SUPP_MEM_ACC && !MBG_USE_MM_IO_FOR_PCI ) |
Definition at line 543 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_PCI 1 |
Definition at line 330 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_PCI_PNP _DEFAULT_MBG_TGT_LINUX_USE_PCI_PNP |
Definition at line 332 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_RSRCMGR 1 |
Definition at line 334 of file pcpsdrvr.h.
#define _DEFAULT_PCPS_USE_USB _DEFAULT_MBG_TGT_LINUX_USE_USB |
Definition at line 333 of file pcpsdrvr.h.
#define _ext extern |
Definition at line 516 of file pcpsdrvr.h.
#define _MBG_INIT_CODE_ATTR |
Definition at line 410 of file pcpsdrvr.h.
#define _pcps_ddev_access_mode_io | ( | _p | ) | ( (_p)->access_mode == PCPS_ACC_MODE_IO ) |
Definition at line 1210 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_access_mode_mm | ( | _p | ) |
Definition at line 1213 of file pcpsdrvr.h.
Referenced by _pcps_ddev_read_status_port(), and pcps_probe_device().
#define _pcps_ddev_asic_version | ( | _p | ) | ( (_p)->asic_version ) |
Definition at line 1190 of file pcpsdrvr.h.
Referenced by pcps_check_pex_irq_unsafe(), and pcps_probe_device().
#define _pcps_ddev_bus_flags | ( | _p | ) | _pcps_bus_flags( &(_p)->dev ) |
Definition at line 1134 of file pcpsdrvr.h.
Referenced by get_bus_type_str(), and pcps_probe_device().
#define _pcps_ddev_bus_num | ( | _p | ) | _pcps_bus_num( &(_p)->dev ) |
Definition at line 1167 of file pcpsdrvr.h.
Referenced by report_probe_device().
#define _pcps_ddev_can_clr_ucap_buff | ( | _p | ) | _pcps_can_clr_ucap_buff( &(_p)->dev ) |
Definition at line 1235 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_clr_ucap_buff().
#define _pcps_ddev_can_set_time | ( | _p | ) | _pcps_can_set_time( &(_p)->dev ) |
Definition at line 1220 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_set_time().
#define _pcps_ddev_chk_err_flags | ( | _p, | |
_msk | |||
) | _pcps_chk_err_flags( &(_p)->dev, _msk ) |
Definition at line 1196 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_clr_err_flags | ( | _p, | |
_msk | |||
) | _pcps_clr_err_flags( &(_p)->dev, _msk ) |
Definition at line 1202 of file pcpsdrvr.h.
#define _pcps_ddev_dev_id | ( | _p | ) | _pcps_dev_id( &(_p)->dev ) |
Definition at line 1132 of file pcpsdrvr.h.
Referenced by ddev_list_locate_device(), pcps_ddev_is_ptp270pex(), pcps_probe_device(), report_probe_device(), setup_sernum_and_receiver_info(), and swap_tstamp().
#define _pcps_ddev_err_flags | ( | _p | ) | _pcps_err_flags( &(_p)->dev ) |
Definition at line 1193 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_features | ( | _p | ) | _pcps_features( &(_p)->dev ) |
Definition at line 1184 of file pcpsdrvr.h.
Referenced by check_receiver_info_and_features(), and pcps_probe_device().
#define _pcps_ddev_fw_has_20ms_bug | ( | _p | ) | _pcps_fw_has_20ms_bug( &(_p)->dev ) |
Definition at line 1341 of file pcpsdrvr.h.
Referenced by report_access_mode().
#define _pcps_ddev_fw_id | ( | _p | ) | _pcps_fw_id( &(_p)->dev ) |
Definition at line 1185 of file pcpsdrvr.h.
Referenced by check_receiver_info_and_features(), pcps_check_id(), pcps_probe_device(), and report_access_mode().
#define _pcps_ddev_fw_rev_num | ( | _p | ) | _pcps_fw_rev_num( &(_p)->dev ) |
Definition at line 1183 of file pcpsdrvr.h.
Referenced by check_feature(), check_receiver_info_and_features(), check_ri_features(), pcps_check_pex_irq_unsafe(), pcps_probe_device(), and report_access_mode().
#define _pcps_ddev_has_asic_features | ( | _p | ) | _pcps_has_asic_features( &(_p)->dev ) |
Definition at line 1290 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_chk_dev_has_asic_features(), mbg_get_asic_features(), and pcps_probe_device().
#define _pcps_ddev_has_asic_version | ( | _p | ) | _pcps_has_asic_version( &(_p)->dev ) |
Definition at line 1287 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_chk_dev_has_asic_version(), mbg_get_asic_version(), and pcps_probe_device().
#define _pcps_ddev_has_cab_len | ( | _p | ) | _pcps_has_cab_len( &(_p)->dev ) |
Definition at line 1227 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_gps_ant_cable_len(), and mbg_set_gps_ant_cable_len().
#define _pcps_ddev_has_corr_info | ( | _p | ) | _pcps_has_corr_info( &(_p)->dev ) |
Definition at line 1308 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_get_corr_info().
#define _pcps_ddev_has_debug_status | ( | _p | ) | _pcps_has_debug_status( &(_p)->dev ) |
Definition at line 1317 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_get_debug_status().
#define _pcps_ddev_has_event_time | ( | _p | ) | _pcps_has_event_time( &(_p)->dev ) |
Definition at line 1233 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_chk_dev_has_event_time(), and mbg_set_event_time().
#define _pcps_ddev_has_evt_log | ( | _p | ) | _pcps_has_evt_log( &(_p)->dev ) |
Definition at line 1314 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_clr_evt_log(), mbg_get_first_evt_log_entry(), mbg_get_next_evt_log_entry(), and mbg_get_num_evt_log_entries().
#define _pcps_ddev_has_fast_hr_timestamp | ( | _p | ) | _pcps_has_fast_hr_timestamp( &(_p)->dev ) |
Definition at line 1293 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_get_time_info_tstamp().
#define _pcps_ddev_has_generic_io | ( | _p | ) | _pcps_has_generic_io( &(_p)->dev ) |
Definition at line 1278 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_generic_io().
#define _pcps_ddev_has_gpio | ( | _p | ) | _pcps_has_ri_gpio( _ri_addr( _p ) ) |
Definition at line 1335 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_gpio_cfg_limits(), mbg_get_gps_all_gpio_info(), mbg_get_gps_all_gpio_status(), and mbg_set_gps_gpio_settings_idx().
#define _pcps_ddev_has_gps_data | ( | _p | ) | _pcps_has_gps_data( &(_p)->dev ) |
Definition at line 1272 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_has_gps_data_16 | ( | _p | ) | _pcps_has_gps_data_16( &(_p)->dev ) |
Definition at line 1269 of file pcpsdrvr.h.
Referenced by pcps_check_gps_data_size().
#define _pcps_ddev_has_hr_time | ( | _p | ) | _pcps_has_hr_time( &(_p)->dev ) |
Definition at line 1225 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_hr_time(), mbg_get_hr_time_cycles(), mbg_get_time_info_hrt(), and report_ret_val().
#define _pcps_ddev_has_ident | ( | _p | ) | _pcps_has_ident( &(_p)->dev ) |
Definition at line 1223 of file pcpsdrvr.h.
Referenced by setup_sernum_and_receiver_info().
#define _pcps_ddev_has_irig | ( | _p | ) | _pcps_has_irig( &(_p)->dev ) |
Definition at line 1251 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_chk_dev_has_irig().
#define _pcps_ddev_has_irig_ctrl_bits | ( | _p | ) | _pcps_has_irig_ctrl_bits( &(_p)->dev ) |
Definition at line 1254 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_has_irig_time | ( | _p | ) | _pcps_has_irig_time( &(_p)->dev ) |
Definition at line 1257 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_has_irig_tx | ( | _p | ) | _pcps_has_irig_tx( &(_p)->dev ) |
Definition at line 1237 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_irig_tx_info(), and mbg_set_irig_tx_settings().
#define _pcps_ddev_has_lan_intf | ( | _p | ) | _pcps_has_lan_intf( &(_p)->dev ) |
Definition at line 1296 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_ip4_settings(), mbg_get_ip4_state(), mbg_get_lan_if_info(), and mbg_set_ip4_settings().
#define _pcps_ddev_has_mod | ( | _p | ) | _pcps_has_mod( &(_p)->dev ) |
Definition at line 1248 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_chk_dev_has_mod().
#define _pcps_ddev_has_opt_flags | ( | _p | ) | _pcps_has_opt_flags( &(_p)->dev ) |
Definition at line 1266 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_opt_info(), and mbg_set_opt_settings().
#define _pcps_ddev_has_pcps_tzdl | ( | _p | ) | _pcps_has_pcps_tzdl( &(_p)->dev ) |
Definition at line 1229 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_pcps_tzdl(), and mbg_set_pcps_tzdl().
#define _pcps_ddev_has_ptp | ( | _p | ) | _pcps_has_ptp( &(_p)->dev ) |
Definition at line 1299 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_ptp_cfg_info(), mbg_get_ptp_state(), and mbg_set_ptp_cfg_settings().
#define _pcps_ddev_has_ptp_unicast | ( | _p | ) | _pcps_has_ri_ptp_unicast( _ri_addr( _p ) ) |
Definition at line 1302 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_all_ptp_uc_master_info(), and mbg_set_ptp_uc_master_settings_idx().
#define _pcps_ddev_has_pzf | ( | _p | ) | _pcps_has_pzf( &(_p)->dev ) |
Definition at line 1305 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_has_raw_irig_data | ( | _p | ) | _pcps_has_raw_irig_data( &(_p)->dev ) |
Definition at line 1260 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_has_receiver_info | ( | _p | ) | _pcps_has_receiver_info( &(_p)->dev ) |
Definition at line 1234 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_gps_all_port_info(), mbg_get_gps_all_pout_info(), mbg_get_gps_all_str_type_info(), mbg_get_gps_receiver_info(), mbg_set_gps_port_settings_idx(), mbg_set_gps_pout_settings_idx(), and setup_sernum_and_receiver_info().
#define _pcps_ddev_has_ref_offs | ( | _p | ) | _pcps_has_ref_offs( &(_p)->dev ) |
Definition at line 1263 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_ref_offs(), and mbg_set_ref_offs().
#define _pcps_ddev_has_serial | ( | _p | ) | _pcps_has_serial( &(_p)->dev ) |
Definition at line 1221 of file pcpsdrvr.h.
#define _pcps_ddev_has_serial_hs | ( | _p | ) | _pcps_has_serial_hs( &(_p)->dev ) |
Definition at line 1241 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_chk_dev_has_serial_hs().
#define _pcps_ddev_has_sernum | ( | _p | ) | _pcps_has_sernum( &(_p)->dev ) |
Definition at line 1226 of file pcpsdrvr.h.
Referenced by setup_sernum_and_receiver_info().
#define _pcps_ddev_has_signal | ( | _p | ) | _pcps_has_signal( &(_p)->dev ) |
Definition at line 1245 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_chk_dev_has_signal().
#define _pcps_ddev_has_stat_info | ( | _p | ) | _pcps_has_stat_info( &(_p)->dev ) |
Definition at line 1320 of file pcpsdrvr.h.
#define _pcps_ddev_has_stat_info_mode | ( | _p | ) | _pcps_has_stat_info_mode( &(_p)->dev ) \ |
Definition at line 1323 of file pcpsdrvr.h.
#define _pcps_ddev_has_stat_info_svs | ( | _p | ) | _pcps_has_stat_info_svs( &(_p)->dev ) \ |
Definition at line 1326 of file pcpsdrvr.h.
#define _pcps_ddev_has_sync_time | ( | _p | ) | _pcps_has_sync_time( &(_p)->dev ) |
Definition at line 1222 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_get_sync_time().
#define _pcps_ddev_has_synth | ( | _p | ) | _pcps_has_synth( &(_p)->dev ) |
Definition at line 1275 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_synth(), mbg_get_synth_state(), and mbg_set_synth().
#define _pcps_ddev_has_time_scale | ( | _p | ) | _pcps_has_time_scale( &(_p)->dev ) |
Definition at line 1281 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_time_scale_info(), and mbg_set_time_scale_settings().
#define _pcps_ddev_has_tr_distance | ( | _p | ) | _pcps_has_tr_distance( &(_p)->dev ) |
Definition at line 1311 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_tr_distance(), and mbg_set_tr_distance().
#define _pcps_ddev_has_tz | ( | _p | ) | _pcps_has_tz( &(_p)->dev ) |
Definition at line 1231 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbg_chk_dev_has_tz().
#define _pcps_ddev_has_tzcode | ( | _p | ) | _pcps_has_tzcode( &(_p)->dev ) |
Definition at line 1230 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_tzcode(), and mbg_set_tzcode().
#define _pcps_ddev_has_tzdl | ( | _p | ) | _pcps_has_tzdl( &(_p)->dev ) |
Definition at line 1228 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_has_ucap | ( | _p | ) | _pcps_has_ucap( &(_p)->dev ) |
Definition at line 1236 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_ucap_entries(), and mbg_get_ucap_event().
#define _pcps_ddev_has_utc_offs | ( | _p | ) | _pcps_has_utc_offs( &(_p)->dev ) |
Definition at line 1224 of file pcpsdrvr.h.
#define _pcps_ddev_has_utc_parm | ( | _p | ) | _pcps_has_utc_parm( &(_p)->dev ) |
Definition at line 1284 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_utc_parm(), and mbg_set_utc_parm().
#define _pcps_ddev_has_xmr | ( | _p | ) | _pcps_has_ri_xmr( _ri_addr( _p ) ) |
Definition at line 1338 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_gps_all_xmr_info(), mbg_get_gps_all_xmr_status(), mbg_get_xmr_holdover_status(), mbg_get_xmr_instances(), and mbg_set_gps_xmr_settings_idx().
#define _pcps_ddev_incoming_tfom_ignored | ( | _p | ) | _pcps_incoming_tfom_ignored( &(_p)->dev ) |
Definition at line 1329 of file pcpsdrvr.h.
#define _pcps_ddev_io_base_mapped | ( | _p, | |
_n | |||
) | ( _pcps_ddev_io_rsrc( _p, _n ).base_mapped ) |
Definition at line 1177 of file pcpsdrvr.h.
Referenced by mbg_get_asic_features(), mbg_get_asic_version(), pcps_probe_device(), pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), pcps_read_std(), and ptp270pex_has_flagged_ready().
#define _pcps_ddev_io_base_raw | ( | _p, | |
_n | |||
) | ( _pcps_ddev_io_rsrc( _p, _n ).base_raw ) |
Definition at line 1176 of file pcpsdrvr.h.
Referenced by pcps_probe_device(), and report_access_mode().
#define _pcps_ddev_io_rsrc | ( | _p, | |
_n | |||
) | ( (_p)->rsrc_info.port[_n] ) |
Definition at line 1175 of file pcpsdrvr.h.
Referenced by pcps_release_rsrcs().
#define _pcps_ddev_irq_num | ( | _p | ) | _pcps_irq_num( &(_p)->dev ) |
Definition at line 1178 of file pcpsdrvr.h.
Referenced by mbgclock_irq_handler(), mbgdrvr_disable_cyclic(), mbgdrvr_enable_cyclic(), and report_access_mode().
#define _pcps_ddev_is_dcf | ( | _p | ) | _pcps_is_dcf( &(_p)->dev ) |
Definition at line 1139 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_is_frc | ( | _p | ) | _pcps_is_frc( &(_p)->dev ) |
Definition at line 1144 of file pcpsdrvr.h.
#define _pcps_ddev_is_gnss | ( | _p | ) | _pcps_is_gnss( &(_p)->dev ) |
Definition at line 1147 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_gps_all_gnss_sat_info(), mbg_get_gps_gnss_mode_info(), and mbg_set_gps_gnss_mode_settings().
#define _pcps_ddev_is_gps | ( | _p | ) | _pcps_is_gps( &(_p)->dev ) |
Definition at line 1138 of file pcpsdrvr.h.
Referenced by ioctl_switch(), pcps_release_rsrcs(), and setup_sernum_and_receiver_info().
#define _pcps_ddev_is_irig_rx | ( | _p | ) | _pcps_is_irig_rx( &(_p)->dev ) |
Definition at line 1142 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_irig_rx_info(), mbg_set_irig_rx_settings(), and pcps_release_rsrcs().
#define _pcps_ddev_is_isa | ( | _p | ) | _pcps_is_isa( &(_p)->dev ) |
Definition at line 1151 of file pcpsdrvr.h.
Referenced by mbgdrvr_enable_cyclic(), and pcps_probe_device().
#define _pcps_ddev_is_lwr | ( | _p | ) | _pcps_is_lwr( &(_p)->dev ) |
Definition at line 1146 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_is_mca | ( | _p | ) | _pcps_is_mca( &(_p)->dev ) |
Definition at line 1152 of file pcpsdrvr.h.
Referenced by pcps_release_rsrcs().
#define _pcps_ddev_is_msf | ( | _p | ) | _pcps_is_msf( &(_p)->dev ) |
Definition at line 1140 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_is_pci | ( | _p | ) | _pcps_is_pci( &(_p)->dev ) |
Definition at line 1153 of file pcpsdrvr.h.
Referenced by pcps_ddev_is_ptp270pex(), pcps_release_rsrcs(), and report_probe_device().
#define _pcps_ddev_is_pci_amcc | ( | _p | ) | _pcps_is_pci_amcc( &(_p)->dev ) |
Definition at line 1160 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_is_pci_asic | ( | _p | ) | _pcps_is_pci_asic( &(_p)->dev ) |
Definition at line 1161 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_is_pci_mbgpex | ( | _p | ) | _pcps_is_pci_mbgpex( &(_p)->dev ) |
Definition at line 1163 of file pcpsdrvr.h.
Referenced by pcps_probe_device(), and setup_mm_addr().
#define _pcps_ddev_is_pci_pex8311 | ( | _p | ) | _pcps_is_pci_pex8311( &(_p)->dev ) |
Definition at line 1162 of file pcpsdrvr.h.
Referenced by pcps_probe_device(), and setup_mm_addr().
#define _pcps_ddev_is_pci_s5920 | ( | _p | ) | _pcps_is_pci_s5920( &(_p)->dev ) |
Definition at line 1159 of file pcpsdrvr.h.
Referenced by report_io_cmd().
#define _pcps_ddev_is_pci_s5933 | ( | _p | ) | _pcps_is_pci_s5933( &(_p)->dev ) |
Definition at line 1158 of file pcpsdrvr.h.
#define _pcps_ddev_is_ptp | ( | _p | ) | _pcps_is_ptp( &(_p)->dev ) |
Definition at line 1143 of file pcpsdrvr.h.
Referenced by ioctl_switch().
#define _pcps_ddev_is_usb | ( | _p | ) | _pcps_is_usb( &(_p)->dev ) |
Definition at line 1154 of file pcpsdrvr.h.
Referenced by get_cyclic_lock(), ioctl_switch(), mbgclock_read(), mbgdrvr_disable_cyclic(), mbgdrvr_enable_cyclic(), pcps_probe_device(), pcps_read_gps(), pcps_read_gps_block(), pcps_write(), pcps_write_gps(), release_cyclic_lock(), and report_io_cmd().
#define _pcps_ddev_is_usb_v2 | ( | _p | ) | _pcps_is_usb_v2( &(_p)->dev ) |
Definition at line 1157 of file pcpsdrvr.h.
#define _pcps_ddev_is_wwvb | ( | _p | ) | _pcps_is_wwvb( &(_p)->dev ) |
Definition at line 1141 of file pcpsdrvr.h.
#define _pcps_ddev_mem_rsrc | ( | _p, | |
_n | |||
) | ( (_p)->rsrc_info.mem[_n] ) |
Definition at line 1181 of file pcpsdrvr.h.
Referenced by pcps_release_rsrcs().
#define _pcps_ddev_pci_cfg_err | ( | _p | ) | _pcps_pci_cfg_err( &(_p)->dev ) |
Definition at line 1332 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_pci_fnc_num | ( | _p | ) | ( _pcps_ddev_slot_num( _p ) & 0x07 ) |
Definition at line 1170 of file pcpsdrvr.h.
Referenced by report_probe_device().
#define _pcps_ddev_pci_slot_num | ( | _p | ) | ( _pcps_ddev_slot_num( _p ) >> 3 ) |
Definition at line 1169 of file pcpsdrvr.h.
Referenced by report_probe_device().
#define _pcps_ddev_raw_asic_version | ( | _p | ) | ( (_p)->raw_asic_version ) |
Definition at line 1189 of file pcpsdrvr.h.
#define _pcps_ddev_ref_type | ( | _p | ) | _pcps_ref_type( &(_p)->dev ) |
Definition at line 1133 of file pcpsdrvr.h.
Referenced by pcps_chk_dev_feat().
#define _pcps_ddev_requires_irig_workaround | ( | _d | ) |
Definition at line 1463 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbg_get_irig_tx_info(), and mbg_set_irig_tx_settings().
#define _pcps_ddev_sernum | ( | _p | ) | _pcps_sernum( &(_p)->dev ) |
Definition at line 1186 of file pcpsdrvr.h.
Referenced by beautify_sernum(), check_receiver_info_and_features(), ddev_list_locate_device(), ioctl_switch(), mbgclock_irq_handler(), mbgclock_poll(), mbgclock_read(), mbgclock_release(), mbgclock_unlocked_ioctl(), mbgdrvr_disable_cyclic(), mbgdrvr_enable_cyclic(), mbgdrvr_get_pddev(), release_cyclic_lock(), report_access_mode(), set_dev_connected(), and setup_sernum_and_receiver_info().
#define _pcps_ddev_sernum_size | ( | _p | ) | sizeof( (_p)->dev.cfg.sernum ) |
Definition at line 1187 of file pcpsdrvr.h.
Referenced by setup_sernum_and_receiver_info().
#define _pcps_ddev_set_err_flags | ( | _p, | |
_msk | |||
) | _pcps_set_err_flags( &(_p)->dev, _msk ) |
Definition at line 1199 of file pcpsdrvr.h.
Referenced by pcps_add_rsrc_io(), pcps_add_rsrc_mem(), pcps_cleanup_device(), pcps_probe_device(), and report_ret_val().
#define _pcps_ddev_short_port_base | ( | _p, | |
_n | |||
) | _pcps_short_port_base( &(_p)->dev, _n ) |
Definition at line 1173 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_ddev_short_port_rsrc | ( | _p, | |
_n | |||
) | _pcps_short_port_rsrc( &(_p)->dev, _n ) |
Definition at line 1172 of file pcpsdrvr.h.
#define _pcps_ddev_slot_num | ( | _p | ) | _pcps_slot_num( &(_p)->dev ) |
Definition at line 1168 of file pcpsdrvr.h.
Referenced by report_probe_device().
#define _pcps_ddev_status_busy | ( | _d | ) | ( _pcps_ddev_read_status_port( pddev ) & PCPS_ST_BUSY ) |
Definition at line 1455 of file pcpsdrvr.h.
Referenced by pcps_wait_busy().
#define _pcps_ddev_timeout_clk | ( | _p | ) | _pcps_timeout_clk( &(_p)->dev ) |
Definition at line 1179 of file pcpsdrvr.h.
Referenced by pcps_wait_busy().
#define _pcps_ddev_type_name | ( | _p | ) | _pcps_type_name( &(_p)->dev ) |
Definition at line 1131 of file pcpsdrvr.h.
Referenced by check_feature(), check_receiver_info_and_features(), check_ri_features(), ioctl_switch(), mbgclock_irq_handler(), mbgclock_poll(), mbgclock_read(), mbgclock_release(), mbgclock_unlocked_ioctl(), mbgdrvr_disable_cyclic(), mbgdrvr_enable_cyclic(), mbgdrvr_get_pddev(), pcps_get_fw_id(), pcps_probe_device(), ptp270pex_can_flag_ready(), release_cyclic_lock(), report_access_mode(), report_io_cmd(), report_probe_device(), set_dev_connected(), and setup_sernum_and_receiver_info().
#define _pcps_ddev_type_num | ( | _p | ) | _pcps_type_num( &(_p)->dev ) |
Definition at line 1130 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define _pcps_force_reset | ( | _pddev | ) | _pcps_write_byte( (_pddev), PCPS_FORCE_RESET ) |
Definition at line 1417 of file pcpsdrvr.h.
#define _pcps_kfree | ( | _p, | |
_sz | |||
) | kfree( _p ) |
Definition at line 556 of file pcpsdrvr.h.
Referenced by ddev_list_free(), ioctl_switch(), pcps_free_ddev_struc(), and report_ret_val().
#define _pcps_kmalloc | ( | _sz | ) | kmalloc( _sz, GFP_ATOMIC ) |
Definition at line 555 of file pcpsdrvr.h.
Referenced by ddev_list_alloc(), ioctl_switch(), pcps_alloc_ddev_struc(), and report_ret_val().
#define _pcps_read | ( | _pddev, | |
_cmd, | |||
_p, | |||
_n | |||
) | ( (_pddev)->read( _pddev, (_cmd), (uchar FAR *)(_p), (_n) ) ) |
Definition at line 1350 of file pcpsdrvr.h.
Referenced by ioctl_switch(), pcps_generic_io(), pcps_get_fw_id(), pcps_init_gps_transfer(), pcps_probe_device(), pcps_read_gps_block(), and setup_sernum_and_receiver_info().
#define _pcps_read_gps | ( | _pddev, | |
_cmd, | |||
_p, | |||
_n | |||
) | pcps_read_gps( (_pddev), (_cmd), (uchar FAR *)(_p), (_n) ) |
Definition at line 1376 of file pcpsdrvr.h.
#define _pcps_read_gps_var | ( | _pddev, | |
_cmd, | |||
_s | |||
) | _pcps_read_gps( (_pddev), (_cmd), &(_s), sizeof( (_s) ) ) |
Definition at line 1406 of file pcpsdrvr.h.
Referenced by check_receiver_info_and_features(), and setup_sernum_and_receiver_info().
#define _pcps_read_var | ( | _pddev, | |
_cmd, | |||
_s | |||
) | _pcps_read( (_pddev), (_cmd), &(_s), sizeof( (_s) ) ) |
Definition at line 1391 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbgclock_default_get_ucap_entries(), mbgclock_default_get_ucap_event(), mbgclock_irq_handler(), pcps_generic_io(), pcps_init_gps_transfer(), pcps_write(), pcps_write_gps(), and report_ret_val().
#define _pcps_sem_dec | ( | _pddev | ) |
Definition at line 575 of file pcpsdrvr.h.
Referenced by ioctl_switch(), mbgclock_default_clr_ucap_buff(), mbgclock_default_get_ucap_entries(), and mbgclock_default_get_ucap_event().
#define _pcps_sem_inc | ( | _pddev | ) |
Definition at line 563 of file pcpsdrvr.h.
#define _PCPS_STATIC_DEV_LIST ( !_PCPS_USE_PNP ) |
Definition at line 620 of file pcpsdrvr.h.
#define _PCPS_USE_CLOCK_TICK _DEFAULT_PCPS_USE_CLOCK_TICK |
Definition at line 365 of file pcpsdrvr.h.
#define _PCPS_USE_ISA _DEFAULT_PCPS_USE_ISA |
Definition at line 369 of file pcpsdrvr.h.
#define _PCPS_USE_ISA_PNP _DEFAULT_PCPS_USE_ISA_PNP |
Definition at line 381 of file pcpsdrvr.h.
#define _PCPS_USE_MCA _DEFAULT_PCPS_USE_MCA |
Definition at line 373 of file pcpsdrvr.h.
#define _PCPS_USE_MM_IO _DEFAULT_PCPS_USE_MM_IO |
Definition at line 546 of file pcpsdrvr.h.
#define _PCPS_USE_PCI_BIOS ( _PCPS_USE_PCI && !_PCPS_USE_PCI_PNP ) |
Definition at line 398 of file pcpsdrvr.h.
#define _PCPS_USE_PCI_PNP _DEFAULT_PCPS_USE_PCI_PNP |
Definition at line 385 of file pcpsdrvr.h.
#define _PCPS_USE_PNP ( _PCPS_USE_PCI_PNP || _PCPS_USE_ISA_PNP || _PCPS_USE_USB ) |
Definition at line 401 of file pcpsdrvr.h.
#define _PCPS_USE_RSRCMGR _DEFAULT_PCPS_USE_RSRCMGR |
Definition at line 393 of file pcpsdrvr.h.
#define _PCPS_USE_USB _DEFAULT_PCPS_USE_USB |
Definition at line 389 of file pcpsdrvr.h.
#define _pcps_write | ( | _pddev, | |
_cmd, | |||
_p, | |||
_n | |||
) | pcps_write( (_pddev), (_cmd), (uchar FAR *)(_p), (_n) ) |
Definition at line 1366 of file pcpsdrvr.h.
#define _pcps_write_byte | ( | _pddev, | |
_b | |||
) | _pcps_read( (_pddev), (_b), NULL, 0 ) |
Definition at line 1358 of file pcpsdrvr.h.
Referenced by mbgclock_default_clr_ucap_buff(), pcps_generic_io(), pcps_write(), and pcps_write_gps().
#define _pcps_write_gps | ( | _pddev, | |
_cmd, | |||
_p, | |||
_n | |||
) | pcps_write_gps( (_pddev), (_cmd), (uchar FAR *)(_p), (_n) ) |
Definition at line 1380 of file pcpsdrvr.h.
#define _pcps_write_gps_var | ( | _pddev, | |
_cmd, | |||
_s | |||
) | _pcps_write_gps( (_pddev), (_cmd), &(_s), sizeof( (_s) ) ) |
Definition at line 1410 of file pcpsdrvr.h.
#define _pcps_write_var | ( | _pddev, | |
_cmd, | |||
_s | |||
) | _pcps_write( (_pddev), (_cmd), &(_s), sizeof( (_s) ) ) |
Definition at line 1397 of file pcpsdrvr.h.
#define DEBUG_DEV_INIT 0 |
Definition at line 418 of file pcpsdrvr.h.
Referenced by check_receiver_info_and_features(), pcps_add_rsrc_irq(), pcps_alloc_ddev_struc(), pcps_chk_dev_feat(), pcps_cleanup_device(), pcps_detect_isa_devices(), pcps_get_fw_id(), pcps_probe_device(), and setup_sernum_and_receiver_info().
#define DEBUG_DRVR 0 |
Definition at line 414 of file pcpsdrvr.h.
Referenced by ddev_list_alloc(), ddev_list_free(), ddev_list_locate_device(), mbgclock_init_module(), mbgclock_ioctl(), mbgclock_mmap(), mbgclock_open(), mbgclock_read(), mbgclock_release(), mbgdrvr_disable_cyclic(), mbgdrvr_enable_cyclic(), mbgdrvr_ioctl_emu_serial(), and release_cyclic_lock().
#define DEBUG_IOCTL 0 |
Definition at line 426 of file pcpsdrvr.h.
Referenced by ioctl_switch(), and mbgdrvr_ioctl_emu_serial().
#define DEBUG_USB_IO 0 |
Definition at line 422 of file pcpsdrvr.h.
#define fw_id_ref_gps fw_id_ref[2] |
Definition at line 1117 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define fw_id_ref_pcps fw_id_ref[0] |
Definition at line 1116 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define ISA_ID_PCPS MCA_ID_PS31 |
A board ID for later ISA bus devices.
The number can be read at port_base + 2 (low byte), and port_base + 3 (high byte) of ISA devices. This ID number matches the MCA adapter ID MCA_ID_PS31 and is not provided by PC31 devices.
Definition at line 985 of file pcpsdrvr.h.
#define MAX_PCPS_RSRC ( N_PCPS_MEM_RSRC + N_PCPS_PORT_RSRC ) |
The max number of bus memory and I/O resources used by a device.
Definition at line 672 of file pcpsdrvr.h.
Referenced by pcps_cleanup_device().
#define MBG_DRVR_NAME "mbgclock" |
Definition at line 532 of file pcpsdrvr.h.
#define MCA_ID_PS31 0x6AAC |
MCA adapter ID assigned by IBM.
Definition at line 961 of file pcpsdrvr.h.
#define MCA_ID_PS31_OLD 0x6303 |
MCA adapter ID assigned by Meinberg, used with the first series of PS31 boards.
Definition at line 962 of file pcpsdrvr.h.
#define N_PCPS_MEM_RSRC 2 |
The max number of bus memory resources used by a device.
Definition at line 666 of file pcpsdrvr.h.
Referenced by pcps_add_rsrc_mem().
#define PCPS_ACCESS_MODE_STR_FRCD " (forced)" |
String to append if access mode has been forced.
Definition at line 943 of file pcpsdrvr.h.
Referenced by report_access_mode().
#define PCPS_ACCESS_MODE_STRS |
Device access mode info strings.
Definition at line 929 of file pcpsdrvr.h.
Referenced by report_access_mode().
#define PCPS_DECODE_WIDTH_ISA 10 |
The number of address lines decoded by an ISA bus device.
Definition at line 1006 of file pcpsdrvr.h.
#define PCPS_DECODE_WIDTH_MCA 16 |
The number of address lines decoded by an MCA device.
Definition at line 972 of file pcpsdrvr.h.
#define PCPS_DECODE_WIDTH_PCI 16 |
The number of address lines decoded by a PCI clock.
Definition at line 950 of file pcpsdrvr.h.
#define PCPS_DEFAULT_PORT 0x0300 |
The default port base address for ISA bus devices.
Some programs assume a default port for an ISA default, but others do not but require a cmd line parameter.
Definition at line 994 of file pcpsdrvr.h.
#define PCPS_MAX_ISA_CARDS N_SUPP_DEV_BUS |
Definition at line 1071 of file pcpsdrvr.h.
Referenced by pcps_detect_isa_devices().
#define PCPS_NUM_PORTS_ISA 4 |
The total number of I/O ports used by an ISA bus device.
Definition at line 1000 of file pcpsdrvr.h.
Referenced by pcps_detect_isa_devices().
#define PCPS_NUM_PORTS_MCA 16 |
The total number of ports acquired by an MCA device.
Definition at line 967 of file pcpsdrvr.h.
Referenced by pcps_release_rsrcs().
#define PCPS_TIMEOUT_CNT ( (ulong)( 200 * HZ ) / 1000 ) |
Definition at line 646 of file pcpsdrvr.h.
Referenced by pcps_probe_device().
#define USE_LOCAL_IO_BUFFER 0 |
Definition at line 286 of file pcpsdrvr.h.
typedef struct PCPS_DDEV_s PCPS_DDEV |
Definition at line 767 of file pcpsdrvr.h.
typedef void PCPS_DDEV_CLEANUP_FNC(PCPS_DDEV *pddev) |
Definition at line 772 of file pcpsdrvr.h.
typedef int PCPS_DDEV_INIT_FNC(PCPS_DDEV **ppddev) |
Definition at line 771 of file pcpsdrvr.h.
typedef int PCPS_DDEV_REGISTER_FNC(PCPS_DDEV *pddev) |
Definition at line 773 of file pcpsdrvr.h.
Definition at line 769 of file pcpsdrvr.h.
Definition at line 770 of file pcpsdrvr.h.
enum PCPS_ACCESS_MODES |
Codes used with PCPS_DDEV::access_mode.
Definition at line 911 of file pcpsdrvr.h.
Definition at line 1430 of file pcpsdrvr.h.
References _mbg_inp8, _mbg_mmrd8_offs, _pcps_ddev_access_mode_mm, PCPS_DDEV_s::status_port, and PCPS_DDEV_s::status_port_offs.
Referenced by ioctl_switch(), mbg_get_status_port(), pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), and pcps_read_std().
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.
Referenced by pcps_probe_device().
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.
Referenced by pcps_cleanup_device(), pcps_detect_isa_devices(), and pcps_release_rsrcs().
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.
Referenced by pcps_cleanup_device(), and pcps_detect_isa_devices().
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.
Referenced by pcps_cleanup_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.
Referenced by check_receiver_info_and_features(), do_chk_dev_feat(), and ioctl_switch().
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().
Referenced by mbgclock_init_module(), and pcps_detect_devices().
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.
Referenced by pcps_probe_device().
void pcps_detect_devices | ( | int | isa_ports[16], |
int | isa_irqs[16] | ||
) |
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. |
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[16], | ||
int | isa_irqs[16] | ||
) |
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. |
void pcps_detect_pci_devices | ( | PCPS_DDEV_INIT_FNC * | ddev_init_fnc, |
PCPS_DDEV_CLEANUP_FNC * | ddev_cleanup_fnc, | ||
ushort | vendor_id, | ||
PCPS_DEV_TYPE | dev_type[], | ||
int | n_dev_types | ||
) |
Detect and initialize PCI 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] | vendor_id | The PCI vendor ID code. |
[in] | dev_type | An array with known PCI devices for the specified vendor ID |
[in] | n_dev_types | The number of entries in the PCI device table |
Referenced by pcps_cleanup_device(), and pcps_detect_devices_init().
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.
Referenced by pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), pcps_read_std(), and report_ret_val().
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.
Referenced by pcps_add_rsrc_irq().
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().
Referenced by mbgclock_init_module(), and pcps_detect_devices().
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.
Referenced by pcps_cleanup_device(), pcps_detect_isa_devices(), and pcps_release_rsrcs().
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.
Referenced by pcps_cleanup_device().
int pcps_setup_and_start_pci_dev | ( | PCPS_DDEV * | pddev, |
PCPS_BUS_NUM | bus_num, | ||
PCPS_SLOT_NUM | dev_fnc_num | ||
) |
Setup and start a PCI device in a non-PnP system.
[in,out] | pddev | Pointer to the device structure to be set up |
[in] | bus_num | The PCI bus number returned by the PCI BIOS |
[in] | dev_fnc_num | The PCI device/function number returned by the PCI BIOS |
Referenced by pcps_cleanup_device().
int pcps_setup_ddev | ( | PCPS_DDEV * | pddev, |
PCPS_BUS_FLAGS | bus_mask, | ||
PCPS_DEV_ID | dev_id | ||
) |
Initialize an allocated device structure for a specific device.
[in,out] | pddev | Pointer to the device structure |
[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 |
Referenced by pcps_add_rsrc_irq(), and pcps_cleanup_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.
Referenced by pcps_probe_device().
int debug |
Referenced by mbgclock_init_module(), and mbgclock_read().
const char driver_name[] |
int force_io_access |
Referenced by mbgclock_init_module(), and pcps_probe_device().
int force_mm16_access |
Referenced by mbgclock_init_module(), and pcps_probe_device().
const char* fw_id_ref[] |
The first characters of a valid firmware ID.
int n_ddevs |
PCPS_DDEV pcps_ddev[16] |
Referenced by mbg_open_device(), mbg_open_device_by_name(), and pcps_alloc_ddev_struc().
PCPS_DEV_TYPE pcps_dev_type[N_PCPS_DEV_TYPE] |
Referenced by pcps_detect_devices_init(), pcps_get_dev_type_table_entry(), pcps_probe_device(), and pcps_release_rsrcs().
int pcps_isa_ports[ 16+1] |
Referenced by mbg_find_devices().