udi_pio_atomic_sizes(3udi)
Retrieve supported PIO operation atomicity
#include <udi.h>udi_ubit32_t udi_pio_atomic_sizes ( udi_pio_handle_t pio_handle );ARGUMENTS pio_handle is a PIO handle previously acquired via udi_pio_map.
DESCRIPTION This routine retrieves an encoding of the PIO atomic transaction sizes (see atomic transaction in the Glossary) for which atomicity is supported when doing PIO accesses through pio_handle. The set of supported atomic sizes is platform and bus specific, and may also be dependent on device address space, and register set.
The driver will typically use this routine to verify up front that the atomic sizes it requires are supported, and then fail its initialization if they're not supported. If such a check is not done and the platform does not support the device's atomicity requirements then the results of corresponding PIO accesses will be indeterminate.
Atomicity is not guaranteed, regardless of transaction size, for any handle mapped with the UDI_PIO_UNALIGNED flag, or when using udi_pio_probe.
RETURN VALUES A bit encoding of the PIO operation sizes for which atomicity is supported is returned. Each bit position corresponds to a power of two byte PIO operation size. If a bit is set PIO operations of the corresponding size are supported atomically through the bus hierarchy to the device. For example, a configuration supporting atomic PIO operations of 1, 2, and 4 bytes would return a binary 0111.