Open the device for a given bus and device id.
result = lv1_open_device( /*IN*/ bus_id, dev_id, 0 );
| Inputs | |
|---|---|
| Register | Description |
| R3 | bus_id - bus id |
| R4 | dev_id - device id |
| R5 | 0 - Unknown |
| Outputs | |
| Register | Description |
| R3 | Status: LV1_SUCCESS (0) - OK LV1_NO_ENTRY (-6) - invalid dev_id LV1_BUSY (-9) - device already open LV1_ILLEGAL_PARAMETER_VALUE (-17) - invalid bus_id |
Notes:
Valid values for bus_id and dev_id can be obtained from the repository (see lv1_get_repository_node_value).
Once open, functions such as lv1_map_device_mmio_region and lv1_allocate_device_dma_region can be used to map the device into memory.
The value of R5 does not seem to affect the outcome of the call (powers of 2 in the 64 bit range were tested). One reason for the flag could be to indicate whether to open the device in shared mode or not (and thus prevent the LV1_BUSY return code).