cuda: set timer 1 frequency property to CUDA_TIMER_FREQ
commita797ec500ae90b201b9098655c8f875303f1d843
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 9 Feb 2018 18:51:37 +0000 (9 18:51 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 10 Feb 2018 23:14:51 +0000 (11 10:14 +1100)
tree43b4e36256fbd200cdced3270fb7de2d6befdfe5
parenteb0788cb73a3eda37a97be74d186164b0c0b58d7
cuda: set timer 1 frequency property to CUDA_TIMER_FREQ

Now that we have successfully decoupled the timebase frequency and the hardware
timer frequency, set the timer 1 frequency property to CUDA_TIMER_FREQ and alter
get_next_irq_time() to use it rather than the hard-coded constant.

In addition to this we must now switch the tb_diff calculation over to use the
timebase frequency now that the hardware clock frequency and the timebase
frequency are different.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
[dwg: Correct a conflict due to a bug in an earlier patch]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/misc/macio/cuda.c