Allocate a DMA region for the specified device.
result = lv1_allocate_device_dma_region( /*IN*/ bus_id, dev_id, io_size, io_pagesize, flag, &dma_region );
| Inputs | |
|---|---|
| Register | Description |
| R3 | bus_id - bus id |
| R4 | dev_id - device id |
| R5 | io_size - region size |
| R6 | io_pagesize - specified as a PAGE_SHIFT (i.e. n where pagesize = 2^n) |
| R7 | flag - 0=32 bit mode, 2=8 bit mode |
| Outputs | |
| Register | Description |
| R3 | Status - 0 = OK, Other values are unknown, but indicate failure. |
| R4 | dma_region - dma region address |
Notes: When the device is little endian, the mode must be set to 8 bit for 8 bit DMA to work as expected, otherwise the bytes will be read/written in the wrong order. OTOH, this mode requires that 16 and 32-bit values are byte-swapped by the CPU since they will appear as little endian in memory.