slavio_timer.c (95a9457fd44ad97c518858a4e1586a5498f9773c) | slavio_timer.c (b01422622b7c7293196fdaf1dbb4f495af44ecf9) |
---|---|
1/* 2 * QEMU Sparc SLAVIO timer controller emulation 3 * 4 * Copyright (c) 2003-2005 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 379 unchanged lines hidden (view full) --- 388 uint64_t size; 389 char timer_name[20]; 390 391 tc = g_malloc0(sizeof(TimerContext)); 392 tc->s = s; 393 tc->timer_index = i; 394 395 bh = qemu_bh_new(slavio_timer_irq, tc); | 1/* 2 * QEMU Sparc SLAVIO timer controller emulation 3 * 4 * Copyright (c) 2003-2005 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 379 unchanged lines hidden (view full) --- 388 uint64_t size; 389 char timer_name[20]; 390 391 tc = g_malloc0(sizeof(TimerContext)); 392 tc->s = s; 393 tc->timer_index = i; 394 395 bh = qemu_bh_new(slavio_timer_irq, tc); |
396 s->cputimer[i].timer = ptimer_init(bh, PTIMER_POLICY_DEFAULT); | 396 s->cputimer[i].timer = ptimer_init_with_bh(bh, PTIMER_POLICY_DEFAULT); |
397 ptimer_set_period(s->cputimer[i].timer, TIMER_PERIOD); 398 399 size = i == 0 ? SYS_TIMER_SIZE : CPU_TIMER_SIZE; 400 snprintf(timer_name, sizeof(timer_name), "timer-%i", i); 401 memory_region_init_io(&tc->iomem, obj, &slavio_timer_mem_ops, tc, 402 timer_name, size); 403 sysbus_init_mmio(dev, &tc->iomem); 404 --- 32 unchanged lines hidden --- | 397 ptimer_set_period(s->cputimer[i].timer, TIMER_PERIOD); 398 399 size = i == 0 ? SYS_TIMER_SIZE : CPU_TIMER_SIZE; 400 snprintf(timer_name, sizeof(timer_name), "timer-%i", i); 401 memory_region_init_io(&tc->iomem, obj, &slavio_timer_mem_ops, tc, 402 timer_name, size); 403 sysbus_init_mmio(dev, &tc->iomem); 404 --- 32 unchanged lines hidden --- |