Changes in uspace/drv/block/ahci/ahci_hw.h [eb3683a:ae3ff9f5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ahci/ahci_hw.h
reb3683a rae3ff9f5 374 374 } ahci_ghc_ghc_t; 375 375 376 /** AHCI GHC register offset. */ 377 #define AHCI_GHC_GHC_REGISTER_OFFSET 1 378 376 379 /** AHCI Enable mask bit. */ 377 380 #define AHCI_GHC_GHC_AE 0x80000000 … … 381 384 382 385 /** AHCI Memory register Interrupt pending register. */ 383 typedef uint32_t ahci_ghc_is_t; 386 typedef struct { 387 /** Interrupt pending status, if set, indicates that 388 * the corresponding port has an interrupt pending. 389 */ 390 uint32_t u32; 391 } ahci_ghc_is_t; 384 392 385 393 /** AHCI GHC register offset. */ 386 #define AHCI_GHC_IS_REGISTER_OFFSET 2 387 388 /** AHCI ports registers offset. */ 389 #define AHCI_PORTS_REGISTERS_OFFSET 64 390 391 /** AHCI port registers size. */ 392 #define AHCI_PORT_REGISTERS_SIZE 32 393 394 /** AHCI port IS register offset. */ 395 #define AHCI_PORT_IS_REGISTER_OFFSET 4 394 #define AHCI_GHC_IS_REGISTER_OFFSET 2 396 395 397 396 /** AHCI Memory register Ports implemented. */ … … 532 531 uint32_t ghc; 533 532 /** Interrupt Status */ 534 ahci_ghc_is_t is;533 uint32_t is; 535 534 /** Ports Implemented */ 536 535 uint32_t pi; … … 604 603 605 604 /** AHCI Memory register Port x Interrupt Status. */ 606 typedef uint32_t ahci_port_is_t; 605 typedef union { 606 struct { 607 /** Device to Host Register FIS Interrupt. */ 608 unsigned int dhrs : 1; 609 /** PIO Setup FIS Interrupt. */ 610 unsigned int pss : 1; 611 /** DMA Setup FIS Interrupt. */ 612 unsigned int dss : 1; 613 /** Set Device Bits Interrupt. */ 614 unsigned int sdbs : 1; 615 /** Unknown FIS Interrupt. */ 616 unsigned int ufs : 1; 617 /** Descriptor Processed. */ 618 unsigned int dps : 1; 619 /** Port Connect Change Status. */ 620 unsigned int pcs : 1; 621 /** Device Mechanical Presence Status. */ 622 unsigned int dmps : 1; 623 /** Reserved. */ 624 unsigned int reserved1 : 14; 625 /** PhyRdy Change Status. */ 626 unsigned int prcs : 1; 627 /** Incorrect Port Multiplier Status. */ 628 unsigned int ipms : 1; 629 /** Overflow Status. */ 630 unsigned int ofs : 1; 631 /** Reserved. */ 632 unsigned int reserved2 : 1; 633 /** Interface Non-fatal Error Status. */ 634 unsigned int infs : 1; 635 /** Interface Fatal Error Status. */ 636 unsigned int ifs : 1; 637 /** Host Bus Data Error Status. */ 638 unsigned int hbds : 1; 639 /** Host Bus Fatal Error Status. */ 640 unsigned int hbfs : 1; 641 /** Task File Error Status. */ 642 unsigned int tfes : 1; 643 /** Cold Port Detect Status. */ 644 unsigned int cpds : 1; 645 }; 646 uint32_t u32; 647 } ahci_port_is_t; 607 648 608 649 #define AHCI_PORT_IS_DHRS (1 << 0) … … 659 700 static inline int ahci_port_is_end_of_operation(ahci_port_is_t port_is) 660 701 { 661 return port_is & AHCI_PORT_END_OF_OPERATION;702 return port_is.u32 & AHCI_PORT_END_OF_OPERATION; 662 703 } 663 704 … … 671 712 static inline int ahci_port_is_error(ahci_port_is_t port_is) 672 713 { 673 return port_is & AHCI_PORT_IS_ERROR;714 return port_is.u32 & AHCI_PORT_IS_ERROR; 674 715 } 675 716 … … 683 724 static inline int ahci_port_is_permanent_error(ahci_port_is_t port_is) 684 725 { 685 return port_is & AHCI_PORT_IS_PERMANENT_ERROR;726 return port_is.u32 & AHCI_PORT_IS_PERMANENT_ERROR; 686 727 } 687 728 … … 695 736 static inline int ahci_port_is_tfes(ahci_port_is_t port_is) 696 737 { 697 return port_is & AHCI_PORT_IS_TFES;738 return port_is.u32 & AHCI_PORT_IS_TFES; 698 739 } 699 740 … … 953 994 uint32_t pxfbu; 954 995 /** Port x Interrupt Status. */ 955 ahci_port_is_t pxis;996 uint32_t pxis; 956 997 /** Port x Interrupt Enable. */ 957 998 uint32_t pxie; … … 989 1030 ahci_ghc_t ghc; 990 1031 /** Reserved. */ 991 uint32_t reserved[13]; 1032 uint32_t reserved[13]; 992 1033 /** Reserved for NVMHCI. */ 993 1034 uint32_t reservedfornvmhci[16]; … … 995 1036 uint32_t vendorspecificsregs[24]; 996 1037 /** Ports. */ 997 ahci_port_t ports[ AHCI_MAX_PORTS];1038 ahci_port_t ports[32]; 998 1039 } ahci_memregs_t; 999 1040
Note:
See TracChangeset
for help on using the changeset viewer.