]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/io/io/server/src/hw_device.cc
Update
[l4.git] / 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 14d8bc8e19b4f49ef9f97fe95d58891e5fc031ea..d50fcd081bad2b6516b77bfdc236b504d9de9bfc 100644 (file)
@@ -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());