static int pit_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
struct pit * pit_state = NULL;
struct vm_device * dev = NULL;
- char * name = v3_cfg_val(cfg, "name");
+ char * dev_id = v3_cfg_val(cfg, "ID");
// PIT is only usable in non-multicore environments
// just hardcode the core context
pit_state = (struct pit *)V3_Malloc(sizeof(struct pit));
V3_ASSERT(pit_state != NULL);
- dev = v3_allocate_device(name, &dev_ops, pit_state);
+ dev = v3_allocate_device(dev_id, &dev_ops, pit_state);
if (v3_attach_device(vm, dev) == -1) {
- PrintError("Could not attach device %s\n", name);
+ PrintError("Could not attach device %s\n", dev_id);
return -1;
}
#ifdef CONFIG_DEBUG_PIT
PrintDebug("8254 PIT: OSC_HZ=%d, reload_val=", OSC_HZ);
- PrintTraceLL(reload_val);
+ //PrintTrace(reload_val);
PrintDebug("\n");
#endif
#ifdef CONFIG_DEBUG_PIT
PrintDebug("8254 PIT: CPU MHZ=%d -- pit count=", cpu_khz / 1000);
- PrintTraceLL(pit_state->pit_counter);
+ //PrintTraceLL(pit_state->pit_counter);
PrintDebug("\n");
#endif