pio_wbadaddr(D3X)

pio_wbadaddr - test for valid output bus address pio_wbadaddr_val - test for valid output bus address and write value

As shipped in IRIX 6.5. First release of IRIX 6.5.

NAME
     pio_wbadaddr - test for valid output bus address
     pio_wbadaddr_val - test for valid output bus address and write value

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ddi.h>
     #include <sys/pio.h>

     int pio_wbadaddr(piomap_t *piomap, iopaddr_t iopaddr, int size);
     int pio_wbadaddr_val (piomap_t *piomap, iopaddr_t iopaddr, int size, int val);

   Arguments
     piomap
          A PIO map returned from pio_mapalloc(D3X).

     iopaddr
          The I/O bus address to be probed.

     size The size in bytes to use in probing the I/O bus: 1, 2, or 4.

     val  A value to be written to iopaddr (cast to int when size is 1 or 2).

DESCRIPTION
     Typically these functions are called from a I/O bus device driver's
     init(D2) or edtinit(D2) function to determine whether a device is present
     in the system.

     Call pio_wbadaddr to determine whether you can write to location iopaddr.
     The value written to the test location is binary zero of the specified
     size.

     Call pio_wbadaddr_val when you also want to specify the data to be
     written.

     Use pio_badaddr(D3X) to test a bus address for input only.

NOTES
     If an invalid size is passed a system panic results.

     It is possible that the pio_wbadaddr_val(D3X) function may change or be
     removed in the future.

     These routines may not be called from an interrupt handler, or routines
     that may be called from an interrupt handler.

   Return Values
     Both functions return 0 when the address is writeable, and 1 when it is
     not.
   See Also
     pio_badaddr(D3X), pio_bcopyout(D3X), pio_mapalloc(D3X).