Switchtec Userspace
PROJECT_NUMBER = PROJECT_NUMBER=PROJECT_NUMBER = 2.2
|
Various functions that fit don't fit into other categories. More...
Functions | |
int | switchtec_echo (struct switchtec_dev *dev, uint32_t input, uint32_t *output) |
Perform an MRPC echo command. More... | |
int | switchtec_hard_reset (struct switchtec_dev *dev) |
Perform an MRPC hard reset command. More... | |
int | switchtec_log_to_file (struct switchtec_dev *dev, enum switchtec_log_type type, int fd) |
Dump the Switchtec log data to a file. More... | |
int | switchtec_get_device_info (struct switchtec_dev *dev, enum switchtec_boot_phase *phase, enum switchtec_gen *gen, enum switchtec_rev *rev) |
Get device generation, revision, and boot phase info. More... | |
float | switchtec_die_temp (struct switchtec_dev *dev) |
Get the die temperature of the switchtec device. More... | |
int | switchtec_pff_to_port (struct switchtec_dev *dev, int pff, int *partition, int *port) |
Convert a port function index to a partition and port number. More... | |
int | switchtec_port_to_pff (struct switchtec_dev *dev, int partition, int port, int *pff) |
Convert a partition and port number to a port function index. More... | |
Various functions that fit don't fit into other categories.
float switchtec_die_temp | ( | struct switchtec_dev * | dev | ) |
Get the die temperature of the switchtec device.
[in] | dev | Switchtec device handle |
Definition at line 846 of file switchtec.c.
int switchtec_echo | ( | struct switchtec_dev * | dev, |
uint32_t | input, | ||
uint32_t * | output | ||
) |
Perform an MRPC echo command.
[in] | dev | Switchtec device handle |
[in] | input | The input data for the echo command |
[out] | output | The result of the echo command |
The echo command takes 4 bytes and returns the bitwise-not of those bytes.
Definition at line 623 of file switchtec.c.
int switchtec_get_device_info | ( | struct switchtec_dev * | dev, |
enum switchtec_boot_phase * | phase, | ||
enum switchtec_gen * | gen, | ||
enum switchtec_rev * | rev | ||
) |
Get device generation, revision, and boot phase info.
[in] | dev | Switchtec device handle |
[out] | phase | The current boot phase |
[out] | gen | Device generation |
[out] | rev | Device revision |
Definition at line 796 of file switchtec.c.
int switchtec_hard_reset | ( | struct switchtec_dev * | dev | ) |
Perform an MRPC hard reset command.
[in] | dev | Switchtec device handle |
Note: if your system does not support hotplug this may leave the Switchtec device in an unusable state. A reboot would be required to fix this.
Definition at line 639 of file switchtec.c.
int switchtec_log_to_file | ( | struct switchtec_dev * | dev, |
enum switchtec_log_type | type, | ||
int | fd | ||
) |
Dump the Switchtec log data to a file.
[in] | dev | Switchtec device handle |
[in] | type | Type of log data to dump |
[in] | fd | File descriptor to dump the data to |
Definition at line 745 of file switchtec.c.
int switchtec_pff_to_port | ( | struct switchtec_dev * | dev, |
int | pff, | ||
int * | partition, | ||
int * | port | ||
) |
Convert a port function index to a partition and port number.
[in] | dev | Switchtec device handle |
[in] | pff | Port function number |
[out] | partition | Partition number |
[out] | port | Port number |
Definition at line 181 of file platform.c.
int switchtec_port_to_pff | ( | struct switchtec_dev * | dev, |
int | partition, | ||
int | port, | ||
int * | pff | ||
) |
Convert a partition and port number to a port function index.
[in] | dev | Switchtec device handle |
[in] | partition | Partition number |
[in] | port | Port number |
[out] | pff | Port function number |
Definition at line 196 of file platform.c.