iPIIX4.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:3k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* iPIIX4.h - 82371AB PCI ISA IDE Xcelerator (PIIX4) header */
  2. /*
  3. modification history
  4. --------------------
  5. 01a,17oct01,dmh  written.
  6. */
  7. /*
  8. This file contains IO address and related constants for the
  9. PIIX4 (PCI to ISA/IDE bridge).  Use this instead of iPiix4Pci.h.
  10. */
  11. #ifndef _iPIIX4_h
  12. #define _iPIIX4_h
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif /* __cplusplus */
  16. /* defines */
  17.     
  18. /* PCI to ISA/IDE bridge */
  19. #define IPIIX4_PCI_VENID         0x8086   /* PCI config spec for PIIX4 device */
  20.   
  21. #define IPIIX4_PCI_DEV0          0x7110                    
  22. #define IPIIX4_PCI_DEV1          0x7111
  23. #define IPIIX4_PCI_DEV2          0x7112              
  24. #define IPIIX4_PCI_DEV3          0x7113
  25. #define IPIIX4_PCI_FUNC0         0x0
  26. #define IPIIX4_PCI_FUNC1         0x1              
  27. #define IPIIX4_PCI_FUNC2         0x2
  28. #define IPIIX4_PCI_FUNC3         0x3  
  29. #define IPIIX4_PCI_INST0         0x0
  30. #define IPIIX4_PCI_NOIDX         -1
  31. #define IPIIX4_PCI_NOINT         0xFF
  32. #define IPIIX4_PCI_XINT_MAX      0x4      /* Max # of interrupt to route */
  33. /* PIRQ[A:D]- Suggested interrupt routing and not absolutely required */
  34. #define IPIIX4_PCI_XINT1_LVL     0x9
  35. #define IPIIX4_PCI_XINT2_LVL     0xA
  36. #define IPIIX4_PCI_XINT3_LVL     0xB
  37. #define IPIIX4_PCI_XINT4_LVL     0xC
  38.     
  39. #define IPIIX4_PCI_DEVRESD       0x50      /* PCI based PIIX4 registers */
  40. #define IPIIX4_PCI_DEVRESA       0x5C
  41. #define IPIIX4_PCI_DEVRESB       0x60
  42. #define IPIIX4_PCI_PCICMD        0x04
  43. #define IPIIX4_PCI_MLT           0x0D
  44. #define IPIIX4_PCI_BMIBA         0x20
  45. #define IPIIX4_PCI_IDETIM        0x40
  46. #define IPIIX4_PCI_PIRQRCA       0x60
  47. #define IPIIX4_PCI_PIRQRCB       0x61
  48. #define IPIIX4_PCI_PIRQRCC       0x62
  49. #define IPIIX4_PCI_PIRQRCD       0x63          
  50. #define IPIIX4_PCI_ELCR1         0x4D0
  51. #define IPIIX4_PCI_ELCR2         0x4D1          
  52.           
  53. #define IPIIX4_PCI_IRQ1ENDEV11   0x0800          /* bit #19 - DEVRESD */
  54. #define IPIIX4_PCI_RESENDEV5     0x08            /* bit #11 - DEVRESD */          
  55. #define IPIIX4_PCI_KBCENDEV11    0x10000000      /* bit #28 - DEVRESA */
  56. #define IPIIX4_PCI_KBCEIOEN      0x40000000      /* bit #30 - DEVRESB */
  57. #define IPIIX4_PCI_PCICMD_BME    0x04            /* bit #2  - PCICMD  */
  58. #define IPIIX4_PCI_PCICMD_IOSE   0x01            /* bit #0  - PCICMD  */
  59. #define IPIIX4_PCI_MLT_MLTCV     0x40            /* bit [7:4] - MLT   */
  60. #define IPIIX4_PCI_BMIBA_RTE     0x1             /* bit #0  - BMIBA   */
  61. #define IPIIX4_PCI_IDETIM_VAL    0xa307a307      /* Pri + Sec Chans   */
  62. #define IPIIX4_PCI_FD_DCM               0xD6     /* DMA Channel Mode Register */
  63. #define IPIIX4_PCI_FD_RWAMB             0xDE     /* Read/Write All Mask Bits */
  64. #define IPIIX4_PCI_FD_DCM_CASCADE       0xC0     /* bits [7:6] of DCM */
  65. #define IPIIX4_PCI_FD_DCM_AUTOINIT      0x10     /* bit [4] of DCM */    
  66. #define IPIIX4_PCI_FD_RWAMB_MASKALL     0x00
  67. /* function declarations */
  68. extern STATUS iPIIX4Init ();
  69. extern STATUS iPIIX4FdInit ();
  70. extern STATUS iPIIX4KbdInit ();
  71. extern STATUS iPIIX4AtaInit ();
  72. extern STATUS iPIIX4IntrRoute (int pintx, char irq);
  73. extern char   iPIIX4GetIntr (int pintx);
  74. #ifdef __cplusplus
  75. }
  76. #endif /* __cplusplus */
  77. #endif /* _iPIIX4_h */