NAME

vme_master_window_create - Allocates a VMEbus Master Window handle.

SYNOPSIS

int vme_master_window_create ( vme_bus_handle_t bus_handle, vme_master_handle_t * window_handle, uint64_t vme_addr, int am, size_t size, int flags, void * phys_addr )

PARAMETERS

vme_bus_handle_t bus_handle

Handle allocated by vme_init.

vme_master_handle_t * window_handle

Pointer to the window handle to allocate.

uint64_t vme_addr

VMEbus address.

int am

VMEbus address modifier. Valid values are:

- VME_A16S - Short supervisory access.
- VME_A16U - Short nonprivileged access
- VME_A24SB - Standard supervisory block transfer
- VME_A24SD - Standard supervisory data access
- VME_A24SMB - Standard supervisory multiplex block transfer
- VME_A24SP - Standard supervisory program access
- VME_A24UB - Standard nonprivileged block transfer
- VME_A24UD - Standard nonprivileged data access
- VME_A24UMB - Standard nonprivileged multiplex block transfer
- VME_A24UP - Standard nonprivileged program access
- VME_A32SB - Extended supervisory block transfer
- VME_A32SD - Extended supervisory data access
- VME_A32SMB - Extended supervisory multiplex block transfer
- VME_A32SP - Extended supervisory program access
- VME_A32UB - Extended nonprivileged block transfer
- VME_A32UD - Extended nonprivileged data access
- VME_A32UMB - Extended nonprivileged multiplex block transfer
- VME_A32UP - Extended nonprivileged program access
size_t size

Minimum size of the window in bytes.

int flags

Flags indicating special window features. A value of 0 indicates that driver default values will be used. If a value is specified, it must be a bitwise "OR" of the following values for the Tundra Universe II device.

- VME_CTL_PWEN - Enable posted writes

One of the following values for max data width can be used. If a value is not specifed, a default max data width is selected.

- VME_CTL_MAX_DW_8
- VME_CTL_MAX_DW_16
- VME_CTL_MAX_DW_32
- VME_CTL_MAX_DW_64

Memory space option.

- VME_CTL_PCI_IO_SPACE - Open the window to PCI I/O space (default is memory space).
void * phys_addr

Specifies the local physical address to which the VMEbus window should translate. If NULL, the driver attempts to find a valid space.

DESCRIPTION

Allocates a VMEbus Master Window handle. If a suitable window is already configured within the bridge device, that window will be used. Otherwise, a VMEbus window is created to access the specified address and address space.

RETURNS

0 on success, or -1 on failure.

NOTES

Not all max data widths are available for all address modifiers. The default max data width is the maximum width available for the given address modifier.

SEE ALSO

vme_master_window_map(3), vme_master_window_phys_addr(3), vme_master_window_release(3), vme_master_window_translate(3), vme_master_window_unmap(3)