tioce_provider.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**************************************************************************
  2. * Copyright (C) 2005, Silicon Graphics, Inc. *
  3. * *
  4. * These coded instructions, statements, and computer programs contain *
  5. * unpublished proprietary information of Silicon Graphics, Inc., and *
  6. * are protected by Federal copyright law. They may not be disclosed *
  7. * to third parties or copied or duplicated in any form, in whole or *
  8. * in part, without the prior written consent of Silicon Graphics, Inc. *
  9. * *
  10. **************************************************************************/
  11. #ifndef _ASM_IA64_SN_CE_PROVIDER_H
  12. #define _ASM_IA64_SN_CE_PROVIDER_H
  13. #include <asm/sn/pcibus_provider_defs.h>
  14. #include <asm/sn/tioce.h>
  15. /*
  16. * Common TIOCE structure shared between the prom and kernel
  17. *
  18. * DO NOT CHANGE THIS STRUCT WITHOUT MAKING CORRESPONDING CHANGES TO THE
  19. * PROM VERSION.
  20. */
  21. struct tioce_common {
  22. struct pcibus_bussoft ce_pcibus; /* common pciio header */
  23. uint32_t ce_rev;
  24. uint64_t ce_kernel_private;
  25. uint64_t ce_prom_private;
  26. };
  27. struct tioce_kernel {
  28. struct tioce_common *ce_common;
  29. spinlock_t ce_lock;
  30. struct list_head ce_dmamap_list;
  31. uint64_t ce_ate40_shadow[TIOCE_NUM_M40_ATES];
  32. uint64_t ce_ate3240_shadow[TIOCE_NUM_M3240_ATES];
  33. uint32_t ce_ate3240_pagesize;
  34. uint8_t ce_port1_secondary;
  35. /* per-port resources */
  36. struct {
  37. int dirmap_refcnt;
  38. uint64_t dirmap_shadow;
  39. } ce_port[TIOCE_NUM_PORTS];
  40. };
  41. struct tioce_dmamap {
  42. struct list_head ce_dmamap_list; /* headed by tioce_kernel */
  43. uint32_t refcnt;
  44. uint64_t nbytes; /* # bytes mapped */
  45. uint64_t ct_start; /* coretalk start address */
  46. uint64_t pci_start; /* bus start address */
  47. uint64_t *ate_hw; /* hw ptr of first ate in map */
  48. uint64_t *ate_shadow; /* shadow ptr of firat ate */
  49. uint16_t ate_count; /* # ate's in the map */
  50. };
  51. extern int tioce_init_provider(void);
  52. #endif /* __ASM_IA64_SN_CE_PROVIDER_H */