csr.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. #ifndef _IEEE1394_CSR_H
  2. #define _IEEE1394_CSR_H
  3. #define CSR_REGISTER_BASE  0xfffff0000000ULL
  4. /* register offsets relative to CSR_REGISTER_BASE */
  5. #define CSR_STATE_CLEAR           0x0
  6. #define CSR_STATE_SET             0x4
  7. #define CSR_NODE_IDS              0x8
  8. #define CSR_RESET_START           0xc
  9. #define CSR_SPLIT_TIMEOUT_HI      0x18
  10. #define CSR_SPLIT_TIMEOUT_LO      0x1c
  11. #define CSR_CYCLE_TIME            0x200
  12. #define CSR_BUS_TIME              0x204
  13. #define CSR_BUSY_TIMEOUT          0x210
  14. #define CSR_BUS_MANAGER_ID        0x21c
  15. #define CSR_BANDWIDTH_AVAILABLE   0x220
  16. #define CSR_CHANNELS_AVAILABLE_HI 0x224
  17. #define CSR_CHANNELS_AVAILABLE_LO 0x228
  18. #define CSR_CONFIG_ROM            0x400
  19. #define CSR_CONFIG_ROM_END        0x800
  20. #define CSR_FCP_COMMAND           0xB00
  21. #define CSR_FCP_RESPONSE          0xD00
  22. #define CSR_FCP_END               0xF00
  23. #define CSR_TOPOLOGY_MAP          0x1000
  24. #define CSR_TOPOLOGY_MAP_END      0x1400
  25. #define CSR_SPEED_MAP             0x2000
  26. #define CSR_SPEED_MAP_END         0x3000
  27. struct csr_control {
  28.         spinlock_t lock;
  29.         quadlet_t state;
  30.         quadlet_t node_ids;
  31.         quadlet_t split_timeout_hi, split_timeout_lo;
  32.         quadlet_t cycle_time;
  33.         quadlet_t bus_time;
  34.         quadlet_t bus_manager_id;
  35.         quadlet_t bandwidth_available;
  36.         quadlet_t channels_available_hi, channels_available_lo;
  37.         const quadlet_t *rom;
  38.         size_t rom_size;
  39.         quadlet_t topology_map[256];
  40.         quadlet_t speed_map[1024];
  41. };
  42. void init_csr(void);
  43. void cleanup_csr(void);
  44. #endif /* _IEEE1394_CSR_H */