Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / KernelLand / Modules / Storage / AHCI / ahci.c
1 /*
2 * Acess2 Kernel - AHCI Driver
3 * - By John Hodge (thePowersGang)
4 *
5 * ahci.c
6 */
7 #include <drv_pci.h>
8 #include "ahci.h"
9
10 // === CODE ====
11 int AHCI_Install(char **Arguments)
12 {
13         // 010601/FFFFFF
14         while( (id = PCI_GetDeviceByClass(0x010000, 0xFF0000, id)) >= 0 && i < MAX_CONTROLLERS )
15         {
16                 ctrlr->PMemBase = PCI_GetBAR(id, 5);
17                 if( !ctrlr->PMemBase )
18                 {
19                         // TODO: Allocate space
20                 }
21                 
22                 ctrlr->IRQNum = PCI_GetIRQ(id);
23         }
24         return 0;
25 }

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