hubdev.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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-2004 Silicon Graphics, Inc. All rights reserved.
  7. */
  8. #ifndef _ASM_IA64_SN_XTALK_HUBDEV_H
  9. #define _ASM_IA64_SN_XTALK_HUBDEV_H
  10. #define HUB_WIDGET_ID_MAX 0xf
  11. #define DEV_PER_WIDGET (2*2*8)
  12. #define IIO_ITTE_WIDGET_BITS 4 /* size of widget field */
  13. #define IIO_ITTE_WIDGET_MASK ((1<<IIO_ITTE_WIDGET_BITS)-1)
  14. #define IIO_ITTE_WIDGET_SHIFT 8
  15. /*
  16. * Use the top big window as a surrogate for the first small window
  17. */
  18. #define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW
  19. #define IIO_NUM_ITTES 7
  20. #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)
  21. struct sn_flush_device_list {
  22. int sfdl_bus;
  23. int sfdl_slot;
  24. int sfdl_pin;
  25. struct bar_list {
  26. unsigned long start;
  27. unsigned long end;
  28. } sfdl_bar_list[6];
  29. unsigned long sfdl_force_int_addr;
  30. unsigned long sfdl_flush_value;
  31. volatile unsigned long *sfdl_flush_addr;
  32. uint64_t sfdl_persistent_busnum;
  33. struct pcibus_info *sfdl_pcibus_info;
  34. spinlock_t sfdl_flush_lock;
  35. };
  36. /*
  37. * **widget_p - Used as an array[wid_num][device] of sn_flush_device_list.
  38. */
  39. struct sn_flush_nasid_entry {
  40. struct sn_flush_device_list **widget_p; /* Used as a array of wid_num */
  41. uint64_t iio_itte[8];
  42. };
  43. struct hubdev_info {
  44. geoid_t hdi_geoid;
  45. short hdi_nasid;
  46. short hdi_peer_nasid; /* Dual Porting Peer */
  47. struct sn_flush_nasid_entry hdi_flush_nasid_list;
  48. struct xwidget_info hdi_xwidget_info[HUB_WIDGET_ID_MAX + 1];
  49. void *hdi_nodepda;
  50. void *hdi_node_vertex;
  51. void *hdi_xtalk_vertex;
  52. };
  53. extern void hubdev_init_node(nodepda_t *, cnodeid_t);
  54. extern void hub_error_init(struct hubdev_info *);
  55. extern void ice_error_init(struct hubdev_info *);
  56. #endif /* _ASM_IA64_SN_XTALK_HUBDEV_H */