Last change
on this file since 161 was
158,
checked in by alain, 13 years ago
|
Introducing the giet_vm and some example applications
|
File size:
1.5 KB
|
Rev | Line | |
---|
[158] | 1 | #ifndef _HWR_MAPPING_H |
---|
| 2 | #define _HWR_MAPPING_H |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * Registers mapping for the different peripherals |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | /* IOC (block device) */ |
---|
| 9 | enum IOC_registers { |
---|
| 10 | BLOCK_DEVICE_BUFFER, |
---|
| 11 | BLOCK_DEVICE_LBA, |
---|
| 12 | BLOCK_DEVICE_COUNT, |
---|
| 13 | BLOCK_DEVICE_OP, |
---|
| 14 | BLOCK_DEVICE_STATUS, |
---|
| 15 | BLOCK_DEVICE_IRQ_ENABLE, |
---|
| 16 | BLOCK_DEVICE_SIZE, |
---|
| 17 | BLOCK_DEVICE_BLOCK_SIZE, |
---|
| 18 | }; |
---|
| 19 | enum IOC_operations { |
---|
| 20 | BLOCK_DEVICE_NOOP, |
---|
| 21 | BLOCK_DEVICE_READ, |
---|
| 22 | BLOCK_DEVICE_WRITE, |
---|
| 23 | }; |
---|
| 24 | enum IOC_status{ |
---|
| 25 | BLOCK_DEVICE_IDLE, |
---|
| 26 | BLOCK_DEVICE_BUSY, |
---|
| 27 | BLOCK_DEVICE_READ_SUCCESS, |
---|
| 28 | BLOCK_DEVICE_WRITE_SUCCESS, |
---|
| 29 | BLOCK_DEVICE_READ_ERROR, |
---|
| 30 | BLOCK_DEVICE_WRITE_ERROR, |
---|
| 31 | BLOCK_DEVICE_ERROR, |
---|
| 32 | }; |
---|
| 33 | |
---|
| 34 | /* DMA */ |
---|
| 35 | enum DMA_registers { |
---|
| 36 | DMA_SRC = 0, |
---|
| 37 | DMA_DST = 1, |
---|
| 38 | DMA_LEN = 2, |
---|
| 39 | DMA_RESET = 3, |
---|
| 40 | DMA_IRQ_DISABLE = 4, |
---|
| 41 | /**/ |
---|
| 42 | DMA_END = 5, |
---|
| 43 | DMA_SPAN = 8, |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | /* GCD */ |
---|
| 47 | enum GCD_registers { |
---|
| 48 | GCD_OPA = 0, |
---|
| 49 | GCD_OPB = 1, |
---|
| 50 | GCD_START = 2, |
---|
| 51 | GCD_STATUS = 3, |
---|
| 52 | /**/ |
---|
| 53 | GCD_END = 4, |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | /* ICU */ |
---|
| 57 | enum ICU_registers { |
---|
| 58 | ICU_INT = 0, |
---|
| 59 | ICU_MASK = 1, |
---|
| 60 | ICU_MASK_SET = 2, |
---|
| 61 | ICU_MASK_CLEAR = 3, |
---|
| 62 | ICU_IT_VECTOR = 4, |
---|
| 63 | /**/ |
---|
| 64 | ICU_END = 5, |
---|
| 65 | ICU_SPAN = 8, |
---|
| 66 | }; |
---|
| 67 | |
---|
| 68 | /* TIMER */ |
---|
| 69 | enum TIMER_registers { |
---|
| 70 | TIMER_VALUE = 0, |
---|
| 71 | TIMER_MODE = 1, |
---|
| 72 | TIMER_PERIOD = 2, |
---|
| 73 | TIMER_RESETIRQ = 3, |
---|
| 74 | /**/ |
---|
| 75 | TIMER_SPAN = 4, |
---|
| 76 | }; |
---|
| 77 | |
---|
| 78 | /* TTY */ |
---|
| 79 | enum TTY_registers { |
---|
| 80 | TTY_WRITE = 0, |
---|
| 81 | TTY_STATUS = 1, |
---|
| 82 | TTY_READ = 2, |
---|
| 83 | TTY_CONFIG = 3, |
---|
| 84 | /**/ |
---|
| 85 | TTY_SPAN = 4, |
---|
| 86 | }; |
---|
| 87 | |
---|
| 88 | #endif |
---|
| 89 | |
---|
Note: See
TracBrowser
for help on using the repository browser.