2015-05-28 11:43:13 +00:00
|
|
|
proc have_platform_drv {} {
|
2015-06-08 07:05:32 +00:00
|
|
|
if {[have_spec linux]} {
|
|
|
|
return 0
|
|
|
|
}
|
2015-07-08 20:35:22 +00:00
|
|
|
|
2015-09-03 12:55:05 +00:00
|
|
|
return [expr [have_spec arndale] \
|
|
|
|
|| [have_spec imx53] \
|
|
|
|
|| [have_spec rpi] \
|
|
|
|
|| [have_spec odroid_x2] \
|
2015-04-28 12:04:37 +00:00
|
|
|
|| [have_spec x86]]
|
2015-05-28 11:43:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proc append_platform_drv_build_components {} {
|
|
|
|
global build_components
|
|
|
|
|
|
|
|
lappend_if [have_platform_drv] build_components drivers/platform
|
|
|
|
lappend_if [have_spec acpi] build_components drivers/acpi
|
2015-05-26 18:12:17 +00:00
|
|
|
lappend_if [have_spec acpi] build_components server/report_rom
|
2015-09-03 12:55:05 +00:00
|
|
|
lappend_if [have_spec nova] build_components drivers/platform/spec/x86/device_pd
|
2015-05-28 11:43:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proc append_platform_drv_boot_modules {} {
|
|
|
|
global boot_modules
|
|
|
|
|
2017-01-03 12:17:41 +00:00
|
|
|
lappend_if [have_platform_drv] boot_modules platform_drv
|
|
|
|
lappend_if [have_spec acpi] boot_modules acpi_drv
|
|
|
|
lappend_if [have_spec acpi] boot_modules report_rom
|
|
|
|
lappend_if [have_spec nova] boot_modules device_pd
|
|
|
|
lappend_if [have_spec muen] boot_modules acpi
|
2015-05-28 11:43:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proc platform_drv_policy {} {
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
if ([have_spec x86]) {
|
|
|
|
return {
|
2016-11-24 14:28:32 +00:00
|
|
|
<policy label_prefix="ps2_drv"> <device name="PS2"/> </policy>
|
|
|
|
<policy label_prefix="nic_drv"> <pci class="ETHERNET"/> </policy>
|
|
|
|
<policy label_prefix="fb_drv"> <pci class="VGA"/> </policy>
|
|
|
|
<policy label_prefix="wifi_drv"> <pci class="WIFI"/> </policy>
|
|
|
|
<policy label_prefix="usb_drv"> <pci class="USB"/> </policy>
|
|
|
|
<policy label_prefix="ahci_drv"> <pci class="AHCI"/> </policy>
|
|
|
|
<policy label_prefix="audio_drv"> <pci class="AUDIO"/> <pci class="HDAUDIO"/> </policy>
|
|
|
|
<policy label_prefix="intel_fb_drv" irq_mode="nomsi">
|
2015-09-18 14:34:19 +00:00
|
|
|
<pci class="VGA"/>
|
|
|
|
<pci bus="0" device="0" function="0"/>
|
|
|
|
<pci class="ISABRIDGE"/>
|
|
|
|
</policy>}
|
2015-06-08 07:05:32 +00:00
|
|
|
} else {
|
|
|
|
return {}
|
|
|
|
}
|
2015-05-28 11:43:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proc platform_drv_priority {} { return "" }
|
2016-05-13 14:09:20 +00:00
|
|
|
proc platform_drv_add_routing {} {
|
|
|
|
if {[have_spec acpi]} {
|
|
|
|
return {
|
|
|
|
<service name="ROM" label="system"> <child name="acpi_report_rom"/> </service>}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
proc platform_drv_config_config {} {
|
2017-01-03 12:17:41 +00:00
|
|
|
if {[have_spec acpi] || [have_spec arm] || [have_spec muen]} {
|
2016-05-13 14:09:20 +00:00
|
|
|
return {
|
|
|
|
<config>}
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
<config acpi="no">}
|
|
|
|
}
|
2015-05-28 11:43:13 +00:00
|
|
|
|
|
|
|
proc append_platform_drv_config {} {
|
|
|
|
global config
|
|
|
|
|
|
|
|
if {[have_spec acpi]} {
|
|
|
|
|
2015-05-26 18:12:17 +00:00
|
|
|
append config "
|
2015-05-28 11:43:13 +00:00
|
|
|
<start name=\"acpi_drv\" [platform_drv_priority]>"
|
|
|
|
|
2015-05-26 18:12:17 +00:00
|
|
|
append config {
|
2016-07-22 15:35:42 +00:00
|
|
|
<resource name="RAM" quantum="3M"/>
|
2015-05-26 18:12:17 +00:00
|
|
|
<route>
|
|
|
|
<service name="IO_MEM"> <parent/> </service>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="RM"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="RAM"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
2015-05-26 18:12:17 +00:00
|
|
|
<service name="Report"> <child name="acpi_report_rom"/> </service>
|
|
|
|
</route>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
append config "
|
|
|
|
<start name=\"acpi_report_rom\" [platform_drv_priority]>"
|
|
|
|
|
|
|
|
append config {
|
|
|
|
<binary name="report_rom"/>
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
2015-05-28 11:43:13 +00:00
|
|
|
<provides>
|
2015-05-26 18:12:17 +00:00
|
|
|
<service name="ROM" />
|
|
|
|
<service name="Report" />
|
2015-05-28 11:43:13 +00:00
|
|
|
</provides>
|
|
|
|
<config>
|
2016-05-13 13:42:58 +00:00
|
|
|
<policy label="platform_drv -> acpi" report="acpi_drv -> acpi"/>
|
2015-05-28 11:43:13 +00:00
|
|
|
</config>
|
2015-05-26 18:12:17 +00:00
|
|
|
<route>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="RAM"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
2015-05-26 18:12:17 +00:00
|
|
|
</route>
|
2015-05-28 11:43:13 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
if {[have_platform_drv]} {
|
2015-05-28 11:43:13 +00:00
|
|
|
|
2015-05-26 18:12:17 +00:00
|
|
|
append config "
|
2015-06-08 07:05:32 +00:00
|
|
|
<start name=\"platform_drv\" [platform_drv_priority]>"
|
2015-05-28 11:43:13 +00:00
|
|
|
|
2015-05-26 18:12:17 +00:00
|
|
|
append config {
|
2015-11-12 10:00:58 +00:00
|
|
|
<resource name="RAM" quantum="4M" constrain_phys="yes"/>
|
2015-06-08 07:05:32 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Platform"/>}
|
|
|
|
|
2016-06-01 20:26:54 +00:00
|
|
|
append_if [have_spec acpi] config {
|
|
|
|
<service name="Acpi"/>}
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
append_if [have_spec arm] config {
|
|
|
|
<service name="Regulator"/>}
|
|
|
|
|
|
|
|
append config {
|
|
|
|
</provides>
|
2015-05-26 18:12:17 +00:00
|
|
|
<route>}
|
|
|
|
|
2016-05-13 14:09:20 +00:00
|
|
|
append config "[platform_drv_add_routing]"
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
append_if [have_spec acpi] config {
|
2016-05-13 13:42:58 +00:00
|
|
|
<service name="ROM" label="acpi"> <child name="acpi_report_rom"/> </service>}
|
2015-06-08 07:05:32 +00:00
|
|
|
|
2015-09-03 12:55:05 +00:00
|
|
|
append_if [have_spec rpi] config {
|
2015-06-08 07:05:32 +00:00
|
|
|
<service name="Timer"> <any-child/> </service>}
|
2015-05-26 18:12:17 +00:00
|
|
|
|
|
|
|
append config {
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>}
|
|
|
|
|
2016-05-13 14:09:20 +00:00
|
|
|
append config [platform_drv_config_config]
|
2015-05-26 18:12:17 +00:00
|
|
|
append config [platform_drv_policy]
|
|
|
|
|
|
|
|
append config {
|
2015-05-28 11:43:13 +00:00
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $config
|
|
|
|
}
|