X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/8fe9942cde59835eb3c3c6936d866dd3305582ef:/l4/pkg/io/server/src/hw_device.cc..003b628647705666de261350195da72a38f2c4d2:/l4/pkg/io/io/server/src/hw_device.cc diff --git a/l4/pkg/io/server/src/hw_device.cc b/l4/pkg/io/io/server/src/hw_device.cc similarity index 85% rename from l4/pkg/io/server/src/hw_device.cc rename to l4/pkg/io/io/server/src/hw_device.cc index 14d8bc8e1..d50fcd081 100644 --- a/l4/pkg/io/server/src/hw_device.cc +++ b/l4/pkg/io/io/server/src/hw_device.cc @@ -89,10 +89,14 @@ Device::pm_init() void Device::init() { -#if 0 - printf("Hw::Device::plug(this=%p, name='%s', hid='%s')\n", - this, name(), hid()); -#endif + if (0) + printf("Hw::Device::plug(this=%p, name='%s', hid='%s')\n", + this, name(), hid()); + + if (_flags & DF_dma_supported) + if (!dma_domain() && parent()) + parent()->dma_domain_for(this); + int r = pm_init(); if (r < 0) { @@ -164,39 +168,6 @@ Device::get_child_dev_uid(l4_umword_t uid, l4_uint32_t adr, bool create) return c; } -int -Device::set_property(cxx::String const &prop, Prop_val const &val) -{ - if (prop == "hid") - { - if (val.type != Prop_val::String) - return -E_inval; - - cxx::String const v = val.get_string(); - _hid = std::string(v.start(), v.start() + v.len()); - return E_ok; - } - else if (prop == "name") - { - if (val.type != Prop_val::String) - return -E_inval; - - cxx::String const v = val.get_string(); - _name = std::string(v.start(), v.start() + v.len()); - return E_ok; - } - else if (prop == "adr") - { - if (val.type != Prop_val::Int) - return -E_inval; - - _adr = val.val.integer; - return E_ok; - } - else - return -E_no_prop; -} - bool Device::match_cid(cxx::String const &cid) const { @@ -260,8 +231,8 @@ Device::check_conflicts() const continue; d_printf(DBG_WARN, "warning: conflicting virtual clients:\n" - " %s\n" - " %s\n", + " %s\n" + " %s\n", (*j)->get_full_name().c_str(), (*i)->get_full_name().c_str());