xwidgetdev.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
  7. */
  8. #ifndef _ASM_IA64_SN_XTALK_XWIDGET_H
  9. #define _ASM_IA64_SN_XTALK_XWIDGET_H
  10. /* WIDGET_ID */
  11. #define WIDGET_REV_NUM 0xf0000000
  12. #define WIDGET_PART_NUM 0x0ffff000
  13. #define WIDGET_MFG_NUM 0x00000ffe
  14. #define WIDGET_REV_NUM_SHFT 28
  15. #define WIDGET_PART_NUM_SHFT 12
  16. #define WIDGET_MFG_NUM_SHFT 1
  17. #define XWIDGET_PART_NUM(widgetid) (((widgetid) & WIDGET_PART_NUM) >> WIDGET_PART_NUM_SHFT)
  18. #define XWIDGET_REV_NUM(widgetid) (((widgetid) & WIDGET_REV_NUM) >> WIDGET_REV_NUM_SHFT)
  19. #define XWIDGET_MFG_NUM(widgetid) (((widgetid) & WIDGET_MFG_NUM) >> WIDGET_MFG_NUM_SHFT)
  20. #define XWIDGET_PART_REV_NUM(widgetid) ((XWIDGET_PART_NUM(widgetid) << 4) | \
  21. XWIDGET_REV_NUM(widgetid))
  22. #define XWIDGET_PART_REV_NUM_REV(partrev) (partrev & 0xf)
  23. /* widget configuration registers */
  24. struct widget_cfg{
  25. u32 w_id; /* 0x04 */
  26. u32 w_pad_0; /* 0x00 */
  27. u32 w_status; /* 0x0c */
  28. u32 w_pad_1; /* 0x08 */
  29. u32 w_err_upper_addr; /* 0x14 */
  30. u32 w_pad_2; /* 0x10 */
  31. u32 w_err_lower_addr; /* 0x1c */
  32. u32 w_pad_3; /* 0x18 */
  33. u32 w_control; /* 0x24 */
  34. u32 w_pad_4; /* 0x20 */
  35. u32 w_req_timeout; /* 0x2c */
  36. u32 w_pad_5; /* 0x28 */
  37. u32 w_intdest_upper_addr; /* 0x34 */
  38. u32 w_pad_6; /* 0x30 */
  39. u32 w_intdest_lower_addr; /* 0x3c */
  40. u32 w_pad_7; /* 0x38 */
  41. u32 w_err_cmd_word; /* 0x44 */
  42. u32 w_pad_8; /* 0x40 */
  43. u32 w_llp_cfg; /* 0x4c */
  44. u32 w_pad_9; /* 0x48 */
  45. u32 w_tflush; /* 0x54 */
  46. u32 w_pad_10; /* 0x50 */
  47. };
  48. /*
  49. * Crosstalk Widget Hardware Identification, as defined in the Crosstalk spec.
  50. */
  51. struct xwidget_hwid{
  52. int mfg_num;
  53. int rev_num;
  54. int part_num;
  55. };
  56. struct xwidget_info{
  57. struct xwidget_hwid xwi_hwid; /* Widget Identification */
  58. char xwi_masterxid; /* Hub's Widget Port Number */
  59. void *xwi_hubinfo; /* Hub's provider private info */
  60. u64 *xwi_hub_provider; /* prom provider functions */
  61. void *xwi_vertex;
  62. };
  63. #endif /* _ASM_IA64_SN_XTALK_XWIDGET_H */