summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
authorAnton Kochkov <anton.kochkov@gmail.com>2012-06-28 08:30:15 +0400
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-08-23 07:05:02 +0200
commit1c36eada27697e1feafda6db162f7d4854b64ff6 (patch)
tree7eb4e6256ef3d484dda78e28196d4ae547c149f6 /payloads/libpayload/drivers
parent79b0574698f34abbb4a7924d4e40ea2b2b2cecf3 (diff)
libpayload: add controller type in usbdev_hc
Add controller type (UHCI, OHCI, EHCI or XHCI) into usbdev_hc (hci_t) struct, so now we know which type selected controller have. It needed to access controller specific data, if access usb tree outside of libpayload (e.g. in payload intself) Change-Id: I7df947bbb56a50d0d792ccd4d3a6b021ee95e2ea Signed-off-by: Anton Kochkov <anton.kochkov@gmail.com> Reviewed-on: http://review.coreboot.org/1145 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/usb/ehci.c2
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c2
-rw-r--r--payloads/libpayload/drivers/usb/uhci.c2
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index 8d84f8dd60..4d0a209977 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -635,6 +635,8 @@ ehci_init (pcidev_t addr)
pci_command = (pci_command | PCI_COMMAND_MEMORY) & ~PCI_COMMAND_IO ;
pci_write_config32(addr, PCI_COMMAND, pci_command);
+ controller->type = EHCI;
+
controller->start = ehci_start;
controller->stop = ehci_stop;
controller->reset = ehci_reset;
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 2cfabb4d4d..570851559e 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -102,6 +102,8 @@ ohci_init (pcidev_t addr)
if(!controller->instance)
fatal("Not enough memory creating USB controller instance.\n");
+ controller->type = OHCI;
+
controller->start = ohci_start;
controller->stop = ohci_stop;
controller->reset = ohci_reset;
diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c
index 78f7aba2dc..84b461a466 100644
--- a/payloads/libpayload/drivers/usb/uhci.c
+++ b/payloads/libpayload/drivers/usb/uhci.c
@@ -147,6 +147,8 @@ uhci_init (pcidev_t addr)
if(!controller->instance)
fatal("Not enough memory creating USB controller instance.\n");
+ controller->type = UHCI;
+
controller->start = uhci_start;
controller->stop = uhci_stop;
controller->reset = uhci_reset;
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index a25cf403a0..828e0eaec7 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -63,6 +63,8 @@ xhci_init (pcidev_t addr)
if(!controller->instance)
fatal("Not enough memory creating USB controller instance.\n");
+ controller->type = XHCI;
+
controller->start = xhci_start;
controller->stop = xhci_stop;
controller->reset = xhci_reset;