mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
run/platform_drv.inc: add 'need_usb_hid' function
This function returns the information whether the used platform relies on USB HID for interactive scenarios by default as is the case for most ARM platforms. In contrast, for x86 the USB driver can be omitted because we can use the PS/2 driver (that is readily available in repos/os/).
This commit is contained in:
@@ -10,6 +10,26 @@ proc have_platform_drv {} {
|
||||
|| [have_spec x86]]
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Return 1 if the scenario depends on the USB driver on the used platform
|
||||
#
|
||||
# On most ARM platform, user input is provided by an USB HID device. On other
|
||||
# platforms, the USB driver may be omitted.
|
||||
#
|
||||
proc need_usb_hid { } {
|
||||
|
||||
# covered by fb_sdl
|
||||
if {[have_spec linux]} { return 0 }
|
||||
|
||||
# covered by ps2_drv
|
||||
if {[have_spec x86]} { return 0 }
|
||||
if {[have_spec pbxa9]} { return 0 }
|
||||
|
||||
return [have_spec usb]
|
||||
}
|
||||
|
||||
|
||||
proc append_platform_drv_build_components {} {
|
||||
global build_components
|
||||
|
||||
@@ -19,6 +39,7 @@ proc append_platform_drv_build_components {} {
|
||||
lappend_if [have_spec nova] build_components drivers/platform/spec/x86/device_pd
|
||||
}
|
||||
|
||||
|
||||
proc append_platform_drv_boot_modules {} {
|
||||
global boot_modules
|
||||
|
||||
@@ -29,6 +50,7 @@ proc append_platform_drv_boot_modules {} {
|
||||
lappend_if [have_spec muen] boot_modules acpi
|
||||
}
|
||||
|
||||
|
||||
proc platform_drv_policy {} {
|
||||
|
||||
if ([have_spec x86]) {
|
||||
@@ -50,6 +72,7 @@ proc platform_drv_policy {} {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc platform_drv_priority {} { return "" }
|
||||
proc platform_drv_add_routing {} {
|
||||
if {[have_spec acpi]} {
|
||||
@@ -60,6 +83,7 @@ proc platform_drv_add_routing {} {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
proc platform_drv_config_config {} {
|
||||
if {[have_spec acpi] || [have_spec arm] || [have_spec muen]} {
|
||||
return {
|
||||
@@ -70,6 +94,7 @@ proc platform_drv_config_config {} {
|
||||
<config acpi="no">}
|
||||
}
|
||||
|
||||
|
||||
proc append_platform_drv_config {} {
|
||||
global config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user