Merge branch 'sata-ahci-dev'
[lunaix-os.git] / lunaix-os / includes / hal / ahci / ahci.h
1 #ifndef __LUNAIX_AHCI_H
2 #define __LUNAIX_AHCI_H
3
4 #include "hba.h"
5
6 /*
7  * Macro naming rule:
8  *      HBA_R[xxx]
9  *          HBA Register [xxx]
10  *          e.g. HBA_RPxCLB is Register PxCLB
11  *
12  * All registers offset are 0 based index of a DWORD array
13  */
14
15 #define AHCI_HBA_CLASS 0x10601
16
17 /**
18  * @brief 初始化AHCI与HBA
19  *
20  */
21 void
22 ahci_init();
23
24 void
25 ahci_list_device();
26
27 unsigned int
28 ahci_get_port_usage();
29
30 struct hba_port*
31 ahci_get_port(unsigned int index);
32
33 #endif /* __LUNAIX_AHCI_H */