From 67f797abf232c1395fa54c72984158cea97d2e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 22 Feb 2022 15:53:08 +0100 Subject: [PATCH] pc: enable UHCI driver in usb_host Fix genodelabs/genode#4438 --- repos/pc/lib/import/import-pc_lx_emul.mk | 1 + repos/pc/src/drivers/usb_host/pc/dep.list | 5 +++++ .../src/drivers/usb_host/pc/generated_dummies.c | 15 +++++++-------- .../drivers/usb_host/pc/lx_emul/initcall_order.h | 4 ++-- .../drivers/usb_host/pc/spec/x86_32/source.list | 1 + .../src/drivers/usb_host/pc/spec/x86_64/dep.list | 2 ++ .../drivers/usb_host/pc/spec/x86_64/source.list | 1 + repos/pc/src/pc_linux/target.inc | 1 + 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/repos/pc/lib/import/import-pc_lx_emul.mk b/repos/pc/lib/import/import-pc_lx_emul.mk index 6e7d071a9c..88c2d0aa82 100644 --- a/repos/pc/lib/import/import-pc_lx_emul.mk +++ b/repos/pc/lib/import/import-pc_lx_emul.mk @@ -28,6 +28,7 @@ SRC_CC += lx_emul/debug.cc SRC_CC += lx_emul/init.cc SRC_CC += lx_emul/pci_init.cc SRC_CC += lx_emul/io_mem.cc +SRC_CC += lx_emul/io_port.cc SRC_CC += lx_emul/irq.cc SRC_CC += lx_emul/log.cc SRC_CC += lx_emul/page_virt.cc diff --git a/repos/pc/src/drivers/usb_host/pc/dep.list b/repos/pc/src/drivers/usb_host/pc/dep.list index a5a33b5e1e..32f97cb2e9 100644 --- a/repos/pc/src/drivers/usb_host/pc/dep.list +++ b/repos/pc/src/drivers/usb_host/pc/dep.list @@ -155,6 +155,11 @@ drivers/usb/host/ohci-mem.c drivers/usb/host/ohci-q.c drivers/usb/host/ohci.h drivers/usb/host/pci-quirks.h +drivers/usb/host/uhci-debug.c +drivers/usb/host/uhci-hcd.h +drivers/usb/host/uhci-hub.c +drivers/usb/host/uhci-pci.c +drivers/usb/host/uhci-q.c drivers/usb/host/xhci-dbgcap.h drivers/usb/host/xhci-debugfs.h drivers/usb/host/xhci-ext-caps.h diff --git a/repos/pc/src/drivers/usb_host/pc/generated_dummies.c b/repos/pc/src/drivers/usb_host/pc/generated_dummies.c index 807fc8d670..b69ed879e9 100644 --- a/repos/pc/src/drivers/usb_host/pc/generated_dummies.c +++ b/repos/pc/src/drivers/usb_host/pc/generated_dummies.c @@ -325,14 +325,6 @@ int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * e } -#include - -void memcpy_fromio(void * to,const volatile void __iomem * from,size_t n) -{ - lx_emul_trace_and_stop(__func__); -} - - #include unsigned long long memparse(const char * ptr,char ** retptr) @@ -676,3 +668,10 @@ void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task) lx_emul_trace_and_stop(__func__); } + +#include + +void kmem_cache_destroy(struct kmem_cache * s) +{ + lx_emul_trace_and_stop(__func__); +} diff --git a/repos/pc/src/drivers/usb_host/pc/lx_emul/initcall_order.h b/repos/pc/src/drivers/usb_host/pc/lx_emul/initcall_order.h index b717d64148..d62a44db38 100644 --- a/repos/pc/src/drivers/usb_host/pc/lx_emul/initcall_order.h +++ b/repos/pc/src/drivers/usb_host/pc/lx_emul/initcall_order.h @@ -1,7 +1,7 @@ /* * \brief Array defining order of Linux Kernel initcalls * \author Automatically generated file - do no edit - * \date 2022-01-13 + * \date 2022-02-21 */ #pragma once @@ -58,7 +58,6 @@ static const char * lx_emul_initcall_order[] = { "__initcall_init_reserve_notifier4", "__initcall_pci_slot_init4", "__initcall_misc_init4", - "__initcall_vga_arb_device_init4", "__initcall_usb_common_init4", "__initcall_usb_init4", "__initcall_serio_init4", @@ -135,6 +134,7 @@ static const char * lx_emul_initcall_order[] = { "__initcall_ehci_pci_init6", "__initcall_ohci_hcd_mod_init6", "__initcall_ohci_pci_init6", + "__initcall_uhci_hcd_init6", "__initcall_xhci_hcd_init6", "__initcall_xhci_pci_init6", "__initcall_i8042_init6", diff --git a/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list b/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list index 75a584da51..469346ad9a 100644 --- a/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list +++ b/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list @@ -47,6 +47,7 @@ drivers/usb/host/ehci-pci.c drivers/usb/host/ohci-hcd.c drivers/usb/host/ohci-pci.c drivers/usb/host/pci-quirks.c +drivers/usb/host/uhci-hcd.c drivers/usb/host/xhci-dbg.c drivers/usb/host/xhci-ext-caps.c drivers/usb/host/xhci-hub.c diff --git a/repos/pc/src/drivers/usb_host/pc/spec/x86_64/dep.list b/repos/pc/src/drivers/usb_host/pc/spec/x86_64/dep.list index 004bc68b90..8e4bef14dc 100644 --- a/repos/pc/src/drivers/usb_host/pc/spec/x86_64/dep.list +++ b/repos/pc/src/drivers/usb_host/pc/spec/x86_64/dep.list @@ -12,3 +12,5 @@ arch/x86/include/asm/user_64.h arch/x86/include/uapi/asm/posix_types_64.h arch/x86/include/uapi/asm/vsyscall.h include/asm-generic/div64.h +kernel/irq/irqdomain.c +kernel/time/tick-broadcast.c diff --git a/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list b/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list index 9d98939d7d..e0cf20fc7c 100644 --- a/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list +++ b/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list @@ -47,6 +47,7 @@ drivers/usb/host/ehci-pci.c drivers/usb/host/ohci-hcd.c drivers/usb/host/ohci-pci.c drivers/usb/host/pci-quirks.c +drivers/usb/host/uhci-hcd.c drivers/usb/host/xhci-dbg.c drivers/usb/host/xhci-ext-caps.c drivers/usb/host/xhci-hub.c diff --git a/repos/pc/src/pc_linux/target.inc b/repos/pc/src/pc_linux/target.inc index 538f513412..3a3fa31e66 100644 --- a/repos/pc/src/pc_linux/target.inc +++ b/repos/pc/src/pc_linux/target.inc @@ -16,6 +16,7 @@ LX_ENABLE += PCI # USB host-controller support LX_ENABLE += USB_SUPPORT USB USB_ARCH_HAS_HCD USB_XHCI_HCD USB_EHCI_HCD USB_OHCI_HCD +LX_ENABLE += USB_PCI USB_UHCI_HCD # mandatory fs support LX_ENABLE += PROC_FS SYSFS