Enable detection of keyboards attached to a UHCI controller.

This commit is contained in:
Martin Whitaker 2022-04-07 18:05:45 +01:00
parent 08bbac1065
commit 4761b782dd
4 changed files with 4 additions and 3 deletions

View File

@ -23,6 +23,7 @@ SYS_OBJS = system/cpuid.o \
system/smbus.o \ system/smbus.o \
system/smp.o \ system/smp.o \
system/temperature.o \ system/temperature.o \
system/uhci.o \
system/usbhcd.o \ system/usbhcd.o \
system/vmem.o \ system/vmem.o \
system/xhci.o system/xhci.o

View File

@ -23,6 +23,7 @@ SYS_OBJS = system/cpuid.o \
system/smbus.o \ system/smbus.o \
system/smp.o \ system/smp.o \
system/temperature.o \ system/temperature.o \
system/uhci.o \
system/usbhcd.o \ system/usbhcd.o \
system/vmem.o \ system/vmem.o \
system/xhci.o system/xhci.o

View File

@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2021-2022 Martin Whitaker. // Copyright (C) 2021-2022 Martin Whitaker.
// NOTE: This is currently untested and very unlikely to work out of the box.
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>

View File

@ -10,6 +10,7 @@
#include "ehci.h" #include "ehci.h"
#include "ohci.h" #include "ohci.h"
#include "uhci.h"
#include "xhci.h" #include "xhci.h"
#include "print.h" #include "print.h"
@ -660,7 +661,7 @@ static void probe_usb_controller(int bus, int dev, int func, hci_type_t controll
// Initialise the device according to its type. // Initialise the device according to its type.
bool keyboards_found = false; bool keyboards_found = false;
if (controller_type == UHCI) { if (controller_type == UHCI) {
print_usb_info(" This controller type is not supported yet"); keyboards_found = uhci_init(base_addr, &usb_controllers[num_usb_controllers]);
} }
if (controller_type == OHCI) { if (controller_type == OHCI) {
keyboards_found = ohci_init(base_addr, &usb_controllers[num_usb_controllers]); keyboards_found = ohci_init(base_addr, &usb_controllers[num_usb_controllers]);