mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
sculpt: add missing pieces to support MNT reform
This commit adds missing routes to I2c for the framebuffer driver of the MNT Reform. If build for this concrete board the Board_info::Soc variable within the sculpt_manager is initialized according to the properties of this device. The `update_soc` routine is called in the initialization of the sculpt_manager, otherwise it won't be called at all, if no PCI devices changes are detected. Missing driver binaries and device-tree-binaries are add to the run-script. Issue #5174
This commit is contained in:
parent
3b83292205
commit
5f67073aad
@ -18,3 +18,4 @@ capture_session
|
||||
gpu_session
|
||||
pin_state_session
|
||||
pin_control_session
|
||||
i2c_session
|
||||
|
@ -182,10 +182,17 @@ proc driver_routes { } {
|
||||
}
|
||||
|
||||
set result(mnt_reform2) {
|
||||
<service name="ROM" label="fb_drv"> <parent label="imx8mq_fb_drv"/> </service>
|
||||
<service name="ROM" label="fb_drv.dtb"> <parent label="imx8mq_fb_drv-mnt_reform2.dtb"/> </service>
|
||||
<service name="ROM" label="mmc_drv"> <parent label="imx8mq_sd_card_drv"/> </service>
|
||||
<service name="ROM" label="mmc_drv.dtb"> <parent label="imx8mq_sd_card_drv-mnt_reform2.dtb"/> </service>
|
||||
<service name="ROM" label="nic_drv"> <parent label="fec_nic_drv"/> </service>
|
||||
<service name="ROM" label="nic_drv.dtb"> <parent label="fec_nic_drv-mnt_reform2.dtb"/> </service>
|
||||
<service name="ROM" label="usb_drv"> <parent label="imx8mq_usb_host_drv"/> </service>
|
||||
<service name="ROM" label="usb_drv.dtb"> <parent label="imx8mq_usb_host_drv-mnt_reform2.dtb"/> </service>
|
||||
<service name="ROM" label="wifi.lib.so"> <parent label="imx8mq_wifi.lib.so"/> </service>
|
||||
<service name="ROM" label="wifi_firmware.tar"> <parent label="imx8mq_wifi_firmware.tar"/> </service>
|
||||
<service name="I2c"> <child name="drivers"/> </service>
|
||||
}
|
||||
|
||||
set result(imx8q_evk) {
|
||||
@ -446,6 +453,7 @@ install_config {
|
||||
<service name="Platform"/>
|
||||
<service name="Pin_state"/>
|
||||
<service name="Pin_control"/>
|
||||
<service name="I2c"/>
|
||||
<service name="IRQ"/>
|
||||
</provides>
|
||||
</start>
|
||||
|
@ -99,6 +99,7 @@ struct Sculpt::Fb_driver : private Noncopyable
|
||||
xml.node("route", [&] {
|
||||
gen_parent_route<Platform::Session> (xml);
|
||||
gen_parent_route<Pin_control::Session>(xml);
|
||||
gen_parent_route<I2c::Session>(xml);
|
||||
gen_capture_route(xml);
|
||||
gen_parent_rom_route(xml, "fb_drv");
|
||||
gen_parent_rom_route(xml, "config", "config -> fb_drv");
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <capture_session/capture_session.h>
|
||||
#include <event_session/event_session.h>
|
||||
#include <gpu_session/gpu_session.h>
|
||||
#include <i2c_session/i2c_session.h>
|
||||
#include <io_port_session/io_port_session.h>
|
||||
#include <pin_control_session/pin_control_session.h>
|
||||
#include <pin_state_session/pin_state_session.h>
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <vm_session/vm_session.h>
|
||||
#include <timer_session/connection.h>
|
||||
#include <io_port_session/io_port_session.h>
|
||||
#include <i2c_session/i2c_session.h>
|
||||
#include <event_session/event_session.h>
|
||||
#include <capture_session/capture_session.h>
|
||||
#include <gpu_session/gpu_session.h>
|
||||
@ -86,6 +87,8 @@ struct Sculpt::Main : Input_event_handler,
|
||||
Build_info const _build_info =
|
||||
Build_info::from_xml(Attached_rom_dataspace(_env, "build_info").xml());
|
||||
|
||||
bool const _mnt_reform = (_build_info.board == "mnt_reform2");
|
||||
|
||||
Registry<Child_state> _child_states { };
|
||||
|
||||
void _with_child(auto const &name, auto const &fn)
|
||||
@ -277,11 +280,28 @@ struct Sculpt::Main : Input_event_handler,
|
||||
** Device discovery **
|
||||
**********************/
|
||||
|
||||
Board_info::Soc _soc {
|
||||
.fb = _mnt_reform,
|
||||
.touch = false,
|
||||
.wifi = false, /* initialized via PCI */
|
||||
.usb = _mnt_reform,
|
||||
.mmc = _mnt_reform,
|
||||
.modem = false,
|
||||
.nic = _mnt_reform,
|
||||
};
|
||||
|
||||
Drivers _drivers { _env, _child_states, *this, *this };
|
||||
|
||||
Drivers::Resumed _resumed = _drivers.resumed();
|
||||
|
||||
Board_info::Options _driver_options { };
|
||||
Board_info::Options _driver_options {
|
||||
.display = _mnt_reform,
|
||||
.usb_net = false,
|
||||
.nic = false,
|
||||
.wifi = false,
|
||||
.suppress {},
|
||||
.suspending = false,
|
||||
};
|
||||
|
||||
/**
|
||||
* Drivers::Action
|
||||
@ -1626,6 +1646,7 @@ struct Sculpt::Main : Input_event_handler,
|
||||
|
||||
Main(Env &env) : _env(env)
|
||||
{
|
||||
_drivers.update_soc(_soc);
|
||||
_gui.input()->sigh(_input_handler);
|
||||
_gui.mode_sigh(_gui_mode_handler);
|
||||
_handle_gui_mode();
|
||||
@ -2263,6 +2284,7 @@ void Sculpt::Main::_generate_runtime_config(Xml_generator &xml) const
|
||||
gen_parent_service<Gpu::Session>(xml);
|
||||
gen_parent_service<Pin_state::Session>(xml);
|
||||
gen_parent_service<Pin_control::Session>(xml);
|
||||
gen_parent_service<I2c::Session>(xml);
|
||||
gen_parent_service<Terminal::Session>(xml);
|
||||
});
|
||||
|
||||
|
@ -41,6 +41,7 @@ struct Sculpt::Route : List_model<Route>::Element
|
||||
case Service::Type::GUI: return "gui";
|
||||
case Service::Type::GPU: return "gpu";
|
||||
case Service::Type::RM: return "rm";
|
||||
case Service::Type::I2C: return "i2c";
|
||||
case Service::Type::IO_MEM: return "io_mem";
|
||||
case Service::Type::IO_PORT: return "io_port";
|
||||
case Service::Type::IRQ: return "irq";
|
||||
@ -76,6 +77,7 @@ struct Sculpt::Route : List_model<Route>::Element
|
||||
case Service::Type::GUI: return "GUI";
|
||||
case Service::Type::GPU: return "GPU";
|
||||
case Service::Type::RM: return "Region maps";
|
||||
case Service::Type::I2C: return "I2C";
|
||||
case Service::Type::IO_MEM: return "Direct memory-mapped I/O";
|
||||
case Service::Type::IO_PORT: return "Direct port I/O";
|
||||
case Service::Type::IRQ: return "Direct device interrupts";
|
||||
|
@ -27,7 +27,7 @@ struct Sculpt::Service
|
||||
|
||||
enum class Type {
|
||||
AUDIO_IN, AUDIO_OUT, BLOCK, EVENT, CAPTURE, FILE_SYSTEM, NIC, GUI, GPU,
|
||||
RM, IO_MEM, IO_PORT, IRQ, REPORT, ROM, TERMINAL, TRACE, USB, RTC,
|
||||
RM, IO_MEM, IO_PORT, IRQ, REPORT, ROM, TERMINAL, TRACE, USB, RTC, I2C,
|
||||
PLATFORM, PIN_STATE, PIN_CONTROL, VM, PD, UPLINK, PLAY, RECORD, UNDEFINED };
|
||||
|
||||
enum class Match_label { EXACT, LAST };
|
||||
@ -55,6 +55,7 @@ struct Sculpt::Service
|
||||
case Type::GUI: return "Gui";
|
||||
case Type::GPU: return "Gpu";
|
||||
case Type::RM: return "RM";
|
||||
case Type::I2C: return "I2C";
|
||||
case Type::IO_MEM: return "IO_MEM";
|
||||
case Type::IO_PORT: return "IO_PORT";
|
||||
case Type::IRQ: return "IRQ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user