[okl4-developer] V2 Framework
Ryan Heffernan
ryan.heffernan at nicta.com.au
Tue Mar 11 13:45:38 EST 2008
Hello again,
I've been having some headaches trying to figure out how to use the V2
framework and thought I'd see if you guys could help. Essentially my
problem is that I'm porting a driver for the gumstix SMC chip that was
written for an old Iguana with the original driver framework onto the
new Iguana with V2 framework. I have a few specific questions but if
anyone had any general ideas about this or wanted to explain relevant
aspects of the V2 framework I would be very greatful. Since all the v2
devices are virtual ones its been difficult to use existing code as a
template for my device.
- Do I need to specify a .di interface for my device?
- the device_create_impl function from the old code returns an objref_t
and does resource allocation (there is no device_add_resource function).
Is this acceptable or do I have to change it to a cap_t and add the
add_resource function?
- The device_ops structure for my device is quite different than the one
specified in timer_if.h, and I currently just specify my own device_ops
structure to keep it in line with the packet server code that
initializes and uses the device. Is this ok?
- Should i add the device_create() call for the smc driver in the
devicecore scan_devices function? Or is this only for virtual drivers?
- The bus_space_t type used to just be a char * typedef, so to bring my
code up to speed can I just replace bus_space_t assignments with a x =
make_bus_resource({old assignment value})?
Once again I appreciate any help you can offer. Thanks!
Ryan
More information about the Developer
mailing list