mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
committed by
Christian Helmuth
parent
cda0fafbd1
commit
6d924d3285
@ -51,6 +51,7 @@ class Platform::Device : Interface, Noncopyable
|
||||
Connection &_platform;
|
||||
Legacy_platform::Device_capability _device_cap { };
|
||||
Name _name { };
|
||||
unsigned _class_code { };
|
||||
|
||||
public:
|
||||
|
||||
|
@ -272,6 +272,9 @@ Platform::Device::Device(Connection &platform, Name name)
|
||||
error(__func__, ": could not get device capability");
|
||||
throw -1;
|
||||
}
|
||||
|
||||
Legacy_platform::Device_client device(_device_cap);
|
||||
_class_code = device.class_code() >> 8;
|
||||
}
|
||||
|
||||
|
||||
@ -311,6 +314,12 @@ void Platform::Device::Config_space::write(unsigned char address,
|
||||
return;
|
||||
}
|
||||
|
||||
enum {
|
||||
CLASS_CODE_USB = 0xc03,
|
||||
};
|
||||
|
||||
switch(_device._class_code) {
|
||||
case CLASS_CODE_USB:
|
||||
/* reject writes to unknown addresses */
|
||||
switch (address) {
|
||||
case 0x04:
|
||||
@ -335,6 +344,8 @@ void Platform::Device::Config_space::write(unsigned char address,
|
||||
default:
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Legacy_platform::Device::Access_size const as = convert(size);
|
||||
Legacy_platform::Device_client device { _device._device_cap };
|
||||
|
Reference in New Issue
Block a user