Changeset 95c675b in mainline for uspace/drv/bus/adb/cuda_adb/cuda_hw.h
- Timestamp:
- 2017-10-17T13:11:35Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 60af4cdb
- Parents:
- dbf32b1 (diff), a416d070 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
uspace/drv/bus/adb/cuda_adb/cuda_hw.h (moved) (moved from uspace/srv/hw/bus/cuda_adb/cuda_adb.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/adb/cuda_adb/cuda_hw.h
rdbf32b1 r95c675b 34 34 */ 35 35 36 #ifndef CUDA_ ADB_H_37 #define CUDA_ ADB_H_36 #ifndef CUDA_HW_H_ 37 #define CUDA_HW_H_ 38 38 39 #include <stddef.h>40 39 #include <stdint.h> 41 #include <async.h>42 #include <fibril_synch.h>43 40 44 typedef struct {41 typedef struct cuda_regs { 45 42 uint8_t b; 46 43 uint8_t pad0[0x1ff]; … … 90 87 uint8_t anh; 91 88 uint8_t pad15[0x1ff]; 92 } cuda_t; 89 } cuda_regs_t; 90 91 /** B register fields */ 92 enum { 93 TREQ = 0x08, 94 TACK = 0x10, 95 TIP = 0x20 96 }; 97 98 /** IER register fields */ 99 enum { 100 IER_CLR = 0x00, 101 IER_SET = 0x80, 102 103 SR_INT = 0x04, 104 ALL_INT = 0x7f 105 }; 106 107 /** ACR register fields */ 108 enum { 109 SR_OUT = 0x10 110 }; 111 112 /** Packet types */ 113 enum { 114 PT_ADB = 0x00, 115 PT_CUDA = 0x01 116 }; 117 118 /** CUDA packet types */ 119 enum { 120 CPT_AUTOPOLL = 0x01 121 }; 93 122 94 123 enum { 95 CUDA_RCV_BUF_SIZE = 5124 ADB_MAX_ADDR = 16 96 125 }; 97 98 enum cuda_xfer_state {99 cx_listen,100 cx_receive,101 cx_rcv_end,102 cx_send_start,103 cx_send104 };105 106 typedef struct {107 service_id_t service_id;108 async_sess_t *client_sess;109 } adb_dev_t;110 111 typedef struct {112 cuda_t *cuda;113 uintptr_t cuda_physical;114 115 uint8_t rcv_buf[CUDA_RCV_BUF_SIZE];116 uint8_t snd_buf[CUDA_RCV_BUF_SIZE];117 size_t bidx;118 size_t snd_bytes;119 enum cuda_xfer_state xstate;120 fibril_mutex_t dev_lock;121 } cuda_instance_t;122 126 123 127 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
