tioce_provider.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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) 2003-2005 Silicon Graphics, Inc. All rights reserved.
  7. */
  8. #ifndef _ASM_IA64_SN_CE_PROVIDER_H
  9. #define _ASM_IA64_SN_CE_PROVIDER_H
  10. #include <asm/sn/pcibus_provider_defs.h>
  11. #include <asm/sn/tioce.h>
  12. /*
  13. * Common TIOCE structure shared between the prom and kernel
  14. *
  15. * DO NOT CHANGE THIS STRUCT WITHOUT MAKING CORRESPONDING CHANGES TO THE
  16. * PROM VERSION.
  17. */
  18. struct tioce_common {
  19. struct pcibus_bussoft ce_pcibus; /* common pciio header */
  20. uint32_t ce_rev;
  21. uint64_t ce_kernel_private;
  22. uint64_t ce_prom_private;
  23. };
  24. struct tioce_kernel {
  25. struct tioce_common *ce_common;
  26. spinlock_t ce_lock;
  27. struct list_head ce_dmamap_list;
  28. uint64_t ce_ate40_shadow[TIOCE_NUM_M40_ATES];
  29. uint64_t ce_ate3240_shadow[TIOCE_NUM_M3240_ATES];
  30. uint32_t ce_ate3240_pagesize;
  31. uint8_t ce_port1_secondary;
  32. /* per-port resources */
  33. struct {
  34. int dirmap_refcnt;
  35. uint64_t dirmap_shadow;
  36. } ce_port[TIOCE_NUM_PORTS];
  37. };
  38. struct tioce_dmamap {
  39. struct list_head ce_dmamap_list; /* headed by tioce_kernel */
  40. uint32_t refcnt;
  41. uint64_t nbytes; /* # bytes mapped */
  42. uint64_t ct_start; /* coretalk start address */
  43. uint64_t pci_start; /* bus start address */
  44. uint64_t *ate_hw; /* hw ptr of first ate in map */
  45. uint64_t *ate_shadow; /* shadow ptr of firat ate */
  46. uint16_t ate_count; /* # ate's in the map */
  47. };
  48. extern int tioce_init_provider(void);
  49. #endif /* __ASM_IA64_SN_CE_PROVIDER_H */