grlib_gptimer.c (95a9457fd44ad97c518858a4e1586a5498f9773c) grlib_gptimer.c (b01422622b7c7293196fdaf1dbb4f495af44ecf9)
1/*
2 * QEMU GRLIB GPTimer Emulator
3 *
4 * Copyright (c) 2010-2019 AdaCore
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

--- 352 unchanged lines hidden (view full) ---

361
362 unit->timers = g_malloc0(sizeof unit->timers[0] * unit->nr_timers);
363
364 for (i = 0; i < unit->nr_timers; i++) {
365 GPTimer *timer = &unit->timers[i];
366
367 timer->unit = unit;
368 timer->bh = qemu_bh_new(grlib_gptimer_hit, timer);
1/*
2 * QEMU GRLIB GPTimer Emulator
3 *
4 * Copyright (c) 2010-2019 AdaCore
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

--- 352 unchanged lines hidden (view full) ---

361
362 unit->timers = g_malloc0(sizeof unit->timers[0] * unit->nr_timers);
363
364 for (i = 0; i < unit->nr_timers; i++) {
365 GPTimer *timer = &unit->timers[i];
366
367 timer->unit = unit;
368 timer->bh = qemu_bh_new(grlib_gptimer_hit, timer);
369 timer->ptimer = ptimer_init(timer->bh, PTIMER_POLICY_DEFAULT);
369 timer->ptimer = ptimer_init_with_bh(timer->bh, PTIMER_POLICY_DEFAULT);
370 timer->id = i;
371
372 /* One IRQ line for each timer */
373 sysbus_init_irq(sbd, &timer->irq);
374
375 ptimer_set_freq(timer->ptimer, unit->freq_hz);
376 }
377

--- 36 unchanged lines hidden ---
370 timer->id = i;
371
372 /* One IRQ line for each timer */
373 sysbus_init_irq(sbd, &timer->irq);
374
375 ptimer_set_freq(timer->ptimer, unit->freq_hz);
376 }
377

--- 36 unchanged lines hidden ---