mss-timer.c (95a9457fd44ad97c518858a4e1586a5498f9773c) mss-timer.c (b01422622b7c7293196fdaf1dbb4f495af44ecf9)
1/*
2 * Block model of System timer present in
3 * Microsemi's SmartFusion2 and SmartFusion SoCs.
4 *
5 * Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com>.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

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

224 MSSTimerState *t = MSS_TIMER(obj);
225 int i;
226
227 /* Init all the ptimers. */
228 for (i = 0; i < NUM_TIMERS; i++) {
229 struct Msf2Timer *st = &t->timers[i];
230
231 st->bh = qemu_bh_new(timer_hit, st);
1/*
2 * Block model of System timer present in
3 * Microsemi's SmartFusion2 and SmartFusion SoCs.
4 *
5 * Copyright (c) 2017 Subbaraya Sundeep <sundeep.lkml@gmail.com>.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

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

224 MSSTimerState *t = MSS_TIMER(obj);
225 int i;
226
227 /* Init all the ptimers. */
228 for (i = 0; i < NUM_TIMERS; i++) {
229 struct Msf2Timer *st = &t->timers[i];
230
231 st->bh = qemu_bh_new(timer_hit, st);
232 st->ptimer = ptimer_init(st->bh, PTIMER_POLICY_DEFAULT);
232 st->ptimer = ptimer_init_with_bh(st->bh, PTIMER_POLICY_DEFAULT);
233 ptimer_set_freq(st->ptimer, t->freq_hz);
234 sysbus_init_irq(SYS_BUS_DEVICE(obj), &st->irq);
235 }
236
237 memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t, TYPE_MSS_TIMER,
238 NUM_TIMERS * R_TIM1_MAX * 4);
239 sysbus_init_mmio(SYS_BUS_DEVICE(obj), &t->mmio);
240}

--- 53 unchanged lines hidden ---
233 ptimer_set_freq(st->ptimer, t->freq_hz);
234 sysbus_init_irq(SYS_BUS_DEVICE(obj), &st->irq);
235 }
236
237 memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t, TYPE_MSS_TIMER,
238 NUM_TIMERS * R_TIM1_MAX * 4);
239 sysbus_init_mmio(SYS_BUS_DEVICE(obj), &t->mmio);
240}

--- 53 unchanged lines hidden ---