proc have_platform_drv {} { return [expr [have_board pc]] } ## # Return name of the USB driver binary # proc usb_host_drv_binary { } { if {[have_board rpi]} { return rpi_usb_host_drv } if {[have_board imx6q_sabrelite]} { return imx6q_sabrelite_usb_host_drv } if {[have_board pc]} { return x86_pc_usb_host_drv } return no_usb_drv_available } ## # Return name of the audio driver binary # proc audio_drv_binary { } { if {[have_board linux]} { return linux_audio_drv } if {[have_board pc]} { return pci_audio_drv } return no_audio_drv_available } ## # Return attributes of the audio driver's node # proc audio_drv_start_attr { } { if {[have_board linux]} { return {ld="no"} } return "" } proc acpi_drv_name { } { global use_acpica_as_acpi_drv if {[info exists use_acpica_as_acpi_drv] && $use_acpica_as_acpi_drv} { return acpica } return acpi_drv } proc platform_drv_build_components {} { set drv_build_components "" lappend_if [have_platform_drv] drv_build_components drivers/platform if {[have_board pc]} { lappend drv_build_components server/report_rom if {[acpi_drv_name] eq "acpi_drv"} { lappend drv_build_components drivers/acpi } if {[acpi_drv_name] eq "acpica"} { lappend drv_build_components app/acpica } } return $drv_build_components } proc append_platform_drv_build_components {} { global build_components append build_components { } [platform_drv_build_components] } proc platform_drv_binary {} { if {[have_board pc]} { return legacy_pc_platform_drv } return no_platform_drv_available } proc platform_drv_boot_modules {} { set drv_boot_modules "" lappend_if [have_platform_drv] drv_boot_modules [platform_drv_binary] if {[have_board pc]} { lappend drv_boot_modules report_rom lappend drv_boot_modules [acpi_drv_name] } return $drv_boot_modules } proc append_platform_drv_boot_modules {} { global boot_modules append boot_modules { } [platform_drv_boot_modules] } proc platform_drv_policy {} { if {![have_board pc]} { return {} } set drv_policy "" if {[acpi_drv_name] eq "acpica"} { append drv_policy { } } append drv_policy { } return $drv_policy } proc platform_drv_priority {} { return "" } proc platform_drv_add_routing {} { if {[acpi_drv_name] eq "acpica"} { return { } } return "" } proc platform_drv_config_config {} { if {[acpi_drv_name] eq "acpica"} { return { } } return {} } proc platform_drv_config {} { set drv_config "" if {[have_board pc]} { append drv_config { } if {[acpi_drv_name] eq "acpica"} { append drv_config { } } else { append drv_config { } } append drv_config { } append_if [expr {[acpi_drv_name] eq "acpica"}] drv_config { } append drv_config { } append drv_config " " append drv_config { } append_if [expr {[acpi_drv_name] eq "acpica"}] drv_config { } append drv_config { } } if {[have_platform_drv]} { append drv_config { } append_if [have_board pc] drv_config { } append_if [have_spec arm] drv_config { } append drv_config { } append drv_config "[platform_drv_add_routing]" append_if [have_board pc] drv_config { } append_if [expr [have_board pc]] drv_config { } append_if [expr [have_board rpi] || [have_board pc]] drv_config { } append drv_config { } append drv_config [platform_drv_config_config] append drv_config [platform_drv_policy] append drv_config { } } return $drv_config } proc append_platform_drv_config {} { global config append config [platform_drv_config] return $config }