tioce_provider.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. u32 ce_rev;
  21. u64 ce_kernel_private;
  22. u64 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. u64 ce_ate40_shadow[TIOCE_NUM_M40_ATES];
  29. u64 ce_ate3240_shadow[TIOCE_NUM_M3240_ATES];
  30. u32 ce_ate3240_pagesize;
  31. u8 ce_port1_secondary;
  32. /* per-port resources */
  33. struct {
  34. int dirmap_refcnt;
  35. u64 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. u32 refcnt;
  41. u64 nbytes; /* # bytes mapped */
  42. u64 ct_start; /* coretalk start address */
  43. u64 pci_start; /* bus start address */
  44. u64 __iomem *ate_hw;/* hw ptr of first ate in map */
  45. u64 *ate_shadow; /* shadow ptr of firat ate */
  46. u16 ate_count; /* # ate's in the map */
  47. };
  48. extern int tioce_init_provider(void);
  49. #endif /* __ASM_IA64_SN_CE_PROVIDER_H */