Modules/AHCI - Init almost complete, connection detect works
[tpg/acess2.git] / KernelLand / Modules / Storage / AHCI / ahci.h
1 /*
2  * Acess2 Kernel - AHCI Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * ahci.h
6  * - Driver header
7  */
8 #ifndef _AHCI__AHCI_H_
9 #define _AHCI__AHCI_H_
10
11 #include "ahci_hw.h"
12 #include <Storage/LVM/include/lvm.h>
13 #include <stdbool.h>
14 #include <semaphore.h>
15
16 typedef struct sAHCI_Ctrlr      tAHCI_Ctrlr;
17 typedef struct sAHCI_Port       tAHCI_Port;
18
19 struct sAHCI_Ctrlr
20 {
21          int    IRQ;
22         tPAddr  PMemBase;
23         tAHCI_MemSpace  *MMIO;
24
25          int    NCS;
26         
27          int    PortCount;
28         tAHCI_Port      *Ports;
29 };
30
31 struct sAHCI_Port
32 {
33          int    Idx;    // Hardware index
34         volatile struct s_port  *MMIO;
35         bool    bHotplug;
36         bool    bPresent;
37
38         tSemaphore      CommandListSem;
39         volatile struct sAHCI_CmdHdr    *CmdList;       
40
41         volatile struct sAHCI_RcvdFIS   *RcvdFIS;       
42
43         void    *LVMHandle;
44 };
45
46 #endif
47

UCC git Repository :: git.ucc.asn.au