Start on XHCI struct
This commit is contained in:
parent
238659e94b
commit
37814b4f86
@ -5,6 +5,7 @@ import hulk.klog;
|
|||||||
import hulk.hurl;
|
import hulk.hurl;
|
||||||
import hulk.hurl.a1;
|
import hulk.hurl.a1;
|
||||||
import hulk.range;
|
import hulk.range;
|
||||||
|
import hulk.usb.xhci;
|
||||||
|
|
||||||
struct Pci
|
struct Pci
|
||||||
{
|
{
|
||||||
@ -125,6 +126,35 @@ struct Pci
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void spawn_device_instance()
|
||||||
|
{
|
||||||
|
switch (class_id)
|
||||||
|
{
|
||||||
|
case SerialBusController.ID:
|
||||||
|
switch (subclass_id)
|
||||||
|
{
|
||||||
|
case SerialBusController.USBController.ID:
|
||||||
|
switch (if_id)
|
||||||
|
{
|
||||||
|
case SerialBusController.USBController.XHCIController.ID:
|
||||||
|
XHCI.build(&this);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SerialBusController
|
struct SerialBusController
|
||||||
|
20
src/hulk/usb/xhci.d
Normal file
20
src/hulk/usb/xhci.d
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
module hulk.usb.xhci;
|
||||||
|
|
||||||
|
import hulk.pci;
|
||||||
|
import hulk.hurl.a1;
|
||||||
|
|
||||||
|
struct XHCI
|
||||||
|
{
|
||||||
|
void initialize(Pci.Device * pci_device)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void build(Pci.Device * pci_device)
|
||||||
|
{
|
||||||
|
if (pci_device.memory_ranges[0].address != null)
|
||||||
|
{
|
||||||
|
XHCI * xhci = A1.allocate!XHCI();
|
||||||
|
xhci.initialize(pci_device);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user